ci: staging RC releases + automated back/forward-merge PRs#713
Conversation
Staging now cuts vX.Y.Z-rc.N prereleases via release-please with its own config/manifest pair (simple release-type, separate changelog, pyproject untouched to stay PEP 440 valid). Stable releases on production trigger an automatic production->staging back-merge PR that syncs the staging manifest; hotfix releases trigger an automatic hotfix->production forward-merge PR. Flow documented in docs/release-flow.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f163926be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Implements a staged release workflow using release-please: RC prereleases on staging, stable releases on production/hotfix/*, and automated PRs to keep staging/production/hotfix branches converged. Adds documentation describing branch roles and the end-to-end release/hotfix lifecycle.
Changes:
- Add staging-specific release-please config + manifest to cut
vX.Y.Z-rc.Nprereleases without touchingpyproject.toml. - Update
release-please.ymlto run onstagingand to invoke a new branch-convergence workflow after stable/hotfix releases. - Add
forward-merge.ymlreusable workflow to open automated back/forward-merge PRs; add docs describing the full flow.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
release-please-config.staging.json |
Adds staging RC prerelease configuration (simple release type + RC changelog). |
release-please-config.json |
Removes prerelease settings so production releases stay stable. |
docs/release-flow.md |
Documents the release/promotion/hotfix flow and version-file ownership rules. |
.release-please-manifest.staging.json |
Introduces independent staging version state for RC computation. |
.github/workflows/release-please.yml |
Runs release-please on staging and gates deploy/merge automation to non-staging releases. |
.github/workflows/hotfix-start.yml |
Updates guidance text to reflect the new automated merge PR behavior. |
.github/workflows/forward-merge.yml |
Adds workflow to open production → staging and hotfix/* → production PRs post-release. |
Skip cleanly when a back/forward-merge PR is already open, push the merge branch with --force-with-lease so reruns survive a leftover branch, and use the chore: prefix so pr-title-lint passes on the automated PRs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What
Implements the full release flow: staging RCs → production stable releases → hotfixes, with automated branch convergence. Documented in
docs/release-flow.md.Changes
release-please-config.staging.json+.release-please-manifest.staging.json(new): staging cutsvX.Y.Z-rc.NGitHub prereleases.versioning: prereleaseso successive merges bumprc.Nonly.release-type: simple+ separateCHANGELOG-rc.mdsopyproject.tomlis never touched on staging (1.2.0-rc.1is not PEP 440 valid and would breakuv exportin CD_staging) and promotion merges don't conflict on version files.release-please-config.json: removed strayprerelease: true/prerelease-type: rc(wrong for stable releases).release-please.yml: runs onstagingtoo, selecting config/manifest by branch.deploy-productionandforward-mergegated withgithub.ref_name != 'staging'— RC releases never deploy production.forward-merge.yml(new): after a stable release, opensproduction → stagingback-merge PR with the staging manifest synced to the released version; after a hotfix release, openshotfix/vX.Y.Z → productionPR.workflow_dispatchfallback for manual runs (used to propagate a hotfix from production to staging). Fails loudly with instructions on merge conflict — never forces.hotfix-start.yml: summary text updated (forward-merge PR now automatic).docs/release-flow.md(new, force-added —docs/is gitignored butrefine-json-filters-and-virtual-fields.mdset precedent): branch roles, lifecycles, version-file ownership, conflict rules, caveats.Caveats / follow-ups
FORWARD_MERGE_TOKENsecret recommended: PRs created with defaultGITHub_TOKENdon't triggerpull_requestworkflows (no CI on automated PRs). Fine-grained PAT or GitHub App token withcontents: write+pull-requests: write. Falls back toGITHUB_TOKEN(close/reopen PR to kick CI).v1.1.0tag commit yet; staging release-please needs it to bound its commit scan. Merge aproduction → stagingPR (or run the newforward-mergeworkflow withsource_branch=production,tag_name=v1.1.0once this lands).production; staging RC behavior is live on merge.🤖 Generated with Claude Code