diff --git a/docs/internal/pipeline.md b/docs/internal/pipeline.md index c8ead3e0..f2656c06 100644 --- a/docs/internal/pipeline.md +++ b/docs/internal/pipeline.md @@ -12,7 +12,7 @@ own durable output shapes. Concrete production extensions are covered by The pipeline framework accepts a resolved composition, registries, shared dependencies, input bytes, a supplied prompt session, and state/debug collaborators. It returns logical output files, normalized artifacts, recorded -rejections and warnings, manifest provenance, and checkpoint decisions. The +rejections, grouped diagnostics, manifest provenance, and checkpoint decisions. The CLI owns process arguments, configuration discovery, session resolution, physical roots, and placement of returned output files. diff --git a/docs/internal/state.md b/docs/internal/state.md index fbeaba60..92bf7037 100644 --- a/docs/internal/state.md +++ b/docs/internal/state.md @@ -97,7 +97,7 @@ owns the operator workflow and stable reason-code meanings. `internal/core/debugbundle` allocates an explicitly requested per-run bundle with `summary/` and `trace/` roots. `SummaryWriter` persists redacted command, -resolution, run, warning, and failure artifacts. `internal/framework/debug` +resolution, run, final grouped diagnostic, and failure artifacts. `internal/framework/debug` implements the pipeline-facing trace recorder under the trace root. The CLI allocates a bundle before pipeline resolution and treats requested diff --git a/docs/operations.md b/docs/operations.md index f29a5d86..2f212431 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -105,8 +105,10 @@ and resolves configuration before module preparation and source parsing. It then performs any permitted cache lookup, executes the pipeline, and publishes logical output files only after a successful runner result. -On success, the command reports the output bundle path. A warning-bearing run -still succeeds and reports its warning count on standard error. Errors and +On success, the command reports the output bundle path. A run with actionable +process warnings still succeeds and reports warning-group and occurrence counts +on standard error; advisory and observation findings do not produce a warning +line. Errors and their exit classes are defined in the [CLI reference](cli.md#output-streams-and-exit-statuses). ## Validation Retries And Terminal Outcomes @@ -272,7 +274,7 @@ Only a [debug-enabled run](cli.md#run) creates a bundle: ~~~ The summary contains redacted invocation and resolution information plus run, -warning, checkpoint, chunk-plan, and terminal reporting artifacts. Attempt +final grouped diagnostic, checkpoint, chunk-plan, and terminal reporting artifacts. Attempt terminal records contain bounded attempt kinds, validator outcomes, policy, decision, PromptKit repair count, and usage; they do not contain assistant responses or complete correction messages. The trace contains allowlisted diff --git a/docs/roadmap/implementation.md b/docs/roadmap/implementation.md index 3ca5d1d9..6e27813f 100644 --- a/docs/roadmap/implementation.md +++ b/docs/roadmap/implementation.md @@ -593,7 +593,7 @@ output modules. Assert semantic fields and stream choice, not complete prose. This stage is appropriately sized for one `gpt-5.6-terra` prompt. -## Stage 11 — Align Debug, Manifest, And Resume Surfaces +## Stage 11 ✅ — Align Debug, Manifest, And Resume Surfaces ### Goal diff --git a/internal/cli/run.go b/internal/cli/run.go index bd071975..cc020993 100644 --- a/internal/cli/run.go +++ b/internal/cli/run.go @@ -538,7 +538,7 @@ func writePartialSummary(summary *debugbundle.SummaryWriter, output pipeline.Run return err } } - if err := summary.WriteWarnings(output.Diagnostics); err != nil { + if err := summary.WriteDiagnostics(output.Diagnostics); err != nil { return err } return summary.WriteCheckpointEvents(output.CheckpointEvents) diff --git a/internal/cli/run_contract_test.go b/internal/cli/run_contract_test.go index 15ede91c..388d4b08 100644 --- a/internal/cli/run_contract_test.go +++ b/internal/cli/run_contract_test.go @@ -603,7 +603,7 @@ func TestRunWarningsRemainSuccessfulAndReachDurableSurfaces(t *testing.T) { } bundle := onlyChildDir(t, roots.debug) var diagnostics contracts.DiagnosticCollection - readStateTestSummaryJSON(t, bundle, "warnings.json", &diagnostics) + readStateTestSummaryJSON(t, bundle, "final-diagnostics.json", &diagnostics) if len(diagnostics.Groups) != 1 || diagnostics.Groups[0].ReasonCode != "contract-warning" { t.Fatalf("debug diagnostics = %#v", diagnostics) } diff --git a/internal/cli/state_hardening_test.go b/internal/cli/state_hardening_test.go index 11d7f9f2..ee3806d6 100644 --- a/internal/cli/state_hardening_test.go +++ b/internal/cli/state_hardening_test.go @@ -464,7 +464,7 @@ func TestRunRetainsPartialPipelineOutcomeInFailureSummary(t *testing.T) { t.Fatalf("partial manifest = %#v", manifest) } var diagnostics contracts.DiagnosticCollection - readStateTestSummaryJSON(t, bundlePath, "warnings.json", &diagnostics) + readStateTestSummaryJSON(t, bundlePath, "final-diagnostics.json", &diagnostics) if len(diagnostics.Groups) != 1 || diagnostics.Groups[0].ReasonCode != "partial-warning" { t.Fatalf("partial diagnostics = %#v", diagnostics) } diff --git a/internal/core/debugbundle/bundle_test.go b/internal/core/debugbundle/bundle_test.go index 9869a766..c3d8b7a2 100644 --- a/internal/core/debugbundle/bundle_test.go +++ b/internal/core/debugbundle/bundle_test.go @@ -110,7 +110,7 @@ func TestSummaryWriterWritesEverySummaryArtifact(t *testing.T) { if err := summary.WriteRunReport(RunReport{RunID: bundle.RunID(), PipelineID: "test"}); err != nil { t.Fatal(err) } - if err := summary.WriteWarnings(contracts.DiagnosticCollection{}); err != nil { + if err := summary.WriteDiagnostics(contracts.DiagnosticCollection{}); err != nil { t.Fatal(err) } if err := summary.WriteError("failed"); err != nil { @@ -126,7 +126,7 @@ func TestSummaryWriterWritesEverySummaryArtifact(t *testing.T) { ArtifactRunManifest, ArtifactChunkPlan, ArtifactRunReport, - ArtifactWarnings, + ArtifactDiagnostics, ArtifactErrorLog, } { info, err := os.Stat(filepath.Join(bundle.SummaryRoot(), name)) diff --git a/internal/core/debugbundle/summary.go b/internal/core/debugbundle/summary.go index cac0ab5b..b6b8eb42 100644 --- a/internal/core/debugbundle/summary.go +++ b/internal/core/debugbundle/summary.go @@ -20,7 +20,7 @@ const ( ArtifactRunManifest = "run-manifest.json" ArtifactChunkPlan = "chunk-plan.json" ArtifactRunReport = "run-report.json" - ArtifactWarnings = "warnings.json" + ArtifactDiagnostics = "final-diagnostics.json" ArtifactErrorLog = "error.log" ) @@ -101,8 +101,8 @@ func (w *SummaryWriter) WriteChunkPlan(v artifacts.ChunkPlanSummary) error { return w.writeJSON(ArtifactChunkPlan, v) } func (w *SummaryWriter) WriteRunReport(v RunReport) error { return w.writeJSON(ArtifactRunReport, v) } -func (w *SummaryWriter) WriteWarnings(v contracts.DiagnosticCollection) error { - return w.writeJSON(ArtifactWarnings, v) +func (w *SummaryWriter) WriteDiagnostics(v contracts.DiagnosticCollection) error { + return w.writeJSON(ArtifactDiagnostics, contracts.CloneDiagnosticCollection(v)) } func (w *SummaryWriter) WriteError(message string) error { return w.writeBytes(ArtifactErrorLog, []byte(message+"\n"))