Skip to content

ci(changeset-check): skip on forward-merge/* PRs - #4315

Merged
bokelley merged 1 commit into
mainfrom
ci/changeset-check-skip-forward-merge
May 10, 2026
Merged

bokelley merged 1 commit into
mainfrom
ci/changeset-check-skip-forward-merge

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Forward-merge PRs bring in commits whose changesets were already consumed by the source branch's Version Packages cut, so changeset status --since=origin/main finds no pending changesets and exits non-zero. Mirrors the existing changeset-release/* skip rule.

Without this skip, every forward-merge PR (auto-generated by forward-merge-3.0.yml or manual resolution following the same prefix convention) fails the Check for changeset job on a structural condition that has nothing to do with PR correctness — currently the only way to land them is admin override or padding in a meaningless empty changeset. Both are friction; the skip is the right primitive.

What's covered

Head ref prefix Skipped? Why
changeset-release/<branch> yes (existing) changesets/action consumes .changeset files into a CHANGELOG bump as part of the Version Packages PR
forward-merge/* yes (new) source branch's changesets already consumed; merge brings package-changing commits with no .changeset/*.md files to explain them
anything else no regular feature/bug PRs still require a changeset

The skip is keyed on head_ref prefix, not on labels or commit content — not bypassable by a regular contributor naming their branch something else, since branch names are visible in the PR record.

Refs

🤖 Generated with Claude Code

Forward-merge PRs bring in commits whose changesets were already consumed
by the source branch's Version Packages cut, so `changeset status` finds
no pending changesets and fails the check. Mirrors the existing
`changeset-release/*` skip rule.

Without this skip, every forward-merge PR (auto-generated or manual)
fails CI on a structural condition that has nothing to do with PR
correctness — landed by admin override or by adding a meaningless
empty changeset. Both are friction; the skip is the right primitive.

Affects:
- changeset-release/<branch> — already skipped (Version Packages cuts)
- forward-merge/* — new skip (3.0.x → main backfills, both auto from
  forward-merge-3.0.yml's `branch: forward-merge/3.0.x` and manual
  resolutions following the same prefix convention)

Other PRs (feature work, bug fixes) still require a changeset. The
skip is keyed on head_ref prefix, not on labels or commit content,
so it's not bypassable by a regular contributor naming their branch
something else.

Refs #4306, #4310.
@bokelley
bokelley merged commit 7311d75 into main May 10, 2026
13 checks passed
@bokelley
bokelley deleted the ci/changeset-check-skip-forward-merge branch May 10, 2026 02:16
bokelley added a commit that referenced this pull request May 10, 2026
The block-scalar form 'if: |' with multi-line ${{ ... }} body did not
evaluate as expected — GitHub Actions ran the job on forward-merge/*
PRs anyway. One-line expression mirrors the working pattern.

Refs #4315.
bokelley added a commit that referenced this pull request May 10, 2026
Mirrors the same skip rule on main (#4315 + #4316). Forward-merge PRs
targeting 3.0.x (e.g., a future 2.6.x → 3.0.x line) skip the changeset
check the same way main does.

Refs #4306.
bokelley added a commit that referenced this pull request May 10, 2026
…an (#4322)

Update .agents/playbook.md § Release lines to reflect the post-#4308
forward-merge reality:

1. Auto-resolve is metadata-only. List the kept paths (package.json,
   .changeset/*, CHANGELOG, schema source index, dist/{schemas,
   compliance,protocol,docs}/*) and explicitly call out that content
   files (the 7 known cross-line divergences) fail loud. Document
   why: whole-file --ours silently dropped 3.0.x patches for 5 days
   before the bug was found (v3.0.5 → v3.0.9 silently failed to
   forward-merge).

2. Manual resolution recipe inline — the same recipe the workflow
   error message emits. Branch name MUST start with forward-merge/
   so the changeset-check workflow skips correctly.

3. Document the changeset-check skip rule (forward-merge/* and
   changeset-release/* head_ref prefixes skip).

4. New "When 3.1.0 cuts — release-line transition" section:
   - Cut 3.1.x branch off main after the stable tag
   - Rename forward-merge-3.0.yml → forward-merge-3.1.yml
   - Reset known-divergent file list (the 3.0.x bridges collapse
     when 3.1.0 absorbs the 3.1-track additions)
   - Decide 3.0.x's fate (sunset vs maintenance window)
   - Update playbook + RELEASING with the new topology

5. Lessons captured for future maintenance lines:
   - Never auto-resolve content files with whole-file --ours
   - Workflow exit code must reflect actual merge state
   - Permanent cross-line divergences accumulate
   - Forward-merge PRs can't carry their own changesets — skip rule
     belongs on every release-line workflow
   - Reference impls land on main first; cherry-pick only when
     truly needed (security, severe bugs)

RELEASING.md gets a pointer to the playbook + two new troubleshooting
entries (changeset-check fail on forward-merge/*, content conflicts
on the divergent files).

Refs #4306, #4308, #4310, #4315, #4316, #4317.