Run downstream preflight after input preparation

This commit is contained in:
2026-11-27 15:04:58 +00:00
parent 95aac6367f
commit 6fe5afcca4

View File

@@ -212,24 +212,49 @@ their own Audita configurations and overlays. Preserve Narratio's independent
downstream selectors; choosing a Narratio overlay does not automatically select
a D&D recipe. Narratio does not bundle or regenerate the upstream pipeline.
### Early Audita preflight
### Preflight after preparation
Run full native `audita preflight` through `internal/preflight` before expensive
pipeline work when polish is projected to execute. Use the same checking path
for `session validate` when polish is enabled. Retain the native provider smoke
checks: exercising selected profiles and credentials early is part of this
adoption, even though the checks may contact services and consume usage.
Execution follows configuration acquisition and validation, `prepare`, preflight,
then processing beginning with `transcribe`. Run full native `audita preflight`
through `internal/preflight` when polish is projected to execute. Move existing
Scriptorium execution preflight checks to the same boundary, retaining their
target selection and finding policies. Preparation may complete or be reused;
preflight runs before the first selected processing stage that follows it.
Preflight is an invocation check, not a durable stage with reusable success.
Check relevant work on each invocation because credentials and provider readiness
can change. Bounded runs that omit `prepare` use the verified prepared inputs
they will consume, without implicitly preparing again. Missing prerequisites
produce actionable errors. Invocations with no relevant work invoke no downstream
preflight. `session plan` remains subprocess-free.
Preparation, including audio downloads, occurs before these checks. This accepts
preparation costs in exchange for checking actual prepared inputs before expensive
processing. Retain native Audita provider smoke checks; they may contact services
and consume usage.
`session validate` uses the same downstream checking paths against existing
prepared inputs, with Audita checked when polish is enabled. If required prepared
inputs are unavailable, report that preparation is needed. Do not implicitly run
`prepare`, download audio, or create candidate glossaries. Basic configuration
checks can still report their findings. Full validation performs native destination
probes and provider calls and is not described as read-only or offline.
Maintain one representative synthetic transcript as a Narratio-owned integration
asset. Supply it with the actual prepared glossaries, selected configuration,
overlay, profiles, credentials, processing settings, and intended destinations.
Share glossary preparation and adapter invocation construction with production
execution. Create destination parents required for Audita's native probes.
Preflight must not promote outputs, mark processing complete, invalidate prior
completed results, or advance latest-attempt views.
asset, embedded in the executable with `go:embed`. Materialize it in invocation-
scoped temporary storage for Audita and clean it up afterward. It is not a shared
domain input or canonical session transcript. Supply it with the actual prepared
glossaries, selected configuration, overlay, profiles, credentials, processing
settings, and intended destinations.
Use ordinary prepared-input resolution and share adapter invocation construction
with production execution. Create destination parents required for Audita's
native probes. Preflight itself must not promote outputs, mark processing
complete, invalidate results, or advance latest-attempt views.
Any unsuccessful preflight stops the invocation with Audita's diagnostic
explanation. Consume native outcomes and captured diagnostics without parsing
Any unsuccessful preflight stops processing with Audita's diagnostic explanation.
Completed preparation remains available for reuse, and any normal invalidation
caused by preparation remains in effect. Preflight failure does not roll back
those transitions. Consume native outcomes and captured diagnostics without parsing
human-readable reports into a second readiness model. No upstream extension or
relaxation of Audita's required processing inputs is needed.
@@ -352,8 +377,11 @@ independently rebuilding it for each path.
Extend `internal/preflight` and the Audita adapter for native preflight with the
maintained synthetic transcript. Reuse execution selection and validation target
selection, subprocess supervision, credential forwarding, and diagnostics.
Integrate early glossary preparation and destination-parent creation with the
shared input/workspace owners while preserving stage and manifest lifecycle.
Keep glossary materialization in normal preparation and move execution preflight
to the shared boundary after preparation. Reuse verified prepared files rather
than introducing temporary candidate glossary handoffs. Integrate destination-
parent creation with the shared workspace owner and preserve preparation's
normal stage and manifest transitions.
Carry report/debug destinations and the enable-only debug choice through the
adapter boundary. Align report discovery and polish's expected-path checks with
@@ -390,8 +418,10 @@ supports independent report and debug destinations.
Link to the external recipe contract for its roles and model choices and to
Audita's native inspection/preflight documentation for diagnostics. Document
Narratio-specific projection, catalog selection, prepared-input, and force behavior
locally. Explain automatic provider checks, synthetic-transcript scope, and early
failure recovery in validation and execution guidance.
locally. Explain preflight timing, preparation reuse after failure, automatic
provider checks, synthetic-transcript scope, and validation's prepared-input
requirements and side effects in validation and execution guidance. Update the
existing Scriptorium preflight timing documentation with this coordinated change.
### Verification
@@ -411,10 +441,12 @@ and saved projections at the shared input boundary. Upstream owns the full nativ
inspection behavior; a representative controlled compatibility check is enough
at Narratio's boundary.
Verify early full-preflight invocation, provider checks remaining enabled,
shared execution/validation paths, and error propagation before expensive work
or invalidation of completed results. Exercise the maintained synthetic
transcript against a controlled Audita invocation and cover a fixture-dependent
Verify full preflight after completed or reused preparation, provider checks
remaining enabled, shared execution/validation paths, and failure before
processing. Cover bounded runs using existing inputs, missing prepared inputs,
and preservation of preparation results and normal invalidation after failure.
Validation must not implicitly prepare inputs. Exercise the maintained embedded
synthetic transcript against a controlled Audita invocation and cover a fixture-dependent
configuration failure without suppressing it. Default tests simulate provider
outcomes; they do not make paid smoke calls.