Retain processing evidence only for selected outputs

This commit is contained in:
2026-11-16 15:08:02 +00:00
parent 5167154a1c
commit 891d4aac2c
21 changed files with 494 additions and 229 deletions

View File

@@ -19,6 +19,7 @@ func executePipeline(ctx context.Context, loaded *processInputs, prepared *prepa
cfg := &loaded.Configuration.Config
specs := prepared.Prepared.Specs
debug := prepared.Prepared.Debug
evidence := runner.EvidenceSelection{Reports: cfg.Reporting.Enabled, Debug: debug != nil}
var observer *llm.ObservationCollector
var hooks llm.CallHooks
if debug != nil {
@@ -57,7 +58,7 @@ func executePipeline(ctx context.Context, loaded *processInputs, prepared *prepa
}
output, runErr := runner.New(modules.NewFactory()).Run(ctx, runner.RunInput{
Config: cfg, Transcript: normalized, ModuleSpecs: specs,
Interactions: interactions, CaptureCandidates: debug != nil,
Interactions: interactions, Evidence: &evidence,
})
if debug != nil {
for _, warning := range writer.Warnings() {
@@ -68,6 +69,6 @@ func executePipeline(ctx context.Context, loaded *processInputs, prepared *prepa
warn(debug.WriteJSONArtifact(diagnostics.ArtifactCorrectionLedger, processreport.BuildCorrectionLedger(processreport.CorrectionLedgerInput{RunDirectoryPath: debug.Path(), RunOutput: &output})))
}
snapshot := processreport.Build(processreport.BuildInput{RunID: prepared.RunID, Status: reporting.StatusInProgress, StartedAt: prepared.Started,
ModuleSpecs: specs, RunOutput: &output, ProcessingError: runErr, SummaryOnly: !cfg.Reporting.Enabled})
ModuleSpecs: specs, RunOutput: &output, ProcessingError: runErr, SummaryOnly: !evidence.Reports})
return processResult{Transcript: output.FinalTranscript, Snapshot: snapshot}, runErr
}