gsxdsm
c7779e44ac
FN-9055: guard archive disposal of live workspace worktrees
Prevent archive cleanup from removing worktrees that still belong to live tasks.
- Add shared archive liveness evaluation and transactional refusal guards.
- Require CLI and extension archive operations to refuse live tasks unless a human uses --force.
- Protect baseline archive worktree disposal and cover CLI, core, and engine paths with tests.
Files changed:
.changeset/fn-9055-archive-live-worktree-guard.md | 7 ++
docs/cli-reference.md | 4 +-
docs/task-management.md | 4 +-
.../extension-task-archive-live-guard.test.ts | 82 +++++++++++++++++++
packages/cli/src/bin.ts | 6 +-
packages/cli/src/commands/__tests__/task.test.ts | 66 ++++++++++++++-
packages/cli/src/commands/task.ts | 49 +++++++++---
packages/cli/src/extension.ts | 25 ++++--
.../src/__tests__/archive-live-task-guard.test.ts | 70 ++++++++++++++++
.../postgres/archive-live-task-fence.pg.test.ts | 69 ++++++++++++++++
.../src/__tests__/task-archive-liveness.test.ts | 19 +++++
packages/core/src/index.ts | 10 +++
packages/core/src/store.ts | 4 +-
.../core/src/task-store/archive-lifecycle-2.ts | 27 +++++--
packages/core/src/task-store/archive-lifecycle.ts | 20 ++---
.../src/task-store/async/async-archive-lineage.ts | 17 +++-
packages/core/src/tasks/task-archive-liveness.ts | 56 +++++++++++++
...chive-baseline-disposer-live-task-guard.test.ts | 93 ++++++++++++++++++++++
.../healing/archive-worktree-disposer-install.ts | 15 +++-
19 files changed, 592 insertions(+), 51 deletions(-)
Fusion-Task-Id: FN-9055
Fusion-Task-Lineage: 08644626-cc61-4854-abb9-5b415ddc9491
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 00:35:12 -07:00
..
2026-08-15 00:35:12 -07:00
2026-08-13 01:41:54 -07:00
2026-08-15 00:35:12 -07:00
2026-08-15 00:02:52 -07:00
2026-08-13 01:41:54 -07:00
2026-08-13 01:41:54 -07:00
2026-08-15 00:35:12 -07:00
2026-08-14 23:33:36 -07:00
2026-08-13 01:41:54 -07:00
2026-08-13 01:41:54 -07:00
2026-07-27 19:40:08 -07:00
2026-08-13 01:41:54 -07:00