fix(boulder-state): treat plans without checkboxes as incomplete (fixes #2648)

GPT/Gemini Prometheus plans sometimes lack markdown checkboxes.
Previously getPlanProgress() returned isComplete=true for 0/0,
causing /start-work to skip Atlas execution.

Now total=0 correctly returns isComplete=false so start-work
detects the invalid plan format.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
YeonGyu-Kim
2026-03-18 12:06:24 +09:00
parent 55ac653eaa
commit ef8f22caba
2 changed files with 3 additions and 3 deletions

View File

@@ -351,7 +351,7 @@ describe("boulder-state", () => {
expect(progress.isComplete).toBe(true) expect(progress.isComplete).toBe(true)
}) })
test("should return isComplete true for empty plan", () => { test("should return isComplete false for plan with content but no checkboxes", () => {
// given - plan with no checkboxes // given - plan with no checkboxes
const planPath = join(TEST_DIR, "empty-plan.md") const planPath = join(TEST_DIR, "empty-plan.md")
writeFileSync(planPath, "# Plan\nNo tasks here") writeFileSync(planPath, "# Plan\nNo tasks here")
@@ -361,7 +361,7 @@ describe("boulder-state", () => {
// then // then
expect(progress.total).toBe(0) expect(progress.total).toBe(0)
expect(progress.isComplete).toBe(true) expect(progress.isComplete).toBe(false)
}) })
test("should handle non-existent file", () => { test("should handle non-existent file", () => {

View File

@@ -133,7 +133,7 @@ export function getPlanProgress(planPath: string): PlanProgress {
return { return {
total, total,
completed, completed,
isComplete: total === 0 || completed === total, isComplete: total > 0 && completed === total,
} }
} catch { } catch {
return { total: 0, completed: 0, isComplete: true } return { total: 0, completed: 0, isComplete: true }