Repository navigation
registry_build: --from-tarball answers the content question in one command (engine#3212) - #3215
bong-water-water-bong wants to merge 1 commit into
Conversation
|
One cost worth knowing before a lane uses this, measured: the cache is ~240 MB per pin. So the first Options, and the one I would pick: keep only the latest extracted tree and delete the previous one on a new fetch ( The tarballs are also cheap to re-fetch (39 MB, ~1 s on this box's link) — so a |
| top = tf.getnames()[0].split("/")[0] | ||
| tmp = dest + ".part" | ||
| os.makedirs(tmp, exist_ok=True) | ||
| tf.extractall(tmp) |
…mmand (engine#3212)
`registry_content` derives the registry from third_party/llama.cpp and answers 77
where that submodule is absent -- which is most of the fleet's checkouts. That is
right (a skip is not a pass) but it means "did the fork's architecture tables move
with this pin?" has been answered by hand on every bump: download the pinned sha's
source tarball, extract it, call this tool's own hf_to_gguf()/runtime_archs() on the
result, compare with the committed file. Three times in one session, ~40 MB each.
tools/registry_build.py --check --from-tarball
does it instead: the sha comes from `pin(HRX)` (the INDEX, so a staged-but-not-
committed bump cannot be laundered), the slug from `.gitmodules`, the tarball is
fetched once into ~/.cache/1bit-registry-tarballs/<sha> (ONEBIT_REGISTRY_TARBALL_CACHE
overrides), extracted, and the same derivation runs against it. The cache keeps ONE
pin: a new sha prunes the previous tree+tarball, on a fetch AND on a cache hit
(ONEBIT_REGISTRY_TARBALL_KEEP=all keeps the history) -- ~240 MB per pin otherwise,
which would grow on every bump.
Measured on this box:
--check --from-tarball fetch 38 MB, extract, derive, compare -> rc 0, 7.19 s
second run "tarball already extracted", no fetch, rc 0
known answer, three pins a87cc5a74, a9c849c6a, 7737fa364 each derive
350 classes / 9 npu / 350 architectures / 350 mapped --
the same figures the three bump PRs committed by hand
a sha the fork does not carry 404 -> rc 2 "cannot tell, not a pass"
committed registry edited by hand -> rc 1 "is stale"
Default unchanged, deliberately: without the flag the row still prints its 77 skip
message and touches no network. A failed fetch, or a cache entry that is not the
fork's tree, is cannot-tell (2), never clean.
--self-test covers the three offline fail paths (no pinned sha, no slug in
.gitmodules, a cached dir without src/), wired as the `registry_build_self` row.
3a1da86 to
4b67635
Compare
|
Closing into #3214 — it was opened eleven minutes before mine and does the same thing, and I should have run |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Closes #3212. The content question — did the fork's architecture tables move with this pin? — has been answered by hand on every bump: download the pinned sha's source tarball, extract it, call this tool's own
hf_to_gguf()/runtime_archs()on the result, compare with the committed file. Three times in one session, ~40 MB each. It is now one command.What it does, and the four constraints the issue named
pin(HRX)— the index, not from the fetched tree, so a bump staged but not committed cannot be laundered into a matching registry;.gitmodules(fork_slug(), matched on thepath =line), never a guessed default;~/.cache/1bit-registry-tarballs/<sha>/(--from-tarballprints the URL, the size and the cache path;ONEBIT_REGISTRY_TARBALL_CACHEoverrides the location);build(tree), i.e. the same code path the submodule case runs — no second implementation to drift.Measured here, not asserted
Those three pins and those figures are the issue's own table, which its author produced by hand — so the command reproduces the manual answer, on the same three inputs, and the mutant shows it still fails when the committed file disagrees.
The default is untouched, on purpose
Without the flag,
registry_contentstill printsand exits 77 — verified in this branch's own checkout, which has no submodule. A networked row would make a deterministic gate depend on the network, which is the trade the issue explicitly refused.
Arms
--self-test, wired as theregistry_build_selfrow, covers the three offline fail paths: no pinned sha → no tree; no.gitmodules→ the slug is unknown rather than guessed; a cache entry that exists but has nosrc/→ still cannot-tell. 4/4, and every failure is asserted to have said why.What I did not make a row: the fetch itself. It needs the network, and a networked ctest row is exactly what the default's 77 exists to avoid; its known-answer run is the three pins above, recorded here.
pre-pr-checkson this branch: 16 green / 3 skipped / 0 could not be told.