Skip to content
zit Ambiguous Artifact ID
Login

Ambiguous Artifact ID

The artifact hash prefix b227f is ambiguous and might mean any of the following:

  1. b227f1da67a81e66c8ff7d29537c05da4733e0b3846a8ebbd13e7d592d74710f -

  2. b227feb25fc2ce0d718c26e273af7d4cf58df9f9273f702d4840ac0b3e1dd622 -

    • File src/git_import_e2e.zig — part of check-in [84d3fe8f32] at 2026-08-10 01:23:44 on branch sub-manifest — repocache: extend across appends; import warms at completion

      The derived-state cache was all-or-nothing: any log append was a total miss, and the next read re-derived the whole store. On a real 1M-artifact pkgsrc store that was 352s per cold read, re-paid after every commit.

      Repository.open's miss path now distinguishes growth from rewrite. On growth it replays the cached record body (parse-free), folds only the tail frames through the same crosslink fold a cold derive uses, and rewrites the cache: every append healed by the next read at O(tail). Measured on pkgsrc: 352.31s cold, 2.40s after a commit, output byte-identical to a forced full re-derive.

      Sound because extension refuses whenever the fold could be wrong rather than stale: validatePrefix proves the old tail frame still verifies at its offset (a rewritten log cannot extend), and a shun fingerprint in the cache header forces the full derive on any shun-table change, since the body was distilled under the old mask. Cache format v2; a v1 cache misses once and rebuilds.

      import-git now warms the cache at completion, after the atomic rename, against the published store -- clone has done this since warmCacheFromLog existed, so an import-built store no longer defers the whole derive onto its first reader.

      Tests: extension equals cold derive with a fork and control tag in the tail; a forged-cache canary proving the fold starts from the stored body; shun change takes the full derive with the mask applied.

      Also backs out 1a4b74f2d5 (parallel staging): measured ~3% on a corpus where staging is ~5s of 149s -- threading complexity the number never justified. Closes #51. (user: dmestas, size: 146286) [annotate] [blame] [check-ins using]