Update pipeline defaults so trim is enabled when omitted
This commit is contained in:
@@ -71,7 +71,7 @@ func (trimStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (*Stag
|
||||
}
|
||||
|
||||
trimCfg := env.Config.Pipeline.Trim
|
||||
enabled := trimCfg != nil && trimCfg.Enabled
|
||||
enabled := trimCfg != nil && trimCfg.Enabled != nil && *trimCfg.Enabled
|
||||
|
||||
canonicalTrimmedPath, err := resolveTrimmedOutputPath(paths, trimCfg)
|
||||
if err != nil {
|
||||
|
||||
@@ -275,7 +275,8 @@ func TestTrimStageDisabledCopiesNormalizedTranscript(t *testing.T) {
|
||||
writeFile(t, normalized, normalizedBody)
|
||||
|
||||
disabled := *env.Config.Pipeline.Trim
|
||||
disabled.Enabled = false
|
||||
enabled := false
|
||||
disabled.Enabled = &enabled
|
||||
env.Config.Pipeline.Trim = &disabled
|
||||
|
||||
result, err := (trimStage{}).Run(context.Background(), env, m)
|
||||
@@ -424,6 +425,7 @@ func setupTrimEnv(t *testing.T) (*Env, *manifest.Manifest, *boundsScriptoriumRun
|
||||
writeFile(t, pipelinePath, "workspace:\n root: "+workspace+"\n")
|
||||
|
||||
seriatimReport := false
|
||||
trimEnabled := true
|
||||
cfg := &config.Config{
|
||||
PipelinePath: pipelinePath,
|
||||
SessionPath: sessionPath,
|
||||
@@ -437,7 +439,7 @@ func setupTrimEnv(t *testing.T) (*Env, *manifest.Manifest, *boundsScriptoriumRun
|
||||
Report: &seriatimReport,
|
||||
},
|
||||
Trim: &config.TrimConfig{
|
||||
Enabled: true,
|
||||
Enabled: &trimEnabled,
|
||||
OutputPath: "transcripts/final.trimmed.json",
|
||||
Bounds: config.TrimBoundsConfig{
|
||||
PromptID: "dnd_session.bounds",
|
||||
|
||||
Reference in New Issue
Block a user