FN-6244: protect active AI merge worktrees
Ensure AI merge cleanup only reaps stale, inactive temp worktrees. - Register live AI merge clean-room paths in the active session registry while merges run. - Add a minimum temp-worktree reap age and conservative lookup-error handling to sweep and prune paths. - Expand cleanup tests and release the repaired AI merge cleanup test from quarantine. Files changed: docs/architecture.md | 2 +- .../engine/src/__tests__/merger-ai-cleanup.test.ts | 38 ++++++++++++++-- .../__tests__/self-healing-tempdir-sweep.test.ts | 52 +++++++++++++++++++--- packages/engine/src/active-session-registry.ts | 2 +- packages/engine/src/merger-ai.ts | 29 +++++++++++- packages/engine/src/self-healing.ts | 28 +++++++++--- packages/engine/vitest.config.ts | 1 - scripts/lib/test-quarantine.json | 5 --- 8 files changed, 132 insertions(+), 25 deletions(-) Fusion-Task-Id: FN-6244 Fusion-Task-Lineage: 5c8ced12-d38f-4e45-9ea0-119b3236a2cb
This commit is contained in:
@@ -11,11 +11,6 @@
|
||||
"reason": "Flake: vi.mock('node:child_process') occasionally doesn't take under workspace-concurrent runs, letting real git binary leak and report staged files unrelated to test scope (trips FileScopeViolationError). Same logic covered by real-git fixture tests in reliability-interactions/workflow-and-file-scope. FN-6206.",
|
||||
"quarantinedAt": "2026-06-10"
|
||||
},
|
||||
{
|
||||
"file": "packages/engine/src/__tests__/merger-ai-cleanup.test.ts",
|
||||
"reason": "Flake observed during FN-6206 verification: `pruneExistingAiMergeWorktrees skips active-session paths` failed in full `pnpm --filter @fusion/engine test` runs while the file passed standalone, indicating suite-order/concurrency sensitivity. Follow-up FN-6207.",
|
||||
"quarantinedAt": "2026-06-10"
|
||||
},
|
||||
{
|
||||
"file": "packages/engine/src/__tests__/self-healing-already-merged.real-git.test.ts",
|
||||
"reason": "Flake observed during FN-6226 verification: full `pnpm --filter @fusion/engine test` expected two run-audit events but saw four after unrelated real-git/self-healing cleanup activity. The failure is outside fast-mode workflow changes and indicates suite-order/temp-state sensitivity.",
|
||||
|
||||
Reference in New Issue
Block a user