Skip to content

fix(ci): commit tool bumps through createCommitOnBranch so they are signed - #76

Merged
garymike merged 1 commit into
mainfrom
fix/tool-bump-signed-commits
Sep 30, 2026
Merged

garymike merged 1 commit into
mainfrom
fix/tool-bump-signed-commits

Conversation

@garymike

Copy link
Copy Markdown
Owner

The weekly bump branch could never merge.

main requires signed commits. git commit inside Actions is signed by nobody — GITHUB_TOKEN is not a signing key. #72 passed all nine checks and was still refused: the base branch policy prohibits the merge. The only way through was --admin.

That is not a stuck PR to force through once. It is every week the drift gate goes red, and it trains whoever is on the other end to treat an admin bypass as routine — in the repo that guards everything else.

The fix

GitHub's GraphQL createCommitOnBranch mutation signs server-side, so the commit comes back Verified and merges under the rule like any other. Same GITHUB_TOKEN, same contents: write, no bot signing key to store or rotate.

Already proven: #74 was #72's content re-landed this way (identical tree 306388c3ba55) and merged with no bypass.

Logic lives in scripts/push-signed-branch.py, alongside the existing check-tool-updates.sh and apply-tool-bumps.py, rather than as an inline heredoc.

It fails loudly

The helper asserts the returned commit is actually VALID and exits non-zero otherwise. Silently producing an unmergeable branch is the exact failure being fixed, and it stays invisible until someone tries to merge weeks later.

Preserved deliberately

  • Still does not open the PR. That needs "create and approve pull requests", and GitHub does not let you grant create without approve. The reasoning in the file's header comment is unchanged and still correct.
  • persist-credentials: false stays, so the docker build steps that run ten third-party installers cannot find a pushable token in .git/config. The comment is updated: the token is now spent on the API rather than a git remote.
  • One long-lived branch, force-reset to the run's base commit each week, rather than a trail of stale ones — same behaviour git push --force had, via a PATCH on the ref.
  • The commit body now carries the actual bump list, reusing the bump-summary.md the apply step already writes.

…igned

The weekly bump branch could never merge. main requires signed commits; git commit inside Actions is signed by nobody, because GITHUB_TOKEN is not a signing key. #72 passed all nine checks and was still refused by the base branch policy, and the only way through was --admin.

That is not a stuck PR to force once. It is every week the gate goes red, and it trains whoever is on the other end to treat an admin bypass as routine in the repo that guards everything else.

createCommitOnBranch signs server-side, so the commit comes back Verified and merges under the rule like any other. Same GITHUB_TOKEN, same contents: write, no bot signing key to store or rotate. Verified on #74, which was the same content as #72 re-landed this way and merged without a bypass.

The helper asserts the commit came back VALID and fails if not. Silently producing an unmergeable branch is the failure being fixed here, and it stays invisible until someone tries to merge weeks later.

Preserved deliberately: the job still does not open the PR (that needs create AND approve, and GitHub does not split them), persist-credentials stays false so the docker builds cannot find a pushable token, and the single long-lived branch is still force-reset each week rather than leaving a trail.
@garymike
garymike merged commit 017366b into main Sep 30, 2026
9 checks passed
@garymike
garymike deleted the fix/tool-bump-signed-commits branch September 30, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant