Skip to content

release: v3.2.5 - add ruleset templates for master / next / hotfix - #18

Merged
Shinrai merged 11 commits into
masterfrom
docs/release-flow-v4-design
May 21, 2026
Merged

Shinrai merged 11 commits into
masterfrom
docs/release-flow-v4-design

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

  • v4(rulesets): default Code Owner review on hotfix to OFF (6ce1c71)
  • data(v4): add ruleset templates for master / next / hotfix (464df51)

🔧 Other Changes

  • v4(rulesets): copilot review now opt-in (default off), tick §13 approvals (f158cb0)
  • docs(tools): add v4 ruleset-generator static page (37e45d2)
  • docs(v4): switch §9 to rulesets, slim §10.3 bootstrap scope, expand §11 PR audit: non-conforming commit subject on master (7a876e5) #6 (d1db163)
  • docs(v4): apply decided gaps from review pass (c71acb5)
  • docs(v4): drop external-consumer language; CLDMV is the only consumer (5674f67)
  • docs(v4): drop body markers (would leak to squash commits), use API-derived detection (94e3848)
  • docs(v4): incorporate review decisions on questions 1-5 (64cf88f)
  • docs: add release-flow v4 design doc (696ae0e)
👥 Contributors

Shinrai and others added 11 commits May 21, 2026 09:09
Comprehensive design for moving the org-level release flow from per-PR
version bumps to a staging-branch (next) + persistent-release-PR model,
with an independent hotfix lane.

Goals captured from chat discussion:
  - master stays clean (release commits only)
  - multiple parallel PRs batch into one release (no cascade)
  - hotfix path stays separate from feature development
  - forgotten-release notification via existing audit issue machinery
  - contributor friction stays low (no changesets, just conventional commits)

Includes:
  - branch model diagram with reset behaviour and auto-merge matrix
  - flows for contributor PR / hotfix PR / release PR / hotfix release PR
  - workflow inventory (6 new, 3 modified actions, 5 new actions, decommissioning list)
  - the hotfix-while-next-has-work edge case (§7.2) — picked option B (merge
    master into next) over force-reset to avoid losing accumulated feature work
  - branch protection JSON shape that maps the auto-merge matrix to GitHub
    settings (global allow-auto-merge + per-branch protection rules)
  - 6-PR migration sequence, each shippable independently
  - open questions block (§10) for unresolved design points

Status: draft. No code yet. Approval checklist (§13) at the bottom — review
and resolve open questions before any implementation PR opens.
Updates the v4 design doc with decisions from initial review:

  - §6.4 PR title normalizer: refined to only fire on opened + synchronize,
    with idempotency markers to prevent the 'circle-jerk' re-rewrite loop.
    Silent on synchronize rewrites; only comments on initial open. Skips
    bot-authored PRs and PRs targeting master.

  - §6.5 renamed to local-pr-target-redirector.yml — single workflow handles
    both 'redirect to next' and 'redirect hotfix/* to hotfix' so repo default
    branch can stay as master (universal convention). Alternative documented.

  - §6.6 pending-release-reminder thresholds now workflow inputs with
    sensible defaults, configurable per consumer repo.

  - §10 split into resolved vs still-open. Co-author trailer issue
    documented as accepted-state (no automatic stripping for UI-clicked
    merges; manual edit or accept). Solo-maintainer opt-out via existing
    GitHub branch protection toggles — no special workflow.

  - §13 approval checklist updated with what's been confirmed.

Still open: bootstrap workflow shape, release-commit escape hatch docs,
migration guide cadence, conflict-with-sibling-during-auto-merge edge case.
…erived detection

Previous revision used hidden HTML markers (<!-- ... -->) in the PR body for
idempotency. That's a bug: when GitHub squash-merges a PR, the body becomes
the commit body — markers end up in master's history as comment-trash.

Replaced with three marker-free mechanisms:

  - Bot vs human detection: pull_request.user.type == 'Bot' is part of the
    GitHub event payload. Catches cldmv-bot, github-actions, dependabot,
    renovate, etc. uniformly. No marker needed.

  - Title rewrite idempotency: a correctly-formatted conventional title
    won't trigger a rewrite on re-evaluation. Idempotency is a property of
    the check, not a side effect of a marker.

  - Comment dedup: query GET /issues/{n}/comments before posting,
    scan for a sentinel phrase from a prior bot comment. If present, skip.
    Comments don't appear in squash commits.

Sections updated:
  §6.4 — title normalizer logic + skip conditions + the dedup approach
  §6.5 — pr-target-redirector uses same comment-query dedup
  §10.2 — resolved questions table now includes the marker decisions,
          plus release! escape hatch and conflict-during-auto-merge

Also fleshed out the still-open bootstrap workflow (§10.3) with a concrete
sketch: workflow_dispatch, idempotent branch creation, protection rule
application, repo-level auto-merge toggle, parallel v3/v4 operation during
migration.
Trims:
  - §2 goal reframed from 'downstream consumers get a migration path' to
    'internal migration is captured for future institutional memory'.
    CLDMV is the only consumer; the @V3 tag stays as an immutable git ref
    indefinitely but there's no active maintenance promise.
  - §11 dropped the 'v3 stays supported for a minimum of 6 months' clause —
    that was lifted from an OSS-with-external-users template that doesn't
    apply. CLDMV repos cut over individually by swapping @V3 → @v4 in
    their workflow files.
  - §11 clarified that docs/migration/v3-to-v4.md is written all at once
    in PR #6, not incrementally. With no external readers there's no
    benefit to the incremental cadence.
  - §10.3 cadence question resolved (collapsed to comment marker).
- §4 hotfix auto-merge wording: clarify codeowner-required gate makes it unsatisfiable in practice
- §6.4 normalizer: skip PRs whose title starts with 'release:' (escape-hatch override)
- §7.1 next-reset: clarify §6.1's resolve-or-create-pr step is what re-creates the persistent PR
- §7.2 hotfix-into-next: assert the API merge IS a push to next, so §6.1 fires automatically
- §11 stability statement: @v4 is unstable preview during PRs #3-5, stable after PR #6
- §13 checklist: fix mislabel (was §10.2 'resolved'; is §10.3 'still open')
…11 PR #6

- §9 rewritten against GitHub Rulesets shape (not legacy branch protection):
  three templates (master/next/hotfix) under data/rulesets/, generated by a
  static tool at docs/tools/ruleset-generator/. bypass_actors stays as
  OrganizationAdmin-only by default; consumer adds bot to bypass list
  manually post-import via the GitHub UI.
- §10.3 bootstrap workflow drops the branch-protection step; now only
  creates next/hotfix branches and enables repo-level allow-auto-merge.
- §11 PR #6 scope expands to include the JSON templates + static
  generator page + migration guide.
Canonical default emissions of the v4 ruleset generator. Shape matches
the actual GitHub Rulesets export format (rules: [{type, parameters}]).

Differences across the three:
- master: non_fast_forward + required_linear_history + copilot_code_review
- next:   non_fast_forward, NO required_linear_history (allows §7.2 API
          merge commits from master), NO copilot_code_review
- hotfix: all of master PLUS require_code_owner_review = true

bypass_actors: OrganizationAdmin only — consumer adds bot to next/hotfix
bypass list manually after import (see §9.2 of the v4 design doc).
Single-page HTML + JS tool that emits the three v4 ruleset JSONs based
on two questions: required-approvals count (with team-size pre-fill)
and require-code-owner-review-on-hotfix toggle.

Hosted via GitHub Pages from docs/ folder. Consumer flow:
  1. Open the page in a browser
  2. Pick team size (or set approvals directly), tick code-owner if desired
  3. Click each branch's Download button → master.json, next.json, hotfix.json
  4. In their repo: Settings → Rules → Rulesets → New ruleset → Import
  5. After import: add bot to bypass list of next + hotfix

Everything else (CodeQL threshold, GPG enforcement, squash-only, the
required check-name) is hardcoded from v4's intended flow.
…vals

Q3+Q4 from the design review:

- copilot_code_review removed from master.json and hotfix.json defaults.
  The generator asks a third question 'Require Copilot Code Review?'
  defaulting to OFF, with a cost warning. When enabled, the rule is
  emitted in master AND hotfix outputs. (next never gets it.)

- §9.1 picks up the third generator question.
- §9 settings table reflects copilot as 'optional (asked)' for master
  + hotfix, plus a new row for require_last_push_approval = false
  everywhere (Q3 resolved: matches the exported master ruleset).
- §9.3 auto-merge rewritten: no longer claims Copilot is the bottleneck
  on master (since it's now off by default). Honest about the
  per-PR opt-in mechanism + maintainer practice.
- §13 checklist: tick the three boxes that this round's answers cover
  (§9 shape, §11 sequence, §10.3 still-open questions).
User isn't using CODEOWNERS in any current CLDMV repos; default-on was
the wrong default. The generator checkbox is now unchecked by default,
hotfix.json template ships with require_code_owner_review = false,
and §9.1 / §4 / §9.3 are updated to drop 'codeowner gate' as the
default hotfix auto-merge bottleneck. Hotfix manual-review behavior
is now described honestly as a maintainer convention; consumers can
opt into the hard gate via the generator question if they add a
CODEOWNERS file later.
@cldmv-bot cldmv-bot Bot added release Marks a pull request as a pending release — merge to publish a new version semver: patch This release contains only backwards-compatible bug fixes type: bug Something is broken or not behaving as expected type: config type: documentation Relates to docs, README updates, guides, or inline code comments labels May 21, 2026
@Shinrai
Shinrai merged commit 2e38b62 into master May 21, 2026
8 checks passed
@cldmv-bot
cldmv-bot Bot deleted the docs/release-flow-v4-design branch May 21, 2026 21:33
Shinrai pushed a commit that referenced this pull request May 21, 2026
## 🚀 What's Changed

### 💥 Breaking Changes
_No breaking changes_

### ✨ Features
_No new features_

### 🐛 Bug Fixes
- v4(rulesets): default Code Owner review on hotfix to OFF (6ce1c71)
- data(v4): add ruleset templates for master / next / hotfix (464df51)

### 🔧 Other Changes
- v4(rulesets): copilot review now opt-in (default off), tick §13
approvals (f158cb0)
- docs(tools): add v4 ruleset-generator static page (37e45d2)
- docs(v4): switch §9 to rulesets, slim §10.3 bootstrap scope, expand
§11 PR 6 (d1db163)
- docs(v4): apply decided gaps from review pass (c71acb5)
- docs(v4): drop external-consumer language; CLDMV is the only consumer
(5674f67)
- docs(v4): drop body markers (would leak to squash commits), use
API-derived detection (94e3848)
- docs(v4): incorporate review decisions on questions 1-5 (64cf88f)
- docs: add release-flow v4 design doc (696ae0e)

<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Marks a pull request as a pending release — merge to publish a new version semver: patch This release contains only backwards-compatible bug fixes type: bug Something is broken or not behaving as expected type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant