2026-05-18 22:03:59 -05:00
|
|
|
# Stage: prepare
|
|
|
|
|
|
|
|
|
|
## Purpose
|
2026-05-23 12:57:59 +00:00
|
|
|
Materialize canonical current-session inputs before processing stages.
|
2026-05-18 22:03:59 -05:00
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
## Inputs
|
|
|
|
|
- resolved `campaign.yml`, `session.yml`, and pipeline config
|
|
|
|
|
- stable input files (`speakers`, `autocorrect`, `glossary`)
|
2026-05-18 22:03:59 -05:00
|
|
|
- audio source:
|
2026-05-23 12:57:59 +00:00
|
|
|
- local `audio_dir`/`audio_files`, or
|
|
|
|
|
- S3 `audio_s3.prefix`
|
|
|
|
|
- enabled configured artifact input requirements for previous-session sources
|
|
|
|
|
|
|
|
|
|
## Outputs
|
|
|
|
|
- `inputs/campaign.yml`
|
|
|
|
|
- `inputs/session.yml`
|
|
|
|
|
- `inputs/pipeline.resolved.yml`
|
|
|
|
|
- `inputs/speakers.yml`
|
|
|
|
|
- `inputs/autocorrect.yml`
|
|
|
|
|
- `inputs/glossary.yml`
|
|
|
|
|
- `audio/*.flac`
|
|
|
|
|
- optional `previous/manifest.json`
|
|
|
|
|
- optional `previous/artifacts/**`
|
|
|
|
|
- deterministic `manifest.inputs` entries (checksums + provenance)
|
|
|
|
|
|
|
|
|
|
## Key Behavior
|
|
|
|
|
- validates required config/store state.
|
|
|
|
|
- enforces local audio vs S3 audio mutual exclusivity.
|
|
|
|
|
- materializes S3 audio through spool/cache-aware logic.
|
|
|
|
|
- scans enabled configured artifact inputs for `narratio.previous_session.artifact.*` requirements.
|
|
|
|
|
- when previous requirements exist:
|
2026-05-20 15:17:04 +00:00
|
|
|
- clears managed `previous/` state;
|
2026-05-23 12:57:59 +00:00
|
|
|
- builds previous-cache remote plan;
|
|
|
|
|
- downloads previous manifest/artifacts;
|
|
|
|
|
- records previous inputs in `manifest.inputs`.
|
2026-05-18 22:03:59 -05:00
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
Required previous-session inputs fail when unavailable; optional missing inputs are skipped.
|
2026-05-18 22:03:59 -05:00
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
## Invariants
|
|
|
|
|
- only `prepare` hydrates canonical `previous/` cache state.
|
|
|
|
|
- managed previous artifacts are stored under `previous/artifacts/**` without duplicate `artifacts/artifacts/` nesting.
|
|
|
|
|
- `manifest.inputs` ordering is deterministic (`kind`, `path`).
|