Upgraded the restore command to download previous session artifcats when configured as inputs for the current session analyze stage

This commit is contained in:
2026-05-21 23:31:01 -05:00
parent 083c01cfa0
commit 782d0cf3b9
10 changed files with 958 additions and 427 deletions

View File

@@ -62,9 +62,11 @@ narratio analyze --session-id 2026-04-04
Restore source-of-truth:
- remote commit marker: `current/run_id.txt`
- remote current manifest: `current/manifest.json`
- configured previous-session requirements are reconstructed from the previous session's remote `current/` state, not from archived `previous/**` objects in the current session.
Restore default scope:
- includes `manifest.json`, `transcripts/**`, `artifacts/**`, `previous/**`
- includes `manifest.json`, `transcripts/**`, and `artifacts/**` from the current session archive.
- includes `previous/**` only when configured previous-session artifact inputs require it; restore hydrates those files the same way `prepare` would.
- includes `audio/**` only with `--include-audio`
- excludes `runs/**`, `logs/**`, `reports/**`, `config/**`, `inputs/**`, and `current/**` (except remote `current/manifest.json` as source)
@@ -130,9 +132,10 @@ Configured artifact source reuse:
Canonical previous-session input behavior:
- canonical sources use `narratio.previous_session.artifact.<artifact_key>`.
- these inputs are hydrated by `prepare`, not `analyze`.
- these inputs are hydrated by `prepare` and by `restore`; `analyze` expects the local previous cache to already exist.
- if analyze fails due to missing canonical previous cache, rerun:
- `narratio run-stage --session-id <id> --force prepare`
- or `narratio restore --session-id <id>` when remote archive current state is authoritative.
## Remote archive layout and publish contract