Preserve diagnostic aggregation failures during finalization

This commit is contained in:
2026-11-26 02:11:41 +00:00
parent de2f4d9fde
commit 2d4a2c9c7a
6 changed files with 155 additions and 39 deletions

View File

@@ -174,6 +174,10 @@ continuation and, after dispatched work drains, assembles them in lane and chunk
order before merge and normalize diagnostics. Available operation diagnostics
are retained on failure or cancellation; an incomplete lane still publishes no
artifact or generated handoff.
The runner finalizes diagnostics once before output encoding, or on an earlier
failure. If aggregation fails, the result retains the successfully aggregated
prefix and the error includes both the aggregation failure and any run failure;
encoding does not proceed after unsuccessful aggregation.
The encoder receives owned normalized/auxiliary values and returns logical files.
It does not choose a directory, publish a report, or serialize execution ledgers.

View File

@@ -239,6 +239,11 @@ out-of-order coverage; incomplete lanes must still produce no artifacts/handoffs
### CAT-009 — Failure Finalization Hides Diagnostic Aggregation Errors
**Status:** Resolved. Diagnostic finalization runs once, retains the valid prefix,
and joins aggregation errors with execution, cancellation, or capture causes.
Regressions exercise genuine occurrence overflow on failure and success paths,
including prevention of output encoding. The prescribed package checks pass.
**Assessment:** Static composed failure-path defect; original P3.
**Sources:** [ERR-003](06-error-handling.md#err-003--failure-output-finalization-suppresses-aggregation-errors),
@@ -254,8 +259,8 @@ and failure semantics rather than silently truncating warnings into success.
**Subsequent decision:** [Discussion Item 1](discussion.md#1-diagnostic-capacity-and-pipeline-success)
selects removal of diagnostic group-count caps while retaining per-group sampling
and genuine failure causes. That accepted design replaces the warning-bound
preservation recommendation above. Group caps and truncation are removed; the
single failure-finalization boundary and preservation of causes remain pending.
preservation recommendation above. Group caps and truncation are removed, and
the selected single failure-finalization boundary preserves genuine causes.
### CAT-010 — Process Signals Do Not Reach Cooperative Cancellation

View File

@@ -521,6 +521,12 @@ completed work on cancellation. Preserve canonical error selection.
## Stage 17 — Finalize Once, Retaining Primary And Finalization Causes
**Completed.** One diagnostic finalization boundary retains the valid prefix and
joins aggregation errors with execution, cancellation, and capture causes. A
failed success-path aggregation prevents output encoding; work-only diagnostic
groups are retired. Genuine occurrence-overflow regressions and the specified
diagnostics, pipeline, and CLI checks pass. Runner decomposition follows later.
**Coverage:** CAT-009 correctness; CAT-022 foundation.
**Prerequisites:** Stages 14–16.