Repository navigation
fix(ci): a merge train fails when a member's content did not arrive (#20406) - #20530
Conversation
…20406) A member's commits can be reachable and its PR MERGED while its files are not on main. The gate reads the content: each member at its own merge commit before landing, and what the train changed against main after it. A declared member with no merge, or a merge it cannot account for, fails too.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 23 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Code review on PR #20530 (head 73b675d): approve. Read only; the gate's logic was reproduced with git commands and the gate itself wasn't run. Measuring each member at its own merge gives no false red on the current trains with deliberate in-train fixes, #20442 and #20455. The workflow is safe: title via env, read-only, full history, and a git error is unmeasured rather than green. Follow-ups, none blocking:
|
…rge (#20406) A drop in a member's first merge moved the base and went unseen. A head already in the train measured nothing and passed; it now fails, unless it is already on the base. A deliberate drop can be named in the PR body, and only the title's member list counts as declared.
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
|
Code review on PR #20530 (head 986ee8f): approve. Read only; the gate wasn't run. This head is |
Thinking Path
Train PR #20271 merged #20179 with an empty diff. Its commits were reachable and the PR read MERGED, but its files weren't on main. The cause is still unknown, so this gate checks the result and not how a train is built. It measures each member at its own merge commit, because at the tip a deliberate in-train fix reads as a loss.
What Changed
pipeline-scripts/train_content_gate.py:--rangejudges eachMerge #N @ shaat its merge. A member fails when a file it added is missing, a file it deleted is still there, or under half of a file's added lines are present. A member merged twice is judged at its last merge against the base of its first, so a drop in the first still counts. A head already on the train's base passes with a note; a head reachable only through the train fails as unmeasured. A re-merge with no new commits makes no merge commit, so the earlier one stands.--bodylets a train name a deliberate drop:train-content-drop: #N path reason.--titlecompares against the member list in the train PR's title,chore(merge-train): #N #N. A declared member with no merge fails, and so does a merge the gate can't account for.--landedchecks that a file the train changed, and main did not, reached main byte-identical.UNMEASURED..github/workflows/train-content-gate.yml: runs ontrain-*PRs and when one lands. Other PRs skip the job.Commit note: the move to
run_gitand the rename toContentReportare in the commit titled as the floor repin, because their own commit failed on an isort reformat.Verification
The tests build real git histories, including the
-s oursshape of #20179.Against real trains on main:
The train-level table is from the final code, using each train's real title. The file counts are from before the first-merge base, which raises them on some trains. The landing check passed on all 12 before these follow-ups; it wasn't changed since. On #20271, the shape asked about in review:
^2isn't in^1, and base b28e9d4 differs from head 9b7eecf, so #20179 is flagged through the normal path. #20406 counted 5 missing files for #20179; the other 22 are partial losses in modified files.Not checked: a run of the workflow itself, which first happens on the first train after this lands.
Code review found gaps, fixed here: base equal to head, a drop in a first merge, no named exception, and a loose title parse. An earlier
code-reviewerpass found: traceback on a non-merge landing, a member never merged, quoted paths, reading the head from the subject.Risks
chore(merge-train): #N ...turns that check off.train-contentrequired on main is a Settings step for the maintainer.Refs rather than Closes: the cause and the wider audit remain on #20406, and #20381 keeps its unread commits.
Model Used
Claude Opus 5.5
Issue Link
Refs #20406, #20381
🤖 Generated with Claude Code