From 11d0b26858e75968107a1af08351da32f2b01166 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Tue, 17 Mar 2026 10:01:10 -0400 Subject: [PATCH] fix: use fixLevel 'all' in post-hook doctor after complete-slice to fix roadmap checkboxes (#839) (#847) --- src/resources/extensions/gsd/auto.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/resources/extensions/gsd/auto.ts b/src/resources/extensions/gsd/auto.ts index 1b57c7ca2..817337287 100644 --- a/src/resources/extensions/gsd/auto.ts +++ b/src/resources/extensions/gsd/auto.ts @@ -1381,10 +1381,13 @@ export async function handleAgentEnd( // fixLevel:"task" ensures doctor only fixes task-level issues (e.g. marking // checkboxes). Slice/milestone completion transitions (summary stubs, // roadmap [x] marking) are left for the complete-slice dispatch unit. + // Exception: after complete-slice itself, use fixLevel:"all" so roadmap + // checkboxes get fixed even if complete-slice crashed (#839). try { const scopeParts = currentUnit.id.split("/").slice(0, 2); const doctorScope = scopeParts.join("/"); - const report = await runGSDDoctor(basePath, { fix: true, scope: doctorScope, fixLevel: "task" }); + const effectiveFixLevel = currentUnit.type === "complete-slice" ? "all" as const : "task" as const; + const report = await runGSDDoctor(basePath, { fix: true, scope: doctorScope, fixLevel: effectiveFixLevel }); if (report.fixesApplied.length > 0) { ctx.ui.notify(`Post-hook: applied ${report.fixesApplied.length} fix(es).`, "info"); }