Document durable session cleanup

This commit is contained in:
2026-11-30 14:08:28 +00:00
parent e9d74a7de0
commit 719a6839d1
14 changed files with 84 additions and 60 deletions

View File

@@ -287,7 +287,7 @@ Choose the narrowest workflow that matches the intended replacement:
| Intent | Command | Preserved and rebuilt state |
| --- | --- | --- |
| Rebuild analysis only | [`narratio run 2026-04-04 --stage analyze --force`](./cli.md#run) | Preserves transcripts and the current extraction bundle; force-runs selected analysis artifacts and their required analysis prerequisites. |
| Rebuild analysis only | [`narratio run 2026-04-04 --stage analyze --force`](./cli.md#run) | Preserves transcripts and current extraction products; force-runs selected analysis artifacts and their required analysis prerequisites. |
| Rebuild extraction and analysis | [`narratio artifacts regenerate 2026-04-04`](./cli.md#artifacts-regenerate) | Preserves transcripts; force-runs the complete configured extraction bundle, then selected analysis. `--artifacts` narrows analysis only. |
| Continue bounded work normally | [`narratio run 2026-04-04 --from extract --through analyze`](./cli.md#run) | Uses ordinary resume decisions: current extraction and analysis can be skipped, while incomplete or obsolete work runs. |
@@ -380,7 +380,7 @@ not create a separate workspace or retain a separate current extraction result.
Narratio cannot observe edits inside Notarius configuration behind an unchanged
selector. Force extraction after such an edit when a replacement is intended.
Use `artifacts regenerate` when both extraction and analysis must be rebuilt;
use `run SESSION --stage analyze --force` when the existing extraction bundle
use `run SESSION --stage analyze --force` when the existing extraction products
should be preserved. Field
semantics belong in [Configuration](./config.md#notarius-configuration-overlay),
with Audita selectors covered under
@@ -419,8 +419,8 @@ The final trimmed transcript and content-identified snapshots under
Successful configured lanes become flat `artifacts/<name>.json` products and
`narratio.extraction.<name>` sources. The original bundle remains under the
producing run for evidence; it is not implicitly published. A failed replacement
does not make the earlier extraction record current. Native fallback counts and
producing run until authorized cleanup removes it; it is not implicitly
published. A failed replacement does not make the earlier extraction record current. Native fallback counts and
readiness warnings remain visible in command reports.
Narratio can reuse completed extraction without starting Notarius. When extraction
@@ -486,7 +486,7 @@ Run-local diagnostics are:
Audita reporting is enabled, alongside captured streams and invocation records
- `runs/{run_id}/extract/logs/notarius.report.json`
- `runs/{run_id}/extract/logs/notarius.stderr.log`
- `runs/{run_id}/extract/notarius-output/` for retained original bundles
- `runs/{run_id}/extract/notarius-output/` for original bundles until cleanup
The run upload is an allowlist derived from the session manifest's declared
current-run outputs, logs, and generated configurations, not a workspace scan.
@@ -495,7 +495,7 @@ declared source is opened without following symlinked ancestors or the leaf,
verified as a regular file, and streamed from that verified descriptor.
Unlisted files and unsafe entries are never uploaded; a run with no declared
current-run diagnostics uploads no run-local files. No distinguished diagnostic
file is uploaded. The durable bundle is never scanned for implicit publication;
file is uploaded. The original bundle is never scanned for implicit publication;
only lanes named by explicit `pipeline.publish.outputs` rules are uploaded.
To inspect a published polish report remotely, read its declared object under
the run archive's `polish/logs/` prefix. Session restore does
@@ -673,8 +673,8 @@ reference snapshots live under `inputs/references/`.
Each attempted stage writes actual logs and debug capture beneath its run.
`logs/<stage>` and `debug/<stage>` are relative links to the latest attempt,
including failed attempts; skipped work does not rotate them. Restore writes its
own diagnostic attempt. Original Notarius bundles remain in the producing run.
Automatic cleanup retains current view targets and session-durable bundle evidence.
own diagnostic attempt. Original Notarius bundles remain in the producing run
until authorized cleanup. The `runs/` directory is created on demand.
Remote audio is downloaded to a temporary sibling and verified before replacing
its single prepared `audio/` copy. Restore follows the same layout. Subprocess
@@ -727,10 +727,18 @@ Use `narratio session clean SESSION` to remove an entire local session, or
`narratio session clean --all` for all local sessions. Add `--dry-run` to inspect
planned targets. These commands do not delete subprocess caches or remote data.
Automatic run cleanup requires `workspace.cleanup_after_publish` and successful
publication evidence. It preserves current log/debug targets and retained Notarius
bundle evidence. A failed cleanup can be retried without republishing; bounded
runs ending before cleanup do not execute it. See [cleanup internals](internal/stage-cleanup.md).
Automatic cleanup requires `workspace.cleanup_after_publish=true` and successful
publication evidence. When selected, it removes the entire session `runs/` tree,
including older failures, restore attempts, probes, logs, debug captures, and
original Notarius bundles. Managed stage and restore views are removed as well.
Canonical products, prepared inputs, manifests, other sessions, subprocess
state and caches, and remote objects remain. Set the option to `false` to keep
run history and diagnostics.
A failed cleanup is reported and may have removed some files already. Retry the
cleanup stage or a full run without republishing. Bounded runs ending before
cleanup do not execute it; their new attempts remain until a later authorized
cleanup. See [cleanup internals](internal/stage-cleanup.md).
## Operational Caveats