Document standalone preflight and complete verification
This commit is contained in:
@@ -62,9 +62,10 @@ command configuration loader may still use object storage to retrieve a missing
|
||||
remote session file before planning begins.
|
||||
|
||||
After preparation, the application projects remaining selected work and uses
|
||||
invocation-owned Audita, Notarius, and Scriptorium runners for applicable readiness checks.
|
||||
The same runners are available to processing. Explicit session validation uses
|
||||
existing prepared inputs and invocation-owned factories. See
|
||||
invocation-owned Audita, Notarius, and Scriptorium runners for applicable
|
||||
readiness checks. The same runners are available to processing. Standalone
|
||||
preflight prepares inputs through the same lifecycle and uses invocation-owned
|
||||
factories for all enabled readiness checks. See
|
||||
[preflight internals](preflight.md).
|
||||
|
||||
Notarius is composed only when extraction is enabled. The stage resolves
|
||||
|
||||
@@ -36,6 +36,8 @@ cancellation; active work retains the canceled operation context. Cleanup, when
|
||||
selected, is the ordinary final stage rather than runner finalization work.
|
||||
The lock remains held from manifest initialization through finalization, and a
|
||||
failed stage or required manifest save prevents later stages from starting.
|
||||
Standalone preflight shares that lifecycle, runs only preparation, and checks
|
||||
enabled capabilities while holding the same lock.
|
||||
|
||||
## Components
|
||||
|
||||
@@ -46,7 +48,7 @@ failed stage or required manifest save prevents later stages from starting.
|
||||
| Configuration | [`internal/config`](configuration.md) | Typed ConfigKit results and lifecycle defaults, imports/overlays, canonical party loading, separate catalog/player/publication derivation, session templating, and validation. |
|
||||
| Pipeline stages | `internal/stage` | Canonical stage registry, shared stage contract, execution dependencies, and implemented stage behavior. |
|
||||
| Glossaries | `internal/glossary` | Native vocabulary resolution, schema validation, party projection, and deterministic documents. |
|
||||
| Downstream preflight | [`internal/preflight`](preflight.md) | Assess Audita readiness and native prompt requirements for execution and validation. |
|
||||
| Downstream preflight | [`internal/preflight`](preflight.md) | Assess Audita, Notarius, and prompt requirements for execution and standalone preflight. |
|
||||
| External boundaries | `internal/adapters`, `internal/audio` | WhisperX HTTP, downstream subprocesses, notification, object storage, and S3 audio materialization behind Narratio contracts. |
|
||||
| Manifests | `internal/manifest` | Durable session progress, stage transitions, validation, and atomic persistence. |
|
||||
| Artifacts and paths | `internal/artifacts`, `internal/pathsafe` | Artifact identities and resolution, local and remote path/key models, current-state discovery, and confined relative destinations. |
|
||||
@@ -119,7 +121,7 @@ so any earlier replacement can stale a prior cleanup result.
|
||||
- [Adapter Internals](adapters.md): external adapter boundaries, composition,
|
||||
failure behavior, and test surfaces.
|
||||
- [Preflight Internals](preflight.md): projected target selection and shared
|
||||
requirements assessment.
|
||||
requirements assessment and standalone preparation.
|
||||
- [Artifact Internals](artifacts.md): source identities, runtime catalog,
|
||||
resolution, previous requirements, and current-state helpers.
|
||||
- [Manifest Internals](manifest.md): session records, persistence, and execution
|
||||
|
||||
@@ -1,44 +1,41 @@
|
||||
# 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.
|
||||
The application runs automatic downstream checks after selected preparation and
|
||||
before selected processing. It projects remaining work against a clone of the
|
||||
locked manifest, using the stage decisions and analysis planner shared with
|
||||
`session plan`. Projected polish selects Audita; projected enabled extraction
|
||||
selects Notarius; projected trim and analysis select Scriptorium requirements.
|
||||
A projection is not an execution commitment, and an empty target set invokes 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.
|
||||
Standalone `preflight` acquires configuration once and uses the runner's locked
|
||||
invocation lifecycle to execute or reuse `prepare`. Within that same lock it
|
||||
selects all enabled capabilities and prompt prerequisites regardless of reuse,
|
||||
then invokes the shared downstream request builders and checkers. A preparation
|
||||
failure blocks probes requiring prepared inputs but permits independent prompt
|
||||
and remote-lock inspection while the context remains active. Preparation success
|
||||
is persisted even when later readiness fails; readiness itself creates no stage
|
||||
or reusable success record.
|
||||
|
||||
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.
|
||||
Audita receives verified prepared glossary files and production selections with
|
||||
an embedded synthetic transcript. Its adapter performs native provider smoke
|
||||
checks and retains failure causes. Notarius receives production controls and
|
||||
verified reference snapshots, which are checked again after its native call.
|
||||
The application projects transcript-producing work before allowing a verified
|
||||
current transcript; otherwise it reports the synthetic fallback. Neither probe
|
||||
publishes work, and the synthetic input cannot establish real-transcript
|
||||
feasibility or editorial quality.
|
||||
|
||||
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.
|
||||
discovery, and discovery issues produce warnings. Findings survive independent
|
||||
failures and cancellation stops new work.
|
||||
|
||||
See [Audita](../integrations/audita.md), [Scriptorium](../integrations/scriptorium.md),
|
||||
[CLI](../cli.md#session-validate), and [operations](../operations.md#prompt-requirements-preflight).
|
||||
Implementation and tests are in `internal/preflight`, `internal/app/runner_preflight.go`,
|
||||
`internal/app/session_inspection_command.go`, and `internal/adapters/audita/preflight.go`.
|
||||
Probe files use invocation-scoped destinations under `runs/`, protected by the
|
||||
session lock through report consumption, reference verification, and terminal
|
||||
persistence. A later authorized cleanup can remove those files without removing
|
||||
durable prepared inputs. See [workspace internals](workspace.md),
|
||||
[CLI](../cli.md#preflight), and [operations](../operations.md#prompt-requirements-preflight).
|
||||
Implementation is in `internal/preflight`, `internal/app/downstream_readiness.go`,
|
||||
`internal/app/runner_preflight.go`, and `internal/app/session_readiness.go`.
|
||||
|
||||
@@ -51,14 +51,15 @@ operating-system lock held on `.lock` (`ErrLockConflict` on contention). The
|
||||
file retains owner metadata after release or process death; its existence is
|
||||
not evidence that a lock is active. Command and restore flows wait for this
|
||||
lock only while their context remains active, and report a release failure.
|
||||
Standalone validation uses the same lock for its prepared-state reads and
|
||||
session-local readiness probes, keeping active probe files outside concurrent
|
||||
cleanup. Validation leaves stage progress unchanged.
|
||||
Standalone preflight holds the same lock through preparation, readiness probes,
|
||||
and finalization, keeping active probe files outside concurrent cleanup.
|
||||
Preparation uses ordinary manifest transitions and invalidation.
|
||||
|
||||
The runner assigns every invocation a run-workspace identity but creates the
|
||||
physical run directory and its `runs/` parent only when an executing stage
|
||||
requires them. Fully reused invocations and cleanup-only invocations therefore do not accumulate
|
||||
empty run directories.
|
||||
physical stage run directory only when an executing stage requires it. Fully
|
||||
reused pipeline invocations and cleanup-only invocations do not accumulate
|
||||
empty run directories. Readiness probes create their separate invocation-scoped
|
||||
diagnostic directories when checks run, including during a reused preparation.
|
||||
|
||||
## Cleanup Semantics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user