Document and validate preflight readiness

This commit is contained in:
2026-11-27 01:26:07 +00:00
parent a9ab8e59b3
commit 7874ea648b
14 changed files with 143 additions and 35 deletions

View File

@@ -33,8 +33,11 @@ the [CLI contract](../cli.md) when changing the command; the
adoption decision is recorded in [ADR 0001](../adr/0001-releasekit.md).
Processing preflight checks glossary selections before inspecting proposal,
validation, and enabled repair profiles in pipeline order. The checked plan
carries the resolved module specs and glossary views into execution. It reuses
validation, and enabled repair profiles in pipeline order. The local plan
carries resolved module specs, glossary views, normalized content, and fixed
sections into execution; the prepared invocation also retains checked output
destinations and source evidence. The standalone route uses the same bindings
and local preparation, while `run` is a native alias of `process`. It reuses
profile and backend inspections and equivalent glossary views within the
invocation. Native inspection commands continue to inspect configuration
without running processing readiness checks.

View File

@@ -20,15 +20,17 @@ 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 destination selection, report
initialization, and publication. Transcript and report files share a staging
`internal/core/diagnostics` checks destinations without opening resources and
can probe regular-file targets with temporary siblings. `OutputSession` consumes
the checked paths and owns 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.
CLI constructs it after local plan and destination checks and before dispatching
model work. Standalone preflight uses the checker and probes without a session;
its provider observations remain in the LLM adapter. It does not create ordinary report parents.
Final report rendering includes delivery and cleanup errors observed so far.
When another failure becomes known, later writes use updated failed reports.
One best-effort pass refreshes earlier reports with stale evidence. A published

View File

@@ -59,9 +59,10 @@ These are current implementation boundaries, not bans on future work.
## Main Execution Path (`audita process`)
The CLI inspects configuration and profiles, preflights and initializes active
outputs, optionally creates debug evidence, invokes the runner, and finalizes
transcript and reports.
The CLI prepares an invocation-local plan and checked destinations, initializes
active outputs, optionally creates debug evidence, invokes the runner, and
finalizes transcript and reports. Standalone preflight shares local preparation
and can perform provider diagnostics without creating a processing session.
The [pipeline](pipeline.md) owns detailed state transitions; the
[operations guide](../operations.md) owns the operator workflow and physical
artifact lifecycle.

View File

@@ -4,14 +4,14 @@ The [input contract](../integrations/transcript-glossary-files.md) owns input
formats; [configuration](../config.md) owns settings; the
[output contract](../integrations/output-files.md) owns serialized results.
1. CLI loads resolved configuration and transcript input. Preflight checks all
selected glossary views and roles before the output session prepares resources.
Transcript segments then enter canonical normalization.
1. CLI acquires configuration and transcript input. `framework/preflight` checks
selected glossary views and roles, normalizes the canonical transcript, and
returns an invocation-local plan with fixed sections and ordered profile IDs.
2. Normalization sorts segments by start time and preserves input order for
ties. It evaluates merge limits using the later end time and the same token
estimate as chunking, then reassigns IDs where needed.
3. The runner partitions the normalized transcript exactly once before its
module loop. Initial section identity, segment membership, and token
3. The core chunker partitions the normalized transcript during preparation.
The runner consumes those sections: initial identity, membership, and token
estimates stay fixed while text evolves.
4. Module instances execute in configured order. Each section hands its decoded
proposals and original local segment references to the runner along with
@@ -64,3 +64,9 @@ for invariants.
Key tests: `internal/framework/runner/*_test.go`,
`internal/framework/validators/*_test.go`, and
`cmd/audita/main_integration_test.go`.
Standalone preflight uses the same local plan and checked destinations, probes
regular output parents, and optionally invokes native structured-output smoke
checks through `framework/llm`. It does not start the runner or an output
session. Processing does not invoke smoke checks. See the
[CLI contract](../cli.md#preflight) for the observable behavior.