feat(FN-3951): fix merge recovery re-enqueue guard to prevent auto-merge lo

Hardens merge recovery logic (FN-3951) with guards against invalid state transitions during terminal merge errors, backed by new tests in `merge-error-recovery.test.ts` and `self-healing.test.ts`, and documented in the task management docs.

Fusion-Task-Id: FN-3951
This commit is contained in:
Fusion
2026-05-10 16:57:13 -07:00
committed by gsxdsm
parent 32e76c8cc0
commit 48aea5001b
6 changed files with 108 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
---
"@runfusion/fusion": patch
---
Prevent auto-merge loops on terminal invalid done-transition failures during merge recovery.
When merge finalization encounters a non-recoverable state-machine error like
`Invalid transition: 'todo' → 'done'`, auto-recovery now keeps that task parked
in a stable failed review state instead of repeatedly re-enqueuing it for merge.
The merge-confirmed fast path also now re-checks task ownership and skips
finalization if the task has already left `in-review`.