Skip to content

failure-classes: register FC-merge-ref-first-parent-change-set - #14468

Merged
Git-on-my-level merged 1 commit into
mainfrom
task/msd-ci-fc-merge-ref-first-parent-change-set
Sep 18, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
task/msd-ci-fc-merge-ref-first-parent-change-set

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Registers one failure class: FC-merge-ref-first-parent-change-set.

A gate that reasons about "what this PR changed" must compute that set as a three-dot diff
against the PR's live base. On a pull_request, GitHub's merge ref has BASE as first parent,
so walking first-parent or diffing HEAD~ describes the base's history rather than the PR's —
and the same walk on a local merge can select the incoming base-side files and drop the PR's own
files entirely. Three gates in this repository had that defect and it blocked a stacked PR from
being pushed at all.

The class is registered separately from the fix because the protocol allows exactly one added
definition per PR and two gate fixes were in flight together. #14465 carries the fix.

The prevention artifact is a test, and it already exists. The reusable guard is parent-order
invariance: the same files and the same commit subjects on the branch head and on a --no-ff
merge in both parent orders. That is what makes it a guard rather than a note — a future
rewrite to first-parent fails these tests rather than passing quietly.

Product invariants affected

none

How it was verified

python3 scripts/failure-class validate passes with the definition present. Every scope_hints
entry is a real tracked path, checked against git ls-files — worth stating because the
companion PR #14466 makes a hint matching zero paths an error, so this registration is also a
live exercise of that check.

Failure class (fixes)

Failure-Class: new

🤖 Generated with Claude Code

Review in cubic

A gate that diffs first-parent or HEAD~ on GitHub's merge ref computes the
wrong PR change set. The parent-order invariance tests are the guard.

Failure-Class: new
Co-authored-by: Cursor <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit a7c45cd into main Sep 18, 2026
42 checks passed
@Git-on-my-level
Git-on-my-level deleted the task/msd-ci-fc-merge-ref-first-parent-change-set branch September 18, 2026 03:09
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.

1 participant