Publish outputs to checked destinations and preserve failure evidence
This commit is contained in:
@@ -20,16 +20,19 @@ validator entries yield `validation_decisions_filtered` only for a successful
|
||||
operation; they do not count as filtered correction proposals. Failed operations
|
||||
retain their execution counts and never produce a recovery record.
|
||||
|
||||
`internal/core/diagnostics.OutputSession` owns active destination checks,
|
||||
transcript preflight, report initialization, regular-file replacement, and direct
|
||||
stream publication. Transcript input is protected from early report writes but
|
||||
`internal/core/diagnostics.OutputSession` owns destination selection, report
|
||||
initialization, and publication. Transcript and report files share a staging
|
||||
primitive that writes beside the resolved destination. Streams are opened for
|
||||
delivery. Transcript input is protected from early report writes but
|
||||
may be the final transcript destination. The LLM runtime records consumed PromptKit sources and effective host message
|
||||
files and supplies those source paths to CLI;
|
||||
no second filename-based discovery rule is used.
|
||||
CLI composes it after configuration, transcript acquisition, and preflight
|
||||
readiness and before dispatching model work. It does not create ordinary report parents.
|
||||
On a final write error it attempts other enabled reports and one failed-status
|
||||
pass; a published transcript is never erased by a later report failure.
|
||||
Final report rendering uses the delivery and cleanup errors already observed.
|
||||
If a report write first fails, the remaining writes use the failed bundle and
|
||||
one pass attempts to update the reports still missing failed evidence. A
|
||||
published transcript remains available after a later report failure.
|
||||
|
||||
Debug is independent. The shared `--debug` flag enables a unique retained child
|
||||
under `diagnostics.work_dir`. The CLI creates one interaction sink rooted in
|
||||
|
||||
@@ -34,15 +34,20 @@ untouched until successful publication. Pipes and devices are opened only for
|
||||
delivery, and a pipe can wait for its reader. If a transcript destination changes
|
||||
between a regular file and a pipe or device during processing, Audita can report a
|
||||
delivery failure while preserving the new destination. Parent directories for
|
||||
required outputs must already exist.
|
||||
required outputs must already exist. Publication uses the destinations resolved
|
||||
during preparation. Give concurrent invocations separate destinations, and
|
||||
choose separate report directories when retaining reports from multiple runs.
|
||||
|
||||
Enabled reports are initialized as `in_progress` before processing. The
|
||||
transcript is published before final reports; the files do not form a single
|
||||
transaction. A late report failure may therefore leave a published transcript.
|
||||
Fatal errors and cancellation clean unpublished temporary resources and attempt
|
||||
failed-status final reports. An uncatchable termination can leave `in_progress`
|
||||
evidence. Read exit status and reports together rather than treating a file's
|
||||
existence as proof of success.
|
||||
After a required write failure or cancellation, Audita attempts to clean
|
||||
unpublished temporary resources and publish failed-status reports. A cleanup
|
||||
failure is reported with the earlier error. Cancellation observed after a
|
||||
stream write still fails the invocation, even when some or all bytes reached
|
||||
the reader. If failed reports cannot be rendered, available report evidence
|
||||
remains. An uncatchable termination can leave `in_progress` evidence. Use the
|
||||
exit status and report status to determine the outcome.
|
||||
|
||||
## Debug evidence
|
||||
|
||||
@@ -50,7 +55,9 @@ The shared `--debug` flag enables retained artifacts in a run directory beneath
|
||||
`diagnostics.work_dir`; selecting a work directory alone does not enable capture.
|
||||
Optional debug preparation or writes can produce warnings without
|
||||
changing correction decisions or the required output result. Debug material can
|
||||
include transcript content, prompts, responses, and correction decisions. Protect this material according to the sensitivity of the inputs and responses. Repair interactions
|
||||
include transcript content, prompts, responses, and correction decisions.
|
||||
Protect this material according to the sensitivity of the inputs and responses
|
||||
and manage its retention. Repair interactions
|
||||
and revalidation artifacts include proposal and attempt coordinates; the
|
||||
correction ledger connects them to the original edit.
|
||||
|
||||
|
||||
@@ -186,6 +186,13 @@ after I/O, cleanup errors, initialized evidence when rendering fails, and
|
||||
write behavior after known failure. Observe publication attempts as well as
|
||||
final files. Leave processing fact and ledger projection to Stage 17.
|
||||
|
||||
**Complete.** Required outputs use the destinations resolved during selection
|
||||
and share regular-file staging. Publication checks cancellation, retains and
|
||||
reports cleanup failures, and uses failed-status reports when required delivery
|
||||
cannot complete. Tests verified publication attempts, retained evidence when
|
||||
rendering failed, symlink destinations, stream cancellation, and Markdown path
|
||||
escaping. The CLI build and full offline Go suite passed.
|
||||
|
||||
## Stage 5 — Consolidate typed transcript data
|
||||
|
||||
Audit #13, #31, #51, #52, #54, #62 (file helper).
|
||||
|
||||
Reference in New Issue
Block a user