Repository navigation
Conversation
Keep main on the next release and backport merged PRs to stable unless they carry Breaking Changes. Reconcile pending commits into one batch, reuse CI on its exact revision, and merge only while its head, base and labels still match. Promote stable only after an exact stable tag successfully publishes. Add Bun integration coverage and document repository setup and branch ownership. Require Bun for new repository scripts. AI-assisted implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Keep
maindeveloping the next release whilestablereceives compatible changes. After a PR is squash-merged into main, the Stable Branch workflow cherry-picks it unless it has the exact Breaking Changes label. It reconciles outstanding commits into one generated PR, records conflicts for manual handling, and preserves source SHAs through squash merging to prevent duplicate backports.The generated PR is merged only after the existing CI workflows validate its exact head, applicable documentation checks pass, and the stable base, PR head and source labels still match. CI is called explicitly with a read-only token, so this works without a new bot secret or relying on approval-gated PR events from
GITHUB_TOKEN.After a successful Release Crate run for an exact stable
vX.Y.Ztag, reconciliation promotes stable to a newer published version. Prereleases, failed publishes and older versions do not advance it; retries preserve newer backports. Main pushes, release completion, hourly reconciliation and manual dispatch share one serialized workflow. No versions or tags are created automatically.Document branch ownership and rollout, and require TypeScript/Bun for new repository scripts in AGENTS.md. This is an AI-assisted implementation. No public crate APIs change.
Repository setup
stablehas already been cut from current main ataf78e935, so existing compatible changes are included.Before enabling this workflow, turn on Allow GitHub Actions to create and approve pull requests in repository Actions settings. That setting is currently disabled; the workflow needs PR creation and does not approve reviews. Existing branch rules still apply: stable can require the Stable backport status, and release promotion must be allowed to update its managed ref. This PR does not change repository settings, merge feature PRs, or publish a release.
Direct main commits have no PR label and require manual backporting. Conflicts and failed checks remain visible for maintainers. See
docs/RELEASE-BRANCHES.mdfor recovery and new-series promotion details.How to Test
bun test ./script/tests/stable-backport.test.ts: 8 passed. Local Git repositories exercise real cherry-picks and squash-history tracking; GitHub writes are mocked. Coverage includes label exclusion, conflicts, repeated reconciliation, failed CI, head/base changes, labels added during CI, empty patches, exact successful release tags, older releases and preserved post-release fixes.tsc --noEmitfor the new script and test: passed using the installed Bun types.actionlint v1.7.12on the three changed workflows: passed.bun build script/stable-backport.ts --target bun: passed.git diff --check: passed.The production workflow has not been run; it becomes available on main after merge and requires the Actions setting above. Rust tests were not rerun because this change only affects release automation and documentation.
Checklist