Fix monitor-ci.sh doc/script mismatch: no --commit flag exists - #82
Open
jnasbyupgrade wants to merge 1 commit into
Open
Fix monitor-ci.sh doc/script mismatch: no --commit flag exists#82jnasbyupgrade wants to merge 1 commit into
jnasbyupgrade wants to merge 1 commit into
Conversation
CLAUDE.md and the /ci skill's own SKILL.md described a --commit SHA flag for monitor-ci.sh, but the script only ever took positional args ([repos] [branch] [sha_pgxntool_test] [sha_pgxntool]) - that flag text apparently crept in from ../ai/CLAUDE.md's general gh-CLI advice (gh run list/gh pr checks do take --commit) getting conflated with this script's own interface. An agent following the doc literally invoked `monitor-ci.sh --commit SHA`, which silently misparsed into REPOS="--commit" (falls through to the "both" default) with the SHA landing in BRANCH, polling a nonexistent branch for ~35 minutes before timing out. Also fixes SKILL.md's Usage line, which showed the wrong arg order/count (<branch> <pgxntool-sha> <pgxntool-test-sha>, missing the leading `repos` arg and with the two SHAs swapped relative to the script's real sha_pgxntool_test/sha_pgxntool order). Kept the positional interface rather than adding a --commit flag: "both" mode (the default) needs two separate SHAs for two separate repos' pushes, so a single --commit flag can't express the primary use case, and the positional form is already load-bearing in the release skill. Added a guard so a future --flag-style invocation fails fast with a usage message instead of silently misparsing and hanging until timeout.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.md and the
/ciskill's own SKILL.md described a--commit SHAflag for
monitor-ci.sh, but the script only ever took positional args(
[repos] [branch] [sha_pgxntool_test] [sha_pgxntool]). That flag textappears to have crept in from
../ai/CLAUDE.md's generalghCLI advice(
gh run list/gh pr checksdo take--commit) getting conflated withthis script's own interface.
Concretely, an agent following the doc literally invoked
monitor-ci.sh --commit SHA, which silently misparsed intoREPOS="--commit"(falls through to the "both" default case) with theSHA landing in
BRANCH— the script then polled a nonexistent branchfor ~35 minutes before failing.
Changes
CLAUDE.md: describe the actual positional interface instead of a--commitflag..claude/skills/ci/SKILL.md: same fix, plus a separate pre-existing bugin the same file — the "most reliable" usage example was missing the
leading
reposarg and had the two SHA args in the wrong orderrelative to the script's real
sha_pgxntool_test/sha_pgxntoolorder..claude/skills/ci/scripts/monitor-ci.sh: added a guard that fails fastwith a usage message on a
--flag-style invocation, instead of silentlymisparsing and hanging until timeout — a defense against this recurring
even if some other doc/agent assumes flag syntax again.
Why not add a
--commitflag insteadConsidered making the script match the (wrong) documented interface
instead of fixing the docs, per this project's usual preference for
fixing the more ergonomic direction. Decided against it:
bothmode — the default — needs two separate SHAs for two separaterepos' pushes, so a single
--commit SHAflag can't express theprimary use case at all.
/releaseskillinvokes
monitor-ci.shpositionally (.claude/skills/release/SKILL.md),and
SKILL.md's own documented 4-arg form already matches the scriptcorrectly (only its shorthand one-liner was wrong).
Test plan
bash -nsyntax check on the modified scriptmonitor-ci.sh --commit abc123def— confirmed it now failsfast with exit 64 and a clear usage message (the failure path this
bug caused)
monitor-ci.sh pgxntool-test <nonexistent-branch>(normalpositional form) — confirmed it proceeds past the new guard and
enters the real monitor loop unchanged (the success path)
SKILL.md, monitor-ci.sh) — none exists; they're agent-facing
docs/scripts outside the BATS test suite's scope