Skip to content

Rename release branch main→release (Decision B, in-repo)#1114

Open
joeharris76 wants to merge 4 commits into
developfrom
claude/git-branching-strategy-58vxjs
Open

Rename release branch main→release (Decision B, in-repo)#1114
joeharris76 wants to merge 4 commits into
developfrom
claude/git-branching-strategy-58vxjs

Conversation

@joeharris76

@joeharris76 joeharris76 commented Jul 10, 2026

Copy link
Copy Markdown
Owner

⚠️ Supersedes #1027 — consolidated, all valuable improvements captured

#1027 (from an earlier session) was a parallel attempt at this same Decision B rename. This PR is a strict superset: file-set comparison shows every file #1027 touches is also touched here, plus 16 more. To make it the single source of truth, this PR now also incorporates the two things #1027 got right that this PR originally didn't:

  • seed-corpus.yml base → develop (not release): it carries results-data/bundles/ content that release-cut curation removes from the release tree, and its chore/ head would be rejected by validate-release-pr.yml. chore: rename release branch main->release in-repo (w1-w4) #1027 correctly flagged that renaming it to release was wrong. (chore: rename release branch main->release in-repo (w1-w4) #1027 left it as main, which breaks post-rename; develop is the correct integration base.)
  • Protected-branch guards keep main blocked during the migration window (develop|main|release, not develop|release): a blanket text-replace silently un-blocked a stale local main. Fixed in-branch with a regression test.

Extra improvements unique to this PR (not in #1027): pyproject.toml Changelog URL → blob/release; RELEASE_CANARY_BRANCH → develop (the default-branch-vs-release-branch classification, incl. release_readiness_check.py + nightly.yml); single-repo-migration.md, CLAUDE.md guard patterns, _blog/ source posts, decision record. #1027 can be closed as superseded.


Description

The in-repo half of Decision B — rename the release-only branch mainrelease. The GitHub branch rename + ruleset recreate are your coordinated follow-up (see docs/operations/branch-rename-runbook.md); this PR must merge before that admin step.

⚠️ Touches release.yml (a CODEOWNERS soundness path), so auto-merge is withheld — this needs your Code Owner review.

The nuance that matters (please focus review here)

main references split into two meanings, classified rather than blindly renamed:

  • Release-branch refs → release (the rename proper).
  • Default-branch refs → develop — NOT release. RELEASE_CANARY_BRANCH means "the branch that owns the canary runs"; the canary fires from the default branch (now develop after Decision A), and its runs carry head_branch=develop. Renaming it to release would be a soundness bug. Same for the nightly.yml liveness comment and seed-corpus.yml's base. test_release_readiness.py asserts branch=develop.

What changed (release-branch → release)

  • Workflows: lint/test/perf-smoke/docs (+ Pages deploy gate), results-explorer-browser, cross-platform comment; renamed validate-main-pr.ymlvalidate-release-pr.yml; release.yml publish gate verify-tag-on-mainverify-tag-on-release; test.yml's 6 base_ref conditionals.
  • Makefile: release-cut/finalize base, the -s ours alignment merge, --since-ref boundary, checkout/pull, main-release-onlyrelease-only, protected-branch guards (develop|main|release), help text.
  • Scripts: ruleset_drift_check.py (parses release-only), release_readiness_check.py, changelog-generator, todo_cli/pr_review_followups guards.
  • Docs/config: release-guide, RELEASE_PR_TEMPLATE, repo-admin-settings, CONTRIBUTING, results-phase-2-runbook, pyproject.toml Changelog URL, landing footer, blog → version tags, CLAUDE.md. New decision record + branch-rename-runbook.md.
  • Tests moved in lockstep + a new guard regression test.

Verified safe / unchanged

  • PyPI trusted publishing (repo + release.yml filename + pypi env, never a branch); GitHub Pages (deploy-pages); the validate-base required-check context name (only the workflow file was renamed).

Testing

  • Affected release/ruleset tests pass (55 in test_release_infrastructure incl. the new guard test; 135 across the wider affected set on the prior push).
  • Drift parser reads release-only → refs/heads/release; ruff check . clean; all workflows parse.

Notes

  • After merge, run the two admin steps in docs/operations/branch-rename-runbook.md: rename main→release, recreate the ruleset as release-only. Do them together with the merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KPPPtRSp95b8JkUJcLEUcn

Executes the in-repo half of Decision B of the branching-strategy review:
rename the release-only branch from `main` to `release`. The GitHub branch
rename + ruleset recreate are the maintainer's coordinated follow-up
(docs/operations/branch-rename-runbook.md).

Release-branch refs -> `release`:
- Workflows: lint/test/perf-smoke/docs (+ Pages deploy gate),
  results-explorer-browser, cross-platform comment; renamed
  validate-main-pr.yml -> validate-release-pr.yml; release.yml
  verify-tag-on-main job + refs/heads ancestor gate -> verify-tag-on-release;
  test.yml base_ref release-gating conditionals.
- Makefile: release-cut/release-finalize base, the `-s ours` origin/main
  alignment merge, --since-ref changelog boundary, checkout/pull, the
  main-release-only ruleset name (-> release-only), branch-protection guards,
  help text.
- Scripts: ruleset_drift_check.py (parses release-only from the runbook),
  release.yml verify-tag docstring, generate_changelog_entry.py comments,
  todo_cli/pr_review_followups guards.
- Docs/templates/config: release-guide, RELEASE_PR_TEMPLATE,
  repo-admin-settings (ruleset section the drift check parses),
  CONTRIBUTING, results-phase-2-runbook, pyproject Changelog URL, landing
  footer, blog links -> version tags, CLAUDE.md guard patterns.
- Tests moved in lockstep: test_ruleset_drift, test_ruleset_drift_review_coverage,
  test_release_infrastructure, test_standardized_test_commands.

Default-branch refs -> `develop` (NOT release; a Decision-A consequence the
rename forces us to make correct): RELEASE_CANARY_BRANCH (the canary fires
from the default branch, now develop, so its runs carry head_branch=develop)
in validate-release-pr.yml + release_readiness_check.py; the nightly.yml
scheduled-workflow-liveness comment. test_release_readiness updated to match.

Verified safe / unchanged: PyPI trusted publishing (repo + release.yml
filename + pypi environment, never a branch), GitHub Pages (deploy-pages),
and the validate-base required-check context name (only the workflow file
was renamed).

Adds the decision record and the admin runbook; promotes the Decision B TODO
to active (w1-w5 done; w6 = admin branch-rename + ruleset recreate).

Verification: 135 affected tests pass; ruleset_drift_check parses release-only
-> refs/heads/release; `ruff check .` clean; all workflows parse.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPPPtRSp95b8JkUJcLEUcn

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c194f2d2b6

ℹ️ 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".

Comment thread Makefile Outdated
claude added 2 commits July 10, 2026 18:44
…he migration window (#1114 review)

The main->release rename did a blanket develop|main -> develop|release
text replace across five separate case-statement guards (pr-open,
pr-fanout, pr-refresh, worktree-release-locked, worktree-pool-reset),
which silently un-blocked main instead of adding release alongside it.
A developer clone/worktree can still have a local main branch after
the GitHub-side rename; without this guard, make pr-open from a stale
main would push and open a develop PR from release-only history.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKw2UhgHuzYPo3y5MfarD6
…view)

seed-corpus opens PRs carrying results-data/bundles/ content, which
release-cut curation removes from the release tree, and its chore/ head would
be rejected by validate-release-pr.yml. So the base must be develop
(integration semantics), not the release branch. This corrects the earlier
`--base release` edit, matching the concern raised in the parallel PR #1027's
review. Flagged in-comment for maintainer confirmation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPPPtRSp95b8JkUJcLEUcn
…ents

The rename TODO now records the reconciliation state: w1-w5 landed via PR #1114
(superseding the duplicate #1027), the default-branch-vs-release classification
(RELEASE_CANARY_BRANCH + seed-corpus -> develop), and the migration-window guard
fix (develop|main|release). Fixes the stale "runbook not yet committed" prior_art
note and points w6 at PR #1114 + the committed runbook. Only w6 (admin) remains.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPPPtRSp95b8JkUJcLEUcn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants