ci(publish): push next-dev version bump as version-bot to bypass main ruleset#577
Conversation
… ruleset
The "Bump version for next development cycle" step in publish.yml pushed the
`chore: bump version` commit to main with the default GITHUB_TOKEN, which is not
a bypass actor on the org-level `failproofai-rules` ruleset (pull request + 1
review required on main). GitHub rejected the push with GH013 ("Changes must be
made through a pull request"), so every release left package.json un-bumped.
Mint a token for the version-bot GitHub App — already a bypass actor on that
ruleset and the same app/secrets bump-platform-submodule.yml uses — and persist
it through actions/checkout so `git push origin main` authenticates as the
bypass actor. The commit keeps its [skip ci] marker, so pushing as an App
(unlike GITHUB_TOKEN) does not spuriously trigger downstream workflows.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S2iLV7NxXH9UY4ZMYLzzcN
📝 WalkthroughWalkthroughThe publish workflow now authenticates checkout and subsequent version-bump pushes with a ChangesPublish workflow authentication and release metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant PublishWorkflow
participant GitHubApp
participant Repository
PublishWorkflow->>GitHubApp: Mint version-bot token
GitHubApp-->>PublishWorkflow: Return App token
PublishWorkflow->>Repository: Checkout with persisted token
PublishWorkflow->>Repository: Push version bump as version-bot
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
|
Automated code review started - full review. Results will be posted here. |
The post-publish auto-bump repaired in the previous commit had been failing to push to main (GH013) for several releases, so main's package.json drifted to 0.0.14-beta.1 while npm published through 0.0.14-beta.2. Set it to 0.0.14-beta.3 — the next development version the now-fixed automation carries forward — and re-file the CHANGELOG under a matching heading. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S2iLV7NxXH9UY4ZMYLzzcN
|
⏳ Automated review in progress — Phase 2 analysis complete. Starting Phase 3: Build & Test. |
|
✅ Build & test complete. Results:
Moving to Phase 4 — posting the full review. |
hermes-exosphere
left a comment
There was a problem hiding this comment.
Automated review: Approved. No issues found — CI pipeline fix correctly mints a version-bot token to bypass the org-level ruleset, matching the existing bump-platform-submodule pattern. All 2328 tests passing.
Code Review SummaryExecutive SummaryPR #577 fixes the npm publish workflow: the post-publish version bump push to main was rejected because the default GITHUB_TOKEN is not a bypass actor on the org-level failproofai-rules ruleset. The fix mints a version-bot GitHub App token and persists it through actions/checkout, mirroring the pattern from bump-platform-submodule.yml. 12 lines of YAML, 1 changelog entry, no source changes. Verdict: APPROVEDEvidence:
Deep Analysis Findings:
No Issues Found. The change is correct, minimal, and well-commented. Suggestions (non-blocking):
Automated review - 2026-07-20 |
hermes-exosphere
left a comment
There was a problem hiding this comment.
Automated review: Approved. ✅
Problem
The
Publish to npmworkflow's final step, "Bump version for next development cycle", doesgit push origin mainto commit the next-beta.Nversion back topackage.json. That push is rejected:The org-level
failproofai-rulesruleset requires a pull request + 1 approving review onmain. The step pushed with the ambientGITHUB_TOKEN, which is not a bypass actor on that ruleset — so the automatedchore: bump version …commit was declined and every release leftpackage.jsonun-bumped. As a resultmaindrifted to0.0.14-beta.1while npm published through0.0.14-beta.2.Fix (workflow)
Mirror the pattern
bump-platform-submodule.ymlalready uses: mint a token for the version-bot GitHub App, which is a bypass actor on the samefailproofai-rulesruleset.Mint version-bot app tokenstep (actions/create-github-app-token@v3) using the existingVERSION_BOT_APP_ID/VERSION_BOT_PRIVATE_KEYsecrets.actions/checkout(token: ${{ steps.app-token.outputs.token }}) so the latergit push origin mainauthenticates as the bypass actor. This avoids the persisted-credential (extraheader) gotcha a per-push URL token would hit.The bump commit keeps its
[skip ci]marker. That matters more now: an App-token push (unlike aGITHUB_TOKENpush) can trigger workflows, and[skip ci]keeps the version-only bump from spuriously firingci.yml/bump-platform-submodule.yml.Version reconcile
Because the auto-bump had been failing,
main'spackage.jsonwas stale at0.0.14-beta.1. This PR also sets it to0.0.14-beta.3— the next development version the now-fixed automation carries forward after the0.0.14-beta.2release — and re-files the CHANGELOG under a matching## 0.0.14-beta.3heading (per repo convention: top heading matchespackage.json).Why no test
There is no GitHub-Actions-workflow test harness in
__tests__/(only hook-policy tests), and the siblingbump-platform-submodule.ymlapp-token usage has no test either. YAML validity was checked locally (yaml.safe_load). The real verification is the next release run pushing the bump cleanly. The CIqualityjob's version-consistency check is unaffected (packages/does not exist, so it no-ops).Scope
CI/release-pipeline + a one-line
package.jsonversion reconcile. No source, CLI, public API, or docs surface changes.🤖 Generated with Claude Code
https://claude.ai/code/session_01S2iLV7NxXH9UY4ZMYLzzcN
Summary by CodeRabbit
main’spackage.jsonversion to match what was published.CHANGELOG.mdwith the publishing workflow fix and version reconciliation details.