Harden prepare and transcribe transitions

This commit is contained in:
2026-08-10 21:53:54 +00:00
parent 9da2c1e144
commit 702f622e18
8 changed files with 165 additions and 22 deletions

View File

@@ -30,10 +30,12 @@ Materialize canonical current-session inputs before processing stages.
- validates required config/store state.
- enforces local audio vs S3 audio mutual exclusivity.
- rejects duplicate explicit local audio sources after resolution.
- gives distinct local source paths with the same basename deterministic unique
prepared filenames so neither source is overwritten.
- materializes S3 audio through spool/cache-aware logic.
- scans enabled configured artifact inputs for `narratio.previous_session.artifact.*` requirements.
- when previous requirements exist:
- clears managed `previous/` state;
- clears managed `previous/` state on every invocation, then, when requirements exist:
- resolves the pointer-selected previous source through the shared resolver;
- downloads previous manifest/artifacts;
- records previous inputs in `manifest.inputs`.
@@ -47,6 +49,7 @@ mapping, while the isolated legacy reader rejects ambiguous fallback matches.
- only `prepare` hydrates canonical `previous/` cache state.
- managed previous artifacts are stored under `previous/artifacts/**` without
duplicate `artifacts/artifacts/` nesting.
- managed `previous/` state represents only the current requirement set.
- `manifest.inputs` ordering is deterministic (`kind`, `path`).
## Related Contracts And Tests

View File

@@ -15,16 +15,19 @@ Generate raw per-speaker transcripts from prepared audio using WhisperX.
## Key Behavior
- discovers prepared audio from manifest inputs or canonical audio directory.
- derives speaker ID from `.flac` basename.
- derives the transcript identity from the prepared `.flac` filename.
- dispatches WhisperX requests through a bounded worker pool.
- validates each output as JSON.
- writes run-local outputs then materializes canonical transcript outputs.
- writes run-local outputs then materializes canonical transcript outputs only
after every planned request succeeds.
## Invariants
- speaker basenames must be unique.
- prepared audio identities must be unique; prepare disambiguates distinct
source paths that share a basename.
- output path returned by adapter must match requested output path.
- each successful output is validated before stage success.
- each successful output is validated before stage success, and cancellation or
incomplete dispatch cannot be reported as a successful result.
## Related Contracts And Tests

View File

@@ -840,6 +840,8 @@ cancellation at each phase, partial completion, duplicate source, same-basename
distinct source, retry, and no-false-manifest tests. This is the primary TST-008
stage; Stage 25 adds output/resolver boundary cases.
**Status:** Completed.
## Stage 25 — Enforce output-path authority and shared singleton resolution
**Read first:** `audit-findings.md` lines 33063330 (ARC-006), 35153537