From a30e837d9ecf8c4e3cb964510d5e54f9b96e77ca Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 7 Apr 2026 07:41:10 -0500 Subject: [PATCH] fix(state): skip ghost check for queued milestones in registry build The ghost milestone check (#3645) was eliminating queued shell milestones before the deferred-shell logic (#3470) could handle them, causing queued milestones to vanish from the registry entirely. --- src/resources/extensions/gsd/state.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/resources/extensions/gsd/state.ts b/src/resources/extensions/gsd/state.ts index 4f66bb12b..db97248f6 100644 --- a/src/resources/extensions/gsd/state.ts +++ b/src/resources/extensions/gsd/state.ts @@ -468,9 +468,10 @@ export async function deriveStateFromDb(basePath: string): Promise { continue; } - // Ghost milestone check: no slices in DB AND no substantive files on disk + // Ghost milestone check: no slices in DB AND no substantive files on disk. + // Skip queued milestones — they are handled by the deferred-shell logic below (#3470). const slices = getMilestoneSlices(m.id); - if (slices.length === 0 && !isStatusDone(m.status)) { + if (slices.length === 0 && !isStatusDone(m.status) && m.status !== 'queued') { // Check disk for ghost detection if (isGhostMilestone(basePath, m.id)) continue; }