gsxdsm
f85acce548
FN-8361: guard planning recovery mutations atomically
Keep delayed planning recovery mutations conditional on the task still being in its planning stage.
- Add task-lock-backed conditional move and deletion APIs for planning recovery.
- Guard triage and self-healing writes, including prompt-file mutations, with live planning predicates.
- Cover conditional task operations and stale recovery behavior with regression tests.
Files changed:
docs/architecture.md | 2 +-
.../src/__tests__/delete-task-if-planning.test.ts | 56 +++++++++++++
.../src/__tests__/move-task-if-planning.test.ts | 43 ++++++++++
packages/core/src/store.ts | 22 ++++-
.../core/src/task-store/archive-lifecycle-2.ts | 35 ++++++++
packages/core/src/task-store/archive-lifecycle.ts | 65 +++++++++++++++
packages/core/src/task-store/moves.ts | 32 ++++++++
packages/engine/src/__tests__/self-healing.test.ts | 26 ++++++
packages/engine/src/__tests__/triage.test.ts | 14 +++-
packages/engine/src/self-healing.ts | 30 ++++++-
packages/engine/src/triage.ts | 95 ++++++++++++++++------
11 files changed, 383 insertions(+), 37 deletions(-)
Fusion-Task-Id: FN-8361
Fusion-Task-Lineage: d76f1805-d8c6-4b3f-9bc6-12907aae9733
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-19 15:05:31 -07:00
..
2026-07-19 15:05:31 -07:00
2026-07-18 00:52:59 -07:00
2026-07-18 13:53:58 -07:00
2026-06-08 15:19:27 -07:00
2026-07-18 16:08:14 -07:00