fix(core): legacy adoption preserves reviewing/landing — restart no longer pauses a live AI merge

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-07-31 17:50:33 -07:00
parent e56116d8e9
commit 48b00acc7b
3 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
---
"@runfusion/fusion": patch
---
summary: A restart during an AI merge no longer auto-pauses the task — reviewing/landing are recognized as live statuses.
category: fix
dev: The KTD-8 legacy-adoption table preserved merging/-pr/-fix but missed the family's other two live members, so startup adoption parked a mid-landing task paused ("legacy-adoption-unmappable: landing"). Both now preserve; self-healing's stale-merge sweeps remain the recovery owner.

View File

@@ -135,7 +135,10 @@ describe("resolveLegacyStatusAdoption — every legacy (status) resumes owned",
its own crash-recovery owner; adoption must never touch them. its own crash-recovery owner; adoption must never touch them.
*/ */
it("live-writer statuses are preserved — planning/queued/merge pipeline/stuck-killed (FN-8504)", () => { it("live-writer statuses are preserved — planning/queued/merge pipeline/stuck-killed (FN-8504)", () => {
for (const s of ["planning", "queued", "merging", "merging-pr", "merging-fix", "stuck-killed", "needs-replan"]) { for (const s of ["planning", "queued", "merging", "merging-pr", "merging-fix",
// FNXC:LegacyAdoption 2026-08-01-00:55: reviewing/landing are the same live merge family —
// missing them parked a healthy landing task paused at restart (FN-8635).
"reviewing", "landing", "stuck-killed", "needs-replan"]) {
expect(resolveLegacyStatusAdoption(s)?.kind, s).toBe("preserve"); expect(resolveLegacyStatusAdoption(s)?.kind, s).toBe("preserve");
} }
}); });

View File

@@ -94,6 +94,18 @@ export const LEGACY_STATUS_ADOPTION: Readonly<Record<string, LegacyAdoptionActio
"merging": { kind: "preserve", note: "live merge-active status — self-healing owns stale-merge recovery" }, "merging": { kind: "preserve", note: "live merge-active status — self-healing owns stale-merge recovery" },
"merging-pr": { kind: "preserve", note: "live merge-active status — self-healing owns stale-merge recovery" }, "merging-pr": { kind: "preserve", note: "live merge-active status — self-healing owns stale-merge recovery" },
"merging-fix": { kind: "preserve", note: "live merge-active status — self-healing owns stale-merge recovery" }, "merging-fix": { kind: "preserve", note: "live merge-active status — self-healing owns stale-merge recovery" },
/*
FNXC:LegacyAdoption 2026-08-01-00:55 (live incident — FN-8635 paused mid-landing):
`reviewing` and `landing` are the OTHER TWO members of the live active-merge family
(active-merge-status.ts: AI merge holds task.status at reviewing/landing for most of the merge
window). The table adopted merging/-pr/-fix in the FN-8504 fix and missed these siblings, so a
restart during an AI merge parked the task `paused: legacy-adoption-unmappable: landing` — the
engine auto-pausing a HEALTHY merge, which the operator rightly flagged ("engine shouldn't pause
automatically"). Same recovery owner as the merging trio: self-healing's interrupted/stale-merge
sweeps. If the family grows again, grow this table with it — the census cannot see this map.
*/
"reviewing": { kind: "preserve", note: "live merge-active status (AI merge review window) — self-healing owns stale-merge recovery" },
"landing": { kind: "preserve", note: "live merge-active status (AI merge landing window) — self-healing owns stale-merge recovery" },
// ── Live human / terminal gates — do NOT disturb ────────────────────────── // ── Live human / terminal gates — do NOT disturb ──────────────────────────
"awaiting-approval": { kind: "preserve", note: "manual plan approval gate" }, "awaiting-approval": { kind: "preserve", note: "manual plan approval gate" },
"awaiting-user-input": { kind: "preserve", note: "awaiting operator input" }, "awaiting-user-input": { kind: "preserve", note: "awaiting operator input" },