feat(release-status): add --watch, and find the tag's run by branch - #150
Conversation
|
Warning Review limit reachedNext included review available in 5 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
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 |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
release-status.sh looked for the tag's workflow run among the 12 newest runs of every workflow. Renovate, a merge queue and CI push the release run out of that window within hours, so the script reported "workflow : none" for releases whose run had succeeded: netresearch/raybeam v1.2.0 (run 32944806553) and netresearch/terraform-provider-ad v0.5.3, both on 2026-09-22. A failed release run falls out of the window the same way, and then nothing reports it. The lookup now asks GitHub for the tag's runs with --branch. Among them it prefers the run whose name says release or publish, because one tag push can also start CI. A failed lookup prints "unknown" rather than "none", so a broken query no longer reads as a missing run. A running run prints "in_progress/-": gh gives it conclusion "", and jq's `//` treats the empty string as present, so the old filter printed "in_progress/". --watch waits while the tag's publishing workflow has not completed, prints each state change to stderr, and then gives the normal verdict. The release side had no counterpart to pr-status.sh --watch, so every wait on a release run was a hand-written loop; one session on 2026-09-22 wrote the same loop four times. The new test stubs gh so that `run list` honours --branch and applies the --jq filter with real jq, behind twelve newer runs of another workflow. Each part was checked by breaking it: restoring the original query from main verbatim fails six cases, and dropping --branch, the release preference, the "unknown" fallback, the empty-conclusion handling or the --watch flag each fails at least one case, every run completing all 29 cases. Assisted-by: claude-code:claude-opus-5-5 Agent-Session: https://claude.ai/code/session_01GY5RqMQzgKbEvCALQ7r1ec Agent-Host: 0493f0 Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
90a52fe to
82584c1
Compare
|
|
Self-review: 82584c1 Copilot could not review (its review is the quota error, on an earlier head) and CodeRabbit refused this head as rate-limited, so the author reviewed it. Against real repositories. The script from this head, run with
The script on One unexplained answer. The first run against go-development-skill printed Known limit, not changed here. ofelia's tag-push Release run failed on a transient network error and was repeated by a manual dispatch on Code. Gate at this head: Assisted by claude-code:claude-opus-5-5 — Session |



Merging this makes
release-status.shfind a release's workflow run however many other runs happened after the tag, and adds--watch, which waits for that run to complete before giving the verdict. Until now the script reportedworkflow : nonefor releases whose run had succeeded, and would have missed a failed one the same way.The defect
The script took the 12 newest runs of every workflow and filtered them for the tag on its own side. Renovate, a merge queue and CI push a release run out of that window within hours. Measured on 2026-09-22: netresearch/raybeam v1.2.0, whose Release run 32944806553 succeeded, and netresearch/terraform-provider-ad v0.5.3 both printed
workflow : none.Changes
--branch "v$declared".unknownrather thannone, so a broken query does not read as a missing run.in_progress/-. gh gives itconclusion: "", which jq's//treats as present, so the old filter printedin_progress/.--watchwaits while the tag's publishing workflow has not completed, prints each state change to stderr and then gives the normal verdict.RELEASE_STATUS_WATCH_INTERVALandRELEASE_STATUS_WATCH_TIMEOUTtune it. The release side had no counterpart topr-status.sh --watch; one session wrote the same hand-made loop four times.SKILL.md,commands/release-status.mdandCHANGELOG.mdname the new option.Testing done
The new test section stubs
ghso thatrun listhonours--branchand applies the--jqfilter with real jq, with twelve newer runs of another workflow in front of the tag's runs. Those foreign runs arecancelled, so a foreign run cannot pass for the tag's successful one.Each part was checked by breaking it and watching the suite fail, every run completing all 29 cases:
main, restored verbatim--branchnoneconclusionnot handled--watchignoredThe watch test sets a 3-second timeout, so a broken watch fails the suite in seconds instead of holding it for the default 45 minutes — an earlier version of the test without it hung on exactly that. All eight files under
scripts/tests/pass, run the wayscript-tests.ymlruns them, andshellcheckreports nothing on the two changed scripts.Assisted by claude-code:claude-opus-5-5 — Session