{"content":"IDBots dev journal — fix(ci): the source delta stays a delta when the base lies beyond the checkout's two levels (95b260d09, 2026-11-28)\n\nWhat went wrong: the \"delta\" of run 46051725913 was 5132 objects and 36.3 MB — the whole tree, as big as the full bundle — and took 5 minutes 58 seconds to come down the signing machine's link. It restored fine (57 seconds, in place), so nothing was red; only the size was wrong.\n\nWhy: scripts/ci-source-cut.mjs lists what the new commit reaches beyond the base with `git rev-list --objects --not `, in the hosted runner's checkout, which is two levels deep; a base further back is fetched on its own at depth one. git excludes the base's objects through parentage alone: it marks the tree of an excluded commit only when that commit is the parent of a commit being listed (list-objects.c, mark_edges_uninteresting). A base fetched on its own is nobody's parent in a two-level history, so its tree is never marked, and every object of the new commit's tree is listed. That is the shape of any push that stacks two commits or more. A single merge commit on top of the previous tip keeps the base as its first parent, which is why the three deltas seen before were 123 KB to 1.2 MB.\n\nHow it was found: reproduced from the pushed commit, in a two-level clone with the base fetched beside it — 5132 objects, 36,347,427 bytes, to the byte what the source job cut. With the history deepened to reach the base: 106 objects. With --objects-edge-aggressive: 75.\n\nChange: the listing asks for --objects-edge-aggressive, which has git mark the excluded commits named on the command line, whoever their children are; the edge lines it adds — one per excluded commit, starting with a dash — are left out of what goes to pack-objects. They are not objects: a pack cut from a list that still holds one is invalid (\"pack has 55 unresolved deltas\"), and pack-objects writes it without a word.\n\nA correction to the merge entry before this one: it said 39 KB would have done. That figure came from exactly such an invalid pack, measured by hand before the tool filtered the edge lines. The delta for that push is 804,199 bytes, 75 objects: 41 blobs, 3 commits, 31 trees.\n\nTests: the existing case for several commits pushed at once already built this shape, but only checked that the machine restores from the delta — and a whole-tree delta restores too. It now holds the delta to being one: six objects, not one of them among the objects of the tree the machine is on, the two new files in it; and it states its precondition, that the base stands beside the checkout's history, not in it. The join-merge case is held to the same rule, nothing the machine already has travels again. With the tool as it is on main the strengthened test fails; with the fix, 5 of 5. The gate job's exact command 65 of 65 with and without a guessable git identity; test:ci-tooling 99 passed and 1 skipped; check:chain-coverage exit 0.\n\nAt real scale, for the push of run 46051725913: the fixed tool, run in the two-level clone, cut 75 objects, 804,199 bytes; the restore tool put that pack onto a snapshot of the base in 3.4 seconds (updated); the machine's tree equals the commit's tree; no working file differs from HEAD.\n\nNot yet seen in a real run: a push that stacks two commits or more, after this is merged.\n\nBranch: fix/ci-source-cut-disconnected-base. Not merged yet.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}