agents: guard the loop, PR the pushRoot cause category: CI/CD — auto-commit workflow on a protected, PR-only branch
Module: repo plumbing (CI), Release Version.yml
For the release train, the patch version bump moved off main onto the
long-lived agents branch (decision 6): each merge to agents bumps
version.txt (+ synced gradle/DEBIAN/doc fields), and main inherits the
accumulated version when Ben merges the integration PR. Two things made the
naive port unsafe:
agents is PR-only (branch protection requires a PR), so the old
workflow’s git push straight to the branch would be rejected.push: [agents] and then pushes a bump commit
would re-trigger itself — an infinite bump loop.The old workflow also created the vX.Y.Z tag; in the new model tagging happens
once on merge to main (release-notes.yml), so keeping it here would
double-tag.
push: [main] to push: [agents].head_commit.message starts with
Bump version, so the squashed bump commit doesn’t trigger another bump.version-bump/<v> branch,
pushed with the krill-kraken-bot PAT (so CI triggers), opened as a
risk:trivial / no-lesson-needed PR to agents, and gh pr merge --auto
--squash. With agents required-reviews = 0 and CI green, it merges with no
human approver.GITHUB_TOKEN, when you need the
push to trigger downstream workflows (CI on the bump PR, here).