Menu

#511 fix(ci): auto-cut staging on every pre-main push, remove the fragile marker

closed
nobody
None
2026-07-21
2026-07-21
Anonymous
No

Originally created by: adityaharishch

What happened

Merging [#508] to pre-main cut an unintended staging release (v1.72.0-staging.6 — a draft prerelease, now deleted).

Root cause

release-prepare.yml triggered on every push to pre-main and gated on:

contains(github.event.head_commit.message, '[staging-release]')

A squash merge folds every PR commit's body into the merge commit message, and this repo's own workflow comments quote the literal marker [staging-release]. So merging a PR that merely touched these files matched the gate → semantic-release ran → a release was cut. A substring match on a commit message you don't control is not a safe trigger.

Fix

Remove the push trigger entirely. Staging releases now cut only via manual workflow_dispatch (Actions → Release (prepare) → Run workflow). A release can no longer happen as a side effect of a merge. The job's if: guard is removed too — reaching the job now means a human clicked the button.

Blast radius of the incident (all contained)

  • Draft prerelease only — not public.
  • No build ran (release-build never fired), no DMG published.
  • No version-bump commit on pre-main.
  • Zero production impact (prereleases are never releases/latest).
  • Stray release + tag already deleted.

How to cut a staging release now

Actions → Release (prepare) → Run workflow (branch: pre-main). Optionally tick dry_run first to preview the version. It tags v*-staging.N, which triggers release-build.yml.

Related

Tickets: #508
Tickets: #512

Discussion

  • Anonymous

    Anonymous - 2026-07-21

    Originally posted by: coderabbitai[bot]

    [!IMPORTANT]

    Review skipped

    Auto reviews are disabled on base/target branches other than the default branch.

    Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.


    ⚙️ Run configuration

    Configuration used: Organization UI

    Review profile: ASSERTIVE

    Plan: Pro Plus

    Run ID: 76d7f093-8b53-45b9-9d89-59b85d2053e9

    You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

    Use the checkbox below for a quick retry:
    - [ ] 🔍 Trigger review

    ✨ Finishing Touches
    🧪 Generate unit tests (beta) - [ ] Create PR with unit tests - [ ] Commit unit tests in branch `fix/staging-release-manual-trigger`

    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.

    ❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

    Comment @coderabbitai help to get the list of available commands.

     
  • Anonymous

    Anonymous - 2026-07-21

    Ticket changed by: adityaharishch

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2026-07-21

    Originally posted by: adityaharishch

    Updated per requirement: staging should auto-release on every pre-main merge (no button)

    Reworked this PR. It no longer makes releases manual — instead it does what you want (auto-release on merge) safely:

    • Trigger: push to pre-main (+ workflow_dispatch kept for on-demand / dry_run previews).
    • No marker gate. semantic-release runs on every push and decides for itself: it cuts a new v*-staging.N prerelease when there are releasable commits (feat/fix/perf…) since the last staging tag, and no-ops on chore/docs/ci-only merges. That tag then triggers release-build.yml → per-arch DMG → staging channel.

    The original bug was never "auto-release" — it was matching a [staging-release] substring in a commit message you don't fully control (a squash body quoting the marker fired it). Removing the string match entirely and letting semantic-release judge the commits is the canonical pattern and can't misfire.

    Net behaviour after this merges

    • Merge a feat/fix to pre-main → staging build is cut and published automatically → install/dogfood it on the staging channel → promote pre-main → main when happy.
    • Merge a docs/ci-only change → no release (nothing to test).
     
  • Anonymous

    Anonymous - 2026-07-21

    Originally posted by: adityaharishch

    Clarification: this PR merged as manual-only (workflow_dispatch), which is what's on pre-main now. The later intent — auto-release on every pre-main merge — is in #512 (supersedes this). Ignore my edited title/comment above; the auto-on-push change lives in [#512].

     

    Related

    Tickets: #512


Log in to post a comment.