Skip to content

ci: stop release-please self-triggering loop on its own branch#6105

Merged
arcjet-rei merged 1 commit into
mainfrom
fix/release-please-self-trigger-loop
Jun 29, 2026
Merged

ci: stop release-please self-triggering loop on its own branch#6105
arcjet-rei merged 1 commit into
mainfrom
fix/release-please-self-trigger-loop

Conversation

@arcjet-rei

Copy link
Copy Markdown
Contributor

Problem

The arcjet-arcjet-js-release-please[bot] has been stuck in a self-triggering loop, force-pushing a fresh chore: Release 1.6.0 commit to release-please--branches--main roughly once a minute for ~9 hours — hundreds of cancelled Push workflow runs.

Root cause

Two individually-reasonable changes are fatal together:

Pushes made with GITHUB_TOKEN do not re-trigger workflows (GitHub's loop guard), but App-token pushes do. So:

release-please force-pushes release branch (App token)
  → push event on release-please--branches--main
    → push.yml runs the `release` job again
      → release-please regenerates the commit + force-pushes (new SHA)
        → push event again → ∞

This stayed dormant after #6019 (May 5) until the 1.6.0 release cycle opened a release PR for the loop to thrash against.

Fix

Gate the release job to main only — it never needs to run when its own PR branch is pushed. This preserves both prior intents: the test and examples jobs still run on the release branch (#5998), and the App token still authors the release (#6019).

Once merged, the push to main runs the release job once normally, then any further push to the release branch skips it → loop broken.

Note

The loop is still running. Until this lands, consider disabling the Push workflow or closing the 1.6.0 release PR to stop burning Actions minutes.

🤖 Generated with Claude Code

The `release` job runs on pushes to both `main` and
`release-please--branches--main`. Since #6019 it pushes to the release
branch with a GitHub App token, and App-token pushes (unlike
`GITHUB_TOKEN`) re-trigger workflows. So each force-push to the release
branch re-ran this job, which force-pushed again — an infinite loop that
regenerated the release commit roughly once a minute.

Gate the `release` job to `main` only. It never needs to run when its
own PR branch is pushed. The `test` and `examples` jobs still run on the
release branch (the intent of #5998).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@arcjet-rei arcjet-rei requested a review from a team as a code owner June 27, 2026 02:56
@arcjet-rei arcjet-rei requested a review from qw-in June 27, 2026 02:56

@arcjet-review arcjet-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arcjet Review — 🔴 High Risk

Decision: Reviewers Assigned

Rationale: This PR changes a GitHub Actions workflow and includes token-related release automation behavior, which triggers CI/CD and authentication-related escalation criteria. The actual code change is small and appears intended to prevent Release Please from self-triggering on its generated branch by limiting the release job to refs/heads/main. I did not identify hardcoded secrets or direct security vulnerabilities in the diff, but CI/CD changes involving GitHub App token behavior should receive human review. No specific escalation reviewers are configured.

Summary of Changes

Adds a job-level condition to the Release Please job in .github/workflows/push.yml so it only runs on main, preventing the release branch from repeatedly triggering itself while allowing other jobs to continue running on that branch.

Escalation Triggers

  • CI/CD Pipeline: The PR modifies .github/workflows/push.yml, a GitHub Actions workflow file.
  • Authentication & Authorization: The diff references GitHub App token and GITHUB_TOKEN behavior in the release automation path.

Review Focus Areas

Notes

The diff is very small and appears targeted, but CI/CD workflow changes involving token-triggered automation are high-risk under the configured review policy and should be reviewed by a human.

Review: eafc38e6 | Model: openai/gpt-5.5 | Powered by Arcjet Review

@arcjet-rei arcjet-rei added this pull request to the merge queue Jun 29, 2026
Merged via the queue into main with commit 514ee98 Jun 29, 2026
38 checks passed
@arcjet-rei arcjet-rei deleted the fix/release-please-self-trigger-loop branch June 29, 2026 03:23
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.

2 participants