From f8e98de19fd275f3868fd98420c1c4e0ec5844c1 Mon Sep 17 00:00:00 2001 From: Tibsfox Date: Mon, 6 Apr 2026 22:42:17 -0700 Subject: [PATCH] fix(test): update stuck-planning test to expect executing after reconciliation The fix reconciles plan-file tasks into the DB when the planner skips persistence, so the phase correctly advances to executing instead of remaining stuck in planning. Update the known-issue test to expect the fixed behavior. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../tests/state-machine-full-walkthrough.test.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts b/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts index b9d14baa6..f1b66acb9 100644 --- a/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts +++ b/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts @@ -1040,8 +1040,8 @@ describe("state-machine-full-walkthrough", () => { // FAILURE MODES: What happens when things go wrong // ═══════════════════════════════════════════════════════════════════════════ - describe("Failure: DB has slice but no task rows (partial migration)", () => { - test("DB tasks empty but PLAN on disk has tasks → wrong phase (planning)", async () => { + describe("Recovery: DB has slice but no task rows (partial migration)", () => { + test("DB tasks empty but PLAN on disk has tasks → reconciles to executing", async () => { const base = createFixtureBase(); const dbPath = join(base, ".gsd", "gsd.db"); openDatabase(dbPath); @@ -1056,11 +1056,10 @@ describe("state-machine-full-walkthrough", () => { invalidateStateCache(); const state = await deriveStateFromDb(base); - // BUG: Returns "planning" because getSliceTasks() returns [] - // and line 703 treats empty tasks as "no tasks defined". - // PLAN file on disk has T01/T02 but DB doesn't know about them. - assert.equal(state.phase, "planning", - "KNOWN ISSUE: DB empty tasks → planning even though PLAN has tasks on disk"); + // FIX (#3600): plan-file tasks are now reconciled into the DB, + // so the phase correctly advances to executing instead of planning. + assert.equal(state.phase, "executing", + "reconciled plan-file tasks → executing (not stuck in planning)"); }); });