Files
narratio/docs/internal/preflight.md
Eric Rakestraw 826369c81a
Some checks failed
ci/woodpecker/push/verify Pipeline was canceled
Protect validation probes with the session lock
2026-11-30 14:40:34 +00:00

2.7 KiB

Internal: Downstream Preflight

The application performs downstream checks after selected preparation completes or is reused and before remaining selected processing. It projects remaining work against a clone of the locked manifest using the same stage decisions and analysis planner as session plan. Projected polish selects Audita; projected enabled extraction selects Notarius inspection and preflight; enabled trim and analysis select Scriptorium requirements. A projection is not an execution commitment. Empty target sets invoke no checker.

Audita receives the verified four prepared glossary files and the same processing selectors and destinations, with an embedded synthetic transcript. The adapter runs native preflight with provider smoke enabled, captures its transient diagnostics, and preserves exit classification. No preflight result is cached as a stage. A failure stops later processing without presenting it as complete.

Notarius uses the same execution controls and verified reference snapshots. It checks an available verified transcript or reports that a synthetic one was used. Readiness warnings and native failures remain visible; checks do not publish work.

For session validate, the application selects enabled downstream definitions independently of reuse and checks the existing prepared manifest. It does not resolve live files into candidate glossary projections or run prepare. The Audita probe under runs/.validation can create or probe directories and contact providers; it does not update the session manifest. Discovery and provider checks do not establish real-transcript feasibility or editorial quality.

Standalone validation acquires the context-aware session lock before reading prepared evidence for Audita or Notarius probes. It holds the lock through probe execution, report consumption and reference verification, serializing these files with runner cleanup and restore. Missing preparation is reported without creating a workspace. Automatic preflight uses the runner's existing lock.

Scriptorium input-map keys remain binding names distinct from Narratio source IDs. Missing required bindings or variables and inspection failures are errors; optional sources for required inputs, conditional requirements, incomplete discovery, and discovery issues produce warnings. The checker preserves earlier findings and stops on cancellation. Actual input resolution remains authoritative.

See Audita, Scriptorium, CLI, and operations. Implementation and tests are in internal/preflight, internal/app/runner_preflight.go, internal/app/session_inspection_command.go, and internal/adapters/audita/preflight.go.