Coordinate workspace cleanup with active operations

This commit is contained in:
2026-12-01 20:17:27 +00:00
parent 038105ece9
commit 9e3fc25fdd
15 changed files with 358 additions and 32 deletions

View File

@@ -137,7 +137,7 @@ not rerun; otherwise it uses a synthetic input. These checks do not establish
real-transcript feasibility, editorial quality, or future provider availability.
See [Audita](integrations/audita.md) and [Scriptorium](integrations/scriptorium.md).
The session lock covers preparation, probes, and finalization. Probe diagnostics
The workspace lock covers preparation, probes, and finalization. Probe diagnostics
under `runs/` are disposable and can be removed by a later authorized cleanup;
prepared inputs remain durable. Preflight itself does not run cleanup or rotate
processing-stage diagnostic views. See [cleanup](#cleanup).
@@ -737,6 +737,9 @@ the session workload.
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.
Mutating cleanup waits for the same workspace lock used by runs, preflight, and
restore. Waiting can be cancelled; dry-run inspection does not take the lock.
The lock file remains at `<workspace.root>/.lock` after cleanup.
Automatic cleanup requires `workspace.cleanup_after_publish=true` and successful
publication evidence. When selected, it removes the entire session `runs/` tree,