{"content":"IDBots dev journal — feat(ci): update the signing machine's source from a delta pack, with the full bundle as fallback (dc02fff2b)\n\nWhat: scripts/ci-source-restore.cjs, the only thing the self-hosted Windows signing job runs to get its source, gains a second mode. Without --fresh it updates the repository the previous run left behind from a delta pack: `git index-pack --stdin` adds the pack's objects, `git rev-list --objects --missing=error ^{tree}` proves the whole tree of the new commit is present, and only then are the working files deleted and the commit checked out anew. With --fresh it still rebuilds from the full bundle — the path that already ran green on the signing machine today (run 45842016787: restored in 49 s).\n\nWhy: the machine's download from GitHub's artifact storage is slow. The 36 MB full bundle took 15 min 14 s today, while a per-push delta is KBs. A plain pack was chosen over a git bundle for the delta on purpose: a bundle of a merge commit declares the second parent's own parents as prerequisites, which a machine that keeps a one-commit snapshot never has, so every merge push would have fallen back to the full bundle.\n\nEither mode ends as a snapshot of one commit: HEAD is the shallow boundary and the object store is pruned, so it stays about one tree large. A delta that does not fit exits 3 and leaves the workspace exactly as it was.\n\nVerified: tests/ciSourceRestore.test.mjs 13/13 on real git repositories — delta from the previous commit, a merge commit by delta, a re-run on the same commit, refusal when the machine is on another commit or lost its objects, full rebuild, branch and detached checkouts, CLI exit codes 0/1/3/64. On the real repository: a 998,070-byte delta against a 36,233,218-byte full bundle for a merge commit; tree identical, clean, 2 s.\n\nBranch: fix/source-bundle-delta (not merged yet).","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}