Repository navigation
Conversation
…ll request A pull request based on main that was built on another open pull request lands both changes in one squash commit under one title and leaves the other open with nothing to add. Scripts/stacked-pull-request-check.py finds a branch whose open pull request holds the head commit of another and is not based on that one's branch, and the push hook runs it on the branch being pushed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo
…cked-pull-request-check
Timing of 685a9a7Wall times measured in this run. A wall time, peak memory, size or growth row over its limit is reported here and fails no check; a shape the tool cannot generate still fails "Check Generate Time on Linux". Every run rewrites this comment, and a check that did not run in it is not listed.
Every shape and row
Growth, the head tool alone: each row at its layers and at 2 more, or at the two numbers it names; median of 3 alternating runs for time, and of 3 more with one allocator arena for peak memory. A measure fails at 2 times the smaller graph's, or at the limit beside it.
The compiler's time on single functions: 0 finding(s), reported and not failed. The compiler's time on single functions of SafeDICore, release build.
|
Summary
A pull request that builds on an open pull request takes that one's branch as its base, lands after it and never contains it, so that its diff shows only its own change. Two changes that must land together are one pull request from the start. A pull request based on main that holds another's commits lands both in one squash commit under one title and leaves the other open with nothing to add.
Scripts/stacked-pull-request-check.pychecks this. With no argument it reads the branch checked out, and exits 1 when that branch has an open pull request that holds the head commit of another open pull request and is not based on that one's branch; for a branch with no pull request yet it names the base its pull request must take.--allchecks every open pull request as GitHub has it. The push hook Claude Code runs (.claude/hooks/lint-before-push.sh) calls it after lint and blocks the push at exit 1. When GitHub cannot be read the push goes through with a line that the check did not run.Generated output: unchanged
Tests
The script's self-test holds eight cases on stand-in pull requests: one on main that holds another's head fails, one based on the pull request it holds passes, a branch with no pull request is told which base to take, and a stack of three is judged by its outermost base. CI runs it beside the other script self-tests. The hook was run by hand against a branch that breaks the rule, and blocked it.
Found and not fixed
.claude/hooks/pre-push) does not run the check. Left: it runs in clones where no GitHub token may be present, and its self-test pushes between stand-in clones that have no pull requests.Generated by Claude Code