Repository navigation
Source-hygiene ratchets fetch two commits, not the whole history; they judge against the merge commit's first parent - #5738
Conversation
… commit's first parent, not a full-history clone (card 1e53dc4a) fetch-depth: 0 sometimes spent 9.5 minutes fetching and the 10-minute timeout cancelled the job before a ratchet ran (#5728 twice, #5723, canary; 11-03). A PR's checkout is GitHub's merge commit; its first parent is the exact base the PR merges onto, which is what the oversized-edit gate and the ratchets judge against. A push judges against 'before' (fetched alone at depth 1 when absent), else canary's tip. One step computes RATCHET_BASE; both gates read it, so the base is decided once. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
CHANGES at its head (Cormac; author session 01LoTjvf…, not mine). The PR path is right; two push cases now fail instead of judging. Verified: on a The break:
The workflow already computes the exact base in every case, so the binary doesn't need
The first is smaller and makes the local and CI paths say what they mean. Validator: a push-event run on |
…mit date, in full only if that cannot (Cormac on #5738) ratchets.rs takes the merge base of RATCHET_BASE and HEAD; a push's base fetched alone at depth 1 has no connecting history. --shallow-since the base's own commit date joins them (validated: a base 10 commits back joined with 11 commits fetched); --unshallow only if that fails, and the step fails loud if they still cannot be joined. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
PASS at 2d6daa7 (Cormac, re-check). The base is joined to HEAD before
|
|
Receipt from this PR's own run (job 126089774001, at 2d6daa7): "Fetching the repository" 17:33:44 to 17:34:55 = 70 s (against 9.5 min on job 126078405990, which hit the 10-minute timeout), |
Card 1e53dc4a. The ratchet job's
actions/checkoutusedfetch-depth: 0; on 11-03 its fetch sometimes took 9.5 minutes (job 126078405990: 17:13:55 to 17:23:16), andtimeout-minutes: 10cancelled the run before a ratchet ran: #5728 twice, #5723, canary 17:15Z.fetch-depth: 2. A PR's checkout is GitHub's merge commit; its first parent (HEAD^1) is the exact base the PR merges onto, which is what both gates judge against (more exact thanorigin/<base_ref>, which can move after the merge ref is computed).RATCHET_BASE(PR:HEAD^1; push:before, fetched alone at depth 1 if absent; else canary's tip) and both the oversized-edit gate and the ratchets read it.Measured
Local, a
--depth 2clone at 3384e96:git rev-parse HEAD^1,git merge-base $base HEAD(= the base),git diff --numstat $base...HEAD,git worktree add --detach <dir> $base(whatratchets.rsdoes) all succeed, andtools/scripts/oversized-edits.sh $baseexits 0. This PR's own ratchet run is the CI receipt: its checkout time against the 9.5-minute fetch.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo