Skip to content

Commit c9c6e0e

Browse files
cliffhallclaude
andcommitted
docs(release): the admin escape hatch for a release that cannot be a pure merge
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 9422c3f commit c9c6e0e

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

‎.claude/skills/release/SKILL.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,35 @@ reaches `main` through `v2/main`, so there is nothing on `main` to bring back
283283
except the merge commits themselves. `v2/main` ahead of `main` means a release
284284
is in flight; that is the normal state.
285285

286+
### A release that cannot be a pure merge
287+
288+
Sometimes `v2/main` holds work that must not ship yet, and the release has to
289+
come from a branch of its own: a release branch with cherry-picks (1.0.0
290+
shipped that way, from `v2/release/1.0.0` in #5090), or a hotfix. The required
291+
**Source is v2/main** check fails that PR, by design, and nobody can bypass
292+
it, admins included. The only way through is a deliberate act by a repo
293+
admin: disable the `main: milestone merges only` ruleset for that one merge,
294+
and turn it straight back on.
295+
296+
```sh
297+
RS=$(gh api repos/modelcontextprotocol/servers/rulesets \
298+
--jq '.[] | select(.name == "main: milestone merges only") | .id')
299+
[ -n "$RS" ] || echo "ruleset not found by name; list them and look" >&2
300+
gh api -X PUT "repos/modelcontextprotocol/servers/rulesets/$RS" -f enforcement=disabled
301+
# Merge the PR now, with "Create a merge commit". With the ruleset off,
302+
# squash and rebase are offered again; do not use them.
303+
gh api -X PUT "repos/modelcontextprotocol/servers/rulesets/$RS" -f enforcement=active
304+
gh api "repos/modelcontextprotocol/servers/rulesets/$RS" --jq .enforcement # must print "active"
305+
```
306+
307+
- **Only a human admin does this**, and only for a PR whose diff has been
308+
reviewed as the release. Never leave the ruleset disabled between steps.
309+
- **Record it in the release ledger**: the PR, why it could not be a pure
310+
merge, and the times the ruleset was disabled and re-enabled.
311+
- **Then merge the release branch back into `v2/main`** through a PR of its
312+
own (#5118 did this for 1.0.0), so its commits are on `v2/main` and the
313+
next milestone merge is a pure one again.
314+
286315
## 4. Verify the release candidate, and write the ledger
287316

288317
Work from a **dedicated worktree** with its own install, so nothing stale from

‎AGENTS.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,11 @@ holds for a maintainer's own one-line fix as much as for a feature.
361361
is merged with a merge commit, never squashed. Both are enforced on `main`:
362362
its ruleset allows only merge commits, and requires the **Source is
363363
v2/main** check (`main-source.yml`), which fails a PR whose head carries
364-
any commit not already on `v2/main`. The flow is the `release` skill.
364+
any commit not already on `v2/main`. That ruleset has no bypass actors; a
365+
release that cannot be a pure merge (a release branch, a hotfix) goes
366+
through only by a repo admin disabling it for that one merge and
367+
re-enabling it at once, which is never automated. The flow is the
368+
`release` skill.
365369
- **Exception: the two version PRs that automation opens.** Each changes
366370
version metadata only, so neither answers the PR checklist below, and each
367371
is tied to its milestone's **release issue** rather than to an issue of its

0 commit comments

Comments
 (0)