4.1 KiB
Operations
This guide covers the implemented operator lifecycle for Narratio.
For field-level settings, see docs/config.md. For syntax/flags, see docs/cli.md.
Normal Workflow
- Ensure
pipeline.yml,campaign.yml, andsession.ymlare available. - Ensure session audio is available (local
audio_dir/audio_filesor S3 prefix). - Run:
narratio run 2026-04-04
- Inspect status:
narratio session status 2026-04-04
Publish Workflow
Publish is the stage that commits remote current state.
narratio publish 2026-04-04
Equivalent command:
narratio run-stage publish 2026-04-04 --force
Publish uploads:
- run history files under
{session_prefix}/runs/{run_id}/(excludingaudio/) - configured published outputs from
pipeline.publish.outputs previous/**cache files when presentcurrent/manifest.jsoncurrent/run_id.txtlast
current/run_id.txt is the remote commit marker.
Published Outputs and Locks
Published output behavior:
- outputs are source-based rules in
pipeline.publish.outputs. - required missing unlocked sources fail publish.
- optional missing unlocked sources are skipped.
- selected artifacts (
--artifacts) only filter configurednarratio.artifact.<key>output rules. - built-in transcript and bounds output rules are not filtered by
--artifacts.
Lock behavior:
- static locks:
pipeline.publish.locks. - mutable locks:
{session_prefix}/locks.yml. - effective lock set is static + mutable; static wins on duplicate sources.
- locked outputs are intentional skips and do not fail publish.
- lock commands mutate only remote mutable locks.
Restore Workflow
Use restore when local durable session state is missing/stale and committed remote current state is authoritative.
Preview:
narratio session restore 2026-04-04 --dry-run
Apply:
narratio session restore 2026-04-04
Default restore scope:
manifest.jsontranscripts/**artifacts/**previous/**when required by configured previous-session artifact inputs
Optional:
- add
--include-audioto restoreaudio/**.
Restore reads committed current state only (current/run_id.txt, current/manifest.json).
Workspace and State Layout
Session root:
{workspace.root}/work/{campaign}/{session_id}/
Durable session state:
manifest.jsoninputs/**audio/**transcripts/**artifacts/**previous/**reports/**logs/**config/**runs/**
Run-local stage layout:
runs/{run_id}/{stage}/outputs|logs|reports|config|scratch
Stages typically write run-local outputs first, then materialize canonical session outputs on success.
Resume and Force Rules
runandrun-stageskip succeeded stages unless--forceis set.resumestarts at the first non-succeeded stage.- force-rerunning an upstream succeeded stage marks downstream succeeded stages as
stale. --forcedoes not bypass publish locks.
Cleanup
Automatic post-publish cleanup is considered only when publish executes successfully and commits current state.
Config toggles:
pipeline.spool.delete_audio_after_publish=truepipeline.workspace.cleanup_after_publish=true
Manual cleanup:
narratio clean 2026-04-04
narratio clean --all
Cache is preserved by default. Use --clear-cache to remove matching S3 audio cache entries.
Failure and Recovery
After stage failure, Narratio keeps manifests and run-local files for inspection.
Standard recovery flow:
- inspect status:
narratio session status 2026-04-04
- if needed, inspect restore plan:
narratio session restore 2026-04-04 --dry-run
- fix root cause.
- continue with
resume, or rerun a stage with--forcethenresume.
Operational Caveats
- local and S3 audio modes are mutually exclusive.
- publish requires prerequisite stages through
analyzeto besucceeded. - restore requires configured object storage and committed current state.
session statusandsession artifacts --remoteboth report remote published-output availability when storage is configured.