docs: add the major-line runbook (fixes #2979) - #2997
Open
mfal wants to merge 1 commit into
Open
Conversation
ADR 0004 §11 says the `next → major` cascade uses "the same mechanism" as `main → next`. That holds for the design, not for the configuration: every piece of automation is hardcoded to the two standing lines, so opening `2.x` today means discovering that one broken invariant at a time. The runbook records the four decisions (branch `2.x`, dist-tag `next-major`, preid `major`, publishing stays in `publish.yml` because npm's Trusted Publisher binds one workflow filename per package), the ruleset and the order it has to be created in, every workflow edit with its reason, a verification list for the first PR, and the promotion and retirement paths. Verified against the code, which turned up four things the issue did not name: - `forward-merge.yml`'s `close_sync_issue()` closes EVERY open `sync`-labelled issue matching `in:title "Forward-merge blocked"`, so a healthy `main → next` run would close the major line's escalation while its conflict still stands. `open_sync_issue()` suppresses in the other direction, and `forward-merge-drift.yml` looks up its blocker with no title filter at all. - `sync-resolve.cjs` is hardcoded to `main → next`, and it is the only way out of a conflict — GitHub does not run the merge drivers. - The two `commit-guard.yml` `if:` gates must move into the step rather than grow a literal branch list: the ruleset requires those contexts, and a job skipped by `if:` is not a reliable reporter for them. - `publish.yml` is six edits, not one — including the seed formula in `Version (next line)`, which computes a MINOR prerelease. The `coverage` context is deliberately excluded from the ruleset: `coverage.yml` triggers on PRs to `main` only, and a required context that never reports blocks every PR on the line. `next`'s ruleset omits it for the same reason. §11 is expanded in place with the configuration gaps and points at the runbook; `release-workflow.md` links it from the model and from "Where to look next". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Coverage Report for ./packages/components/
File CoverageNo changed files found. |
Contributor
🚀 Preview DeploymentPreview environments are ready:
Images:
|
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.
ADR 0004 §11 says
the
next → majorcascade uses "the same mechanism" asmain → next. Thatholds for the design, not for the configuration: every piece of
automation is hardcoded to the two standing lines, so opening
2.xtoday meansdiscovering that one broken invariant at a time.
New
docs/major-line-runbook.mdrecords what has to happen — the branch andruleset (in that order), the guard and workflow edits, the second cascade, the
sync tooling, a verification list for the first PR, and the promotion and
retirement paths. ADR 0004 §11 is expanded in place with the configuration gaps
and points at it;
release-workflow.mdlinks it from the model and from Whereto look next.
Decisions recorded
2.x— the routing guard's head-ref exemption already matches itnext-major—nextis taken,latestis the stable linemajor→2.0.0-major.N, kept separate so the version string stays readablepublish.yml, extended — never a second file (npm's Trusted Publisher binds one workflow filename per package; that is what killed the first twonextpublishes, #2968)Found while verifying against the code
Everything in the runbook was checked against the actual workflows and scripts
rather than taken from the issue. Four things the issue does not name:
forward-merge.yml'sclose_sync_issue()closesevery open
sync-labelled issue matchingin:title "Forward-merge blocked",so a healthy
main → nextrun would close the major line's escalation whileits conflict still stands.
open_sync_issue()suppresses in the otherdirection, and
forward-merge-drift.ymllooks up its blocker withgh issue list --label syncand no title filter.sync-resolve.cjsis hardcoded tomain → next(BRANCH, the fetch andmerge of
origin/mainintoorigin/next, the message, the PR base) — and itis the only way out of a conflict, because GitHub does not run the
.gitattributesmerge drivers. It needs--from/--to, which/prepare-releasealready has.commit-guard.ymlif:gates must move into the step, not grow aliteral branch list: the ruleset requires those four contexts, and a job
skipped by
if:is not a reliable reporter for them.version-contractalready has the right place (
steps.gate).publish.ymlis six edits, not one — including the seed formula inVersion (next line), which computes${M}.${m+1}.0-next.0, a minorprerelease. The major line needs
${M+1}.0.0-major.0and--preid major.Two details worth calling out
coveragecontext.coverage.ymltriggers onpull_request: branches: [main]only, so on amajor-line PR the check never reports — and a required context that never
reports blocks every PR on the line.
next's ruleset omits it for the samereason.
main's andnext's itcarries a
creationrule. And it is not a nicety — the repo allows mergecommits and squash merges repo-wide, so an unprotected line offers both
buttons. Verified: chore(sync): resolve forward-merge conflict (main into next) #2969's merge commit
e25acaaa5has a single parent, whilea27c61b51and8b76367f0have two.Verification
pnpm format:checkandpnpm nx test:links docsgreen; the release-relevanceclassifier reads the change as docs-only → no publish.
fixes #2979
🤖 Generated with Claude Code