From 05092ff3690cf216096284ad59fd493f89c6281f Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Tue, 1 Sep 2026 00:55:44 -0400 Subject: [PATCH] fix(#4113): add no-op to empty then-body in chunked-planning-mode.md's outline resume-check (#4125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(#4113): add no-op to empty then-body in chunked-planning-mode.md's outline resume-check The `### 8.5.1 Outline Phase` resume-detection `if` block only contained a comment in its `then` clause, which is a syntax error under both bash and zsh if executed literally. The workflow ShellCheck lint added by #4109 already flags this (SC1009/1048/1072/1073/2105) but the findings were masked by matching entries in the pre-existing-findings baseline; those five entries are removed here so a regression re-surfaces as a new failure instead of being silently re-absorbed. * chore: backfill changeset PR number for #4125 * fix(#4113): fix second empty-then/continue-outside-loop defect surfaced by baseline cleanup Removing the 5 stale baseline entries for chunked-planning-mode.md in the prior commit unmasked a second, genuinely separate ShellCheck finding (SC2105) in a different fenced block of the same file: a bare `continue` outside any bash loop in the ### 8.5.2 per-plan resume-check. Same root cause class as the original bug (pseudocode fenced as literal bash) — fixed the same way, with a `:` no-op preserving the documentation. --------- Co-authored-by: sim --- .changeset/steady-outline-marker.md | 5 ++++ .../plan-phase/steps/chunked-planning-mode.md | 4 +-- .../lint-workflow-shellcheck-baseline.json | 25 ------------------- 3 files changed, 7 insertions(+), 27 deletions(-) create mode 100644 .changeset/steady-outline-marker.md diff --git a/.changeset/steady-outline-marker.md b/.changeset/steady-outline-marker.md new file mode 100644 index 000000000..90154b4a1 --- /dev/null +++ b/.changeset/steady-outline-marker.md @@ -0,0 +1,5 @@ +--- +type: Fixed +pr: 4125 +--- +**`/gsd-plan-phase --chunked`'s outline resume-check no longer has a syntax error** — the `### 8.5.1 Outline Phase` step's resume-detection block had an empty `then` clause (only a comment, no command), which is invalid under both bash and zsh if executed literally. (#4113) diff --git a/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md b/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md index f9bedc439..163a7ed1f 100644 --- a/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +++ b/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md @@ -17,7 +17,7 @@ the `## OUTLINE COMPLETE` marker (written by the outline agent — #2762), skip ```bash OUTLINE_FILE="${PHASE_DIR}/${PADDED_PHASE}-PLAN-OUTLINE.md" if [[ -f "$OUTLINE_FILE" ]] && grep -q "^## OUTLINE COMPLETE" "$OUTLINE_FILE"; then - # reuse existing outline — skip to 8.5.2 + : # reuse existing outline — skip to 8.5.2 fi ``` @@ -67,7 +67,7 @@ For each plan entry extracted from `PLAN-OUTLINE.md`: ```bash PLAN_FILE="${PHASE_DIR}/${plan_id}-PLAN.md" if [[ -f "$PLAN_FILE" ]] && head -1 "$PLAN_FILE" | grep -q '^---' && [[ "$ARGUMENTS" != *"--reviews"* ]]; then - continue # resume safety — NOT under --reviews (replan) + : # resume safety — skip this plan, continue to next plan entry — NOT under --reviews (replan) fi ``` diff --git a/scripts/lint-workflow-shellcheck-baseline.json b/scripts/lint-workflow-shellcheck-baseline.json index bd0fb65c3..778dbeb4d 100644 --- a/scripts/lint-workflow-shellcheck-baseline.json +++ b/scripts/lint-workflow-shellcheck-baseline.json @@ -629,31 +629,6 @@ "code": "2235", "message": "Use { ..; } instead of (..) to avoid subshell overhead." }, - { - "file": "gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md", - "code": "1009", - "message": "The mentioned syntax error was in this if expression." - }, - { - "file": "gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md", - "code": "1048", - "message": "Can't have empty then clauses (use 'true' as a no-op)." - }, - { - "file": "gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md", - "code": "1072", - "message": "Unexpected keyword/token. Fix any mentioned problems and try again." - }, - { - "file": "gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md", - "code": "1073", - "message": "Couldn't parse this then clause. Fix to allow more checks." - }, - { - "file": "gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md", - "code": "2105", - "message": "continue is only valid in loops." - }, { "file": "gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md", "code": "2086",