fix(ci): unbreak bullock verdict script quoting - #2488
Conversation
An apostrophe inside ${question:-word} was treated as a bash quoting
char even under double quotes, leaving the last single-quote in the
88-line script unclosed. bash -n failed with 'unexpected EOF' on every
Bullock run, so the whole 'Act on Bullock's verdict' step died at
parse time before any instruction ran — including the clarifying
comment this exact line was meant to post, so summons that should
have gotten a question instead got a silent red run.
Reword to avoid the apostrophe; no behavior change once it parses.
Three independent hardenings found during an audit of the workflow: - Step-level (not just job-level) timeout on the Claude step. The job's 60min timeout CANCELS the job, and the verdict-acting step is guarded by !cancelled(), so a job timeout was a silent red run with no comment. A step timeout FAILS the step instead, which degrades cleanly into the existing no-valid-verdict comment path. - Widen the CI-file backstop from .github/workflows/ to all of .github/. GITHUB_TOKEN can push .github/actions/ composite actions even though it can't push workflows, and those actions execute in future CI runs with secrets present. Bullock has no legitimate reason to touch any CI file, so block it mechanically instead of relying only on the prompt's SECURITY section. - Skip the job when the summoning comment is from a Bot. GITHUB_TOKEN comments never retrigger workflows (GitHub anti-recursion), but GitHub-App comments do — a claude.yml review quoting "@bullock" would otherwise spin a runner and die red at the access gate.
|
Claude finished @ethicnology's task in 5m 19s —— View job Review of PR #2488 — bullock verdict script quoting fix + hardenings
Note on scope: the runner has a depth-1 checkout of the merge commit and network fetches are sandboxed, so I couldn't diff against the pre-merge state; I reviewed the full merged workflow, concentrating on the areas this PR touched (verdict script, feedback paths, VerdictThe headline fix is correct, and the hardenings are sound. The quoting bug is real bash behavior: inside The Findings1. [Low/Med — correctness] Fail-closed gap: a valid-but-non-object verdict crashes the script instead of posting the feedback comment — The validity check is if [ ! -f .bullock/verdict.json ] || ! jq -e 'type == "object"' .bullock/verdict.json >/dev/null 2>&1; then2. [Low — robustness] Late failures are still silent-red —
3. [Nit] Multi-line Only the first line of 4. [Nit] GNU Security assessment (no blockers)
Only finding 1 is worth a follow-up commit; the rest are polish. |
Two commits, independently revertable:
fix(ci): unbreak bullock verdict script quoting— the actual bug that made every@bullocksummon fail red.ci(bullock): harden feedback and CI-file guardrails— three hardenings found while auditing the workflow to root-cause the bug.