Commit module changes only after successful execution

This commit is contained in:
2026-11-16 14:42:24 +00:00
parent e2710d869e
commit 1c43264f6f
7 changed files with 388 additions and 191 deletions

View File

@@ -40,9 +40,14 @@ explicit `not_started`/`interrupted`/`completed` work units, compact model
operation outcomes, and per-module results. Candidate payloads are retained
in the returned output only when debug capture is requested. A work unit can
complete with model errors and applied corrections. Recoverable model failures
never trigger shared cancellation. Fatal setup, internal, application, or
parent-cancellation errors cancel peers, join workers, and preserve earlier
committed module text for partial reports; no completed transcript is published.
never trigger shared cancellation. Fatal failures and parent cancellation stop
further dispatch and join active workers. The initiating error carries its
processing phase and available origin. Work-unit evidence preserves each peer's
interruption or error. Usable proposal results from later sections are indexed
in order after joining, even when the runner could not validate them. The
working transcript advances only at the module's successful commit boundary.
Earlier committed text remains available to an interrupted run, and transcript
delivery requires successful processing.
Required transcript/report write failures are fatal. Optional debug writes
report safely to stderr without changing decisions or exit status. See

View File

@@ -543,6 +543,15 @@ earlier chunk, and a fatal stage after earlier committed text. Assert causal
origin and preserved evidence as well as returned failure. Leave report/ledger
projection to Stage 17.
**Complete.** A single module completion path advances the transcript only
after a successful application and context check. The runner returns the
initiating error with its phase and available origin, and keeps peer failures
on their work units. After joining, it assigns deterministic indices to usable
proposal responses that never reached validation. Tests exercised canceled
entry, cancellation after approval, a later response behind an earlier
failure, and preservation of earlier committed text. The CLI build, full
offline suite, and targeted race checks passed.
## Stage 16 — Bound local preparation and actively drain results
Audit #15 (dispatch) and #30, under D3.