Repository navigation
fast gates: deepen a pull request's checkout so a head that brings the base in is not read as adding the whole tree - #24539
Conversation
The pull_request checkout holds the merge ref at depth 2: the merge and its two parents. The PR head's own parents are cut, so a cut head reads as a root commit that adds the whole tree. On #24526 at 3a47dc1 the head was a commit bringing the base in; `rev-list --no-merges` listed it (a cut merge shows no parents) and the Sidebar-Look check saw it add 162 sidebar files. prepare now deepens the pull_request checkout with the same rule the dispatch path already used (shared as deep_enough/deepen): until the base meets the head at its true merge base with no cut between them. A full clone is left alone, as before. Tests: a depth-2 merge-ref checkout whose head brings the base in. After prepare, rev-list base..merge --no-merges is only the PR's own commit, and that commit's diff is only its own file. This fails on the old script with the cut merge listed instead. A full-clone pull_request fetches nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: |
|
Bead |
|
Found 8 test failures on Blacksmith runners: Failures
|
|
|
|
Owned by cx4-land24539 on huge-blue |
… while checks run (#1601) * glaeda-gh: over 100 checks, a superseded cancel does not end the wait while checks run GitHub's rollup still counts a superseded attempt that was cancelled, so with more than one page of checks a FAILURE rollup and no shown failure was read as a failure past the first page, and the wait exited 1 after 5s while 7 checks still ran (manaflow-ai/cmux#24539). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray * glaeda-gh: a shown failure still ends a --until required wait over a superseded cancel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Review (codex xhigh, correctness first): SHIP at 094e44f The exact head preserves the dispatch path's merge-base/deepen loop and shares it with pull_request preparation. Raw SHAs work with rev, merge-base, rev-list, and reachable-SHA fetches; full clones return before fetching. The depth-2 regression is covered by No blocking findings. Nits: an unavailable or unauthenticated remote would fail while deepening (the CI checkout has its public origin), and histories over 5,000 commits fall through to Verification: |
|
Shipped in:
|
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
The prepush "Sidebar-Look:" check in Fast gates on the merge fails a PR whose head commit brings the base in, even when the PR doesn't touch the sidebar.
Leo: "The fast-gates sidebar-look-owner false red that fails every PR must diff against the real merge base."
Why it happens: on #24526 at 3a47dc1 it reported 162 sidebar files. The pull_request checkout holds the merge ref at depth 2, which is the merge and its two parents. The PR head's own parents are cut off, so git treats the head as a root commit that adds the whole tree, and
rev-list --no-mergeskeeps it even when it is a merge, because a cut merge shows no parents. Any per-commit gate reads it the same way. transcript-parity got past it by rebasing #24526 to an identical tree (a7e8cfe), but every lane that updates from base would hit it.Fix:
preparedeepens the pull_request checkout using the rule the dispatch path already uses, now shared asdeep_enoughanddeepen: keep deepening until the base meets the head at its true merge base, with no cut between them. A full clone is left alone, as before.Tests
test_pull_request_deepens_so_a_head_that_brings_the_base_in_is_not_a_cut. It sets up a depth-2 merge-ref checkout, the same thing actions/checkout fetches, whose head brings the base in. Afterprepare,rev-list --no-merges base..mergeis only the PR's own commit, and that commit's diff lists only its own file. On the old script the test fails, listing the cut merge commit instead.test_pull_request_in_a_full_clone_fetches_nothing_more.tests/test_cmux_next_fast_gates.py: 59 tests, OK.tests/test_ci_no_shallow_dev_fetch.py: OK.Observed / Not run
Changelog
none
Agent session: huge-blue
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the "Sidebar-Look:" prepush check failing a PR whose head commit brings the base in, even when the PR doesn't touch the sidebar — on #24526 it reported 162 sidebar files.
The pull_request checkout holds the merge ref at depth 2, cutting the PR head's own parents, so git reads the head as a root commit that adds the whole tree (
rev-list --no-mergeskeeps it because a cut merge shows no parents).preparenow deepens pull_request checkouts with the rule the dispatch path already used, extracted into shareddeep_enough/deepen: keep deepening until the base meets the head at its true merge base, with no cut between them. A full clone is left alone, as before.Tests
prepare,rev-list --no-merges base..mergelists only the PR's own commit. Fails on the old script.Written for commit 094e44f. Summary will update on new commits.