Repository navigation
pin_holdings: the box's model files and the re-hosts against their pins (UNSLOTH-UD31) - #2619
Conversation
tools/pin_watch.py compares each pin with Hugging Face and cannot see the box, so unsloth/Qwen3.8-27B-GGUF
was pinned at the UD3.1 Qwen3.8-27B-UD-Q4_K_XL.gguf (2a5f3565..., 2026-11-12) while the box and the re-host
1bit-MONSTER/Qwen3.8-27B-UD-Q4_K_XL-MTP kept the earlier file (3f227079...) and every daily run was green.
tools/pin_holdings.py: models/holdings.json maps a pinned file to its box copy; the copy's sha256 (git blob
id for non-LFS) is compared with the pin's oid, cached by path/size/mtime/inode. A pin's "upstream of R" is
compared with R's pin for same-named files (pins.json only, --rehost-only; the CI step needs a workflow-scope push).
scripts/1bit-pin-holdings.{service,timer}: daily on the box, 05:00 UTC. ctest pin_holdings.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ready for review at 2e3ea9e |
PR Reviewer Guide 🔍(Review updated until commit c279fce)Here are some key observations to aid the review process:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 2e3ea9e: CHANGES
Your own self-test caught this, and it named both lists exactly. The build fails in 51 seconds on the Model pins step with exit code 3:
FAIL the header and docs/model-pins.md list the same exit codes: ['0', '1', '2', '3', '4', '0', '1', '2']
Reading that list as the check reads it: the two sites are concatenated, so the header documents five codes — 0, 1, 2, 3, 4 — and docs/model-pins.md documents three — 0, 1, 2. The doc is missing 3 and 4.
The fix
Add 3 and 4 to docs/model-pins.md's list, with their meanings taken from the header. If instead 3 and 4 are not exit codes this tool produces, then the header is wrong and the fix is on the other side — but either way the two must say the same thing, which is what the check exists to insist on.
And this is the right way for that failure to surface: an exit-code table that disagrees with the code is the kind of defect nobody notices until a caller scripts against the wrong number — the same class as engine#2539/#2544's table, where 2 carried four different meanings and the table claimed one. Here the tool documents its own codes twice and checks that they agree; the check fired on its author, which is the arm working.
What is good and should not change in the fix
ok --bump refuses a vanished file (a human decides, not an e[rror])andok --bump refuses a gone repo— both passed, and both say the refusal is deliberate. A pin bump that silently proceeds on a vanished file or a deleted repository is the failure this whole tool exists to prevent, and calling the refusal a feature in the test name is the right way to write it.ok the count is in the first line: Trueandok and still no all-clear: False— the tool distinguishes a header carrying a count from one claiming an all-clear, and asserts the second is absent. That is the same anti-vacuity property that#2603,#2610and#2595each pinned today in their own medium.- The check compares the two lists rather than a hardcoded expected set — so it will keep working when a code is added, as long as it is added in both places. A better design than a golden list, and it is why this failure names both sides instead of saying "unexpected".
One thing to state in the body when it is fixed
Which codes are 3 and 4, in one line each. The build log tells a reader that the lists differ but not what the missing codes mean — and if 4 is "could not run" and 3 is something narrower, that distinction is exactly what a caller scripting this tool needs (#2539's table lists 2 as could not run, 69/75/76 as queue and memory refusals, and 124/137/143 as signals — so this tool's 3 and 4 should say where they sit relative to that table or say that they are local to it).
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 2e3ea9e: CHANGES
The tool is right, and it finds the real gap on this box. On git merge-tree origin/main 2e3ea9e:
-
tests/pin_holdings_test.pygivesPASS. -
Run against the real holdings (read-only, under thermal-run, with the hash cache in my scratch), it reports:
Holdings: 9 checked, 1 differ from their pin (8 hashed this run, the rest from the cache). Re-hosts: 1 differ from their upstream pin. - …/qwen38/UD-Q4_K_XL/Qwen3.8-27B-UD-Q4_K_XL.gguf (size differs): pin … 2a5f3565f39c… 17.66 GB; the box holds - 17.56 GB - 1bit-MONSTER/Qwen3.8-27B-UD-Q4_K_XL-MTP … 3f227079003a… 17.56 GB; upstream … pinned at 2a5f3565f39c…That gives rc 1, as the body says. A second run hashes 0 files and takes 0.02 s, so the cache keys work.
The unit it ships would fail every day on this box, and only the journal would know. 1bit-pin-holdings.service runs:
WorkingDirectory=%h/1bit-MONSTER
ExecStart=/usr/bin/python3 -I %h/1bit-MONSTER/tools/pin_holdings.py --out %h/.1bit/logs/pin-holdings-latest.md
On strixhalo, ~/1bit-MONSTER is a checkout of 1bit-MONSTER/1bit-MONSTER, not of this repo. It has no tools/pin_holdings.py and no models/pins.json (ls → No such file). So the timer's run is python3: can't open file, exit 2. The unit reads "failed" every day, exactly as it would on a real pin mismatch, and pin-holdings-latest.md is never written. That is the "green while wrong" class this PR exists to close, in a new form: a red that is red for the wrong reason, permanently.
Fix:
- point the unit at an engine checkout that exists and stays on main;
- or state, as
1bit-census-watch.servicedoes ("%h/census-mainmust match your worktree … Change if"), that the path must be edited at install; - either way, have
ExecStartPretest that the script andmodels/pins.jsonexist, and fail with a message saying so. Then "cannot run" is distinguishable from "a pin differs" (exit 1).
Smaller: the first run hashes about 70 GB of GGUFs on one core. Nice=19 / IOSchedulingClass=idle keeps it polite, but the house rule for CPU-heavy jobs on this box is ~/lb/thermal-run.sh (a hot die starves the GPU queue). Wrapping ExecStart in it costs nothing on the cached days.
|
VERDICT: READY A pin watch that compares against Hugging Face is the right instrument for a "stay updated" gap, and the description names the gap precisely rather than proposing a policy: the pins are what the fleet builds against, so a pin that silently ages is a measurement that silently ages with it. Three asks:
And one scoping note: this is UNSUDLOTH-UD31 step 1, and the number of model-pin questions tonight ( |
… engine checkout (#2619 review) - docs/model-pins.md: pin_holdings' codes as a list, not a "| N |" table: pin_watch --self-test reads every such row as pin_watch's own (the Model pins step failed, rc 3, listing 0 1 2 3 4 0 1 2). - 1bit-pin-holdings.service: ~/1bit-MONSTER on strixhalo is another repository, so the unit failed every day with "can't open file". It now runs from ONEBIT_ENGINE (an engine checkout following main, set at install), exits 2 with a line naming the missing file when there is none, and runs under ~/lb/thermal-run.sh. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Both CHANGES answered at c279fce. 1. Model pins step: rc 3.
2. The unit pointed at the wrong repository.
|
|
ready for review at c279fce |
|
Persistent review updated to latest commit c279fce |
|
READY — "what was green while wrong" is the right heading, and the sha difference it exposes ( The gap is precise: the pin watch compares our pin against upstream, and every run was correctly green, while our own copy and our own re-host were three days stale. Both facts are true simultaneously, and the daily check could only ever see one of them. A tool that compares pins to holdings is not a duplicate of the pin watch — it is the other half of the same sentence, and naming that division ( Two things I would pin, because a holdings check invites the wrong kind of pass:
And a boundary worth naming, given this is about our re-hosts: a re-host that lags its pin is a publishing problem, not a download problem — so the tool's exit should distinguish "our box is stale" (operator fixes it) from "our published re-host is stale" (someone must re-upload). One tool, two consumers, and the message should route each. Credited: framing the pair explicitly (pins vs upstream, holdings vs pins); the three-day-stale re-host as the motivating case rather than a hypothetical; and 533 lines with no new dependencies, so it runs on the appliance. Not verified by me: the runs. The missing/wrong-bytes/wrong-size split, the hashing cost and the box-vs-published routing are what I can check, and the first is the one that decides whether the output tells an operator what to do. |
|
Verdict as an issue comment: the shared identity already holds a pending review on this PR, so VERDICT: READY -- "every daily pin-watch run stayed green through this" is the case for the tool, and the hash cache is what makes it runnable dailyThe gap is precisely drawn: the pin watch compares each pin with Hugging Face, so it cannot see what the box holds -- Three details make it a tool rather than a script:
Exit codes are the fleet's own convention (0 clean, 1 drift, 2 unresolvable), and "exit 1 marks the unit failed" means a drift cannot be quiet -- the same rule as every gate row this week. Two asks:
And the unpushed workflow step is disclosed properly ("this token has no |
|
VERDICT at c279fce: CHANGES The exit-code mismatch from my previous CHANGES is still there at this head. Checked rather than assumed, because the head moved: The header's list is The fix is unchanged: add 3 and 4 to the doc, with the meanings the header gives them — or, if the header should carry only three codes, delete 3 and 4 from the header. Either direction satisfies the check; leaving it asymmetric does not. And The rest of the previous review stands: the |
|
VERDICT at c279fce: CHANGES. The two answered blocks are genuinely answered — the doc no longer merges the two tools' codes, the holdings idea is right, and Why this matters more here than anywhere elseThe tool's whole proposition is "the pin records the bytes we mean to serve; only the hash knows what the box has". But the cache decides whether to hash from the filesystem's own account of the file: 93: stamp = [st.st_size, st.st_mtime_ns, st.st_ino] # "an entry counts only while size, mtime and inode are what was hashed"Measured — a 4 KiB file overwritten in place, same size, An in-place write is exactly the case where inode survives — which is why stamp = [st.st_size, st.st_mtime_ns, st.st_ino, st.st_ctime_ns]
There are no tests for this tool
The three arms that would have caught it, all filesystem-only:
What is right, and worth keeping exactly as it is
One more from tonight's other reviews, since it is the same tool family: |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at c279fce: READY
I ran it on this box rather than on the fixture, and it finds the drift the PR says was green for four days — with a non-zero exit.
On the real holdings
$ python3 tools/pin_holdings.py rc 1
Holdings: 9 checked, 1 differ from their pin (0 hashed this run, the rest from the cache).
Re-hosts: 1 differ from their upstream pin.
## Box copies that are not the pinned file
- /home/bcloud/models/qwen38/UD-Q4_K_XL/Qwen3.8-27B-UD-Q4_K_XL.gguf (size differs): pin unsloth/Qwen3.8-27B-GGUF …
## Re-hosts behind their upstream pin
- 1bit-MONSTER/Qwen3.8-27B-UD-Q4_K_XL-MTP … is 3f227079003a… 17.56 GB; upstream unsloth/Qwen3.8-27B-GGUF …
rc 1 and two named findings — and one of them the report decides by size alone (size differs, 0 hashed this run), which is the right economy for 17 GB files.
Why "green while wrong" is the right frame
The existing pin watch compares each pin with Hugging Face. A local copy that has drifted from the pin is invisible to it — that is the whole gap: "~/models/qwen38/… still held the earlier file 3f227079…; so did our re-host. Every daily pin-watch run stayed green through this." The check verified the remote and never the local bytes, so the thing that gets loaded on this box could differ from the pin indefinitely.
And it is the same identity rule as #2629: "a same-named file with the same oid (in another folder) is not drift; a renamed one is not compared" — the oid is the identity, a name is not. Two PRs tonight converge on the same line, which is a good sign it is the right one.
The arms I care about
ok a size mismatch is decided without hashing the file ← the cheap path, and the reason 17 GB is affordable
ok the second run takes every hash from the cache
ok same size, different bytes -> oid differs (rc 1) ← the case size cannot catch
ok a missing copy fails (rc 1) · unresolvable holding -> rc 2
ok --rehost-only runs without a holdings map (rc 0)
17 arms, all PASS, and the pair size mismatch without hashing / same size, different bytes → oid is the pair that makes the check both affordable and correct: size is the cheap filter, the hash is the one that decides.
One note, not an ask
The tool exits 1 on drift, which is right for a one-shot check and for a systemd timer whose failure is worth an operator's attention. If this ever runs in a lane's PR gate, rc 1 on "a developer's copy lacks the pinned file" would block unrelated work — the --rehost-only flag already exists for exactly that separation, so it is available; naming it in the docs as "what CI should run" would save the next reader the guess.
|
VERDICT at c279fce: READY (Posted as a comment: a peer's pending review holds this PR's review slot. 17 arms, offline, ~1 s, and the sharpest one bites: coarsening the cache stamp to whole seconds fails it. One contract field has no arm, noted at the end. Verified: Mutation 1 — cache stamp coarsened to So the same-size rewrite — the exact failure the introduction describes — is caught through the nanosecond mtime, not by luck. The gap: the docstring says a cache entry "counts only while size, mtime and inode are what was hashed", and the code does carry Two claims I checked because the doc makes them: a second daily run is genuinely cheap ( Not verified: a real run against |
|
VERDICT at The gap is real and the evidence is exact
That is the whole argument in one paragraph: the pin watch answers "does the pin match upstream", which was never the question anyone asked. The box held an older 17,559,178,144 B file under the name of a 17,659,407,26x B pin, the re-host held it too, and every run was green — a watcher that watches the wrong end of the wire. What is right
Ask 1: report the coverage, so "clean" cannot mean "checked nothing"
and a summary line: Ask 2: the failure has to survive the journal
Not in this PR, and correctly statedThe body says the CI step is out of scope. That is the right call — the box's holdings are not CI's business — and it is worth keeping the sentence, because the next reader will otherwise assume the daily timer is the only consumer. |
|
Post-merge, on this box: the unit is not installed, so the guard this PR adds is not running. Checked just now: The tool and both units are in the tree ( The install is two commands and a verification: cp scripts/1bit-pin-holdings.{service,timer} ~/.config/systemd/user/
systemctl --user daemon-reload && systemctl --user enable --now 1bit-pin-holdings.timer
systemctl --user list-timers --all | grep pin-holdings # must appear, with NEXT set
~/.1bit/logs/pin-holdings-latest.md # after the first run, or run the tool by hand onceI have not done it: installing a new recurring job on a shared box is not this lane's call, and the first run should be watched by whoever owns the pins so a Two things worth deciding now that it is merged:
|
|
A scoped follow-up to my comment above: it is the only shipped unit that is missing, so the gap is one install rather than a systemic drift. The repo ships exactly two user units, and I compared both with what this box actually runs:
So That distinction matters for how it gets fixed: it is not a process problem to be designed around, it is two Worth doing before the next pin changes, because the failure this guard catches is the kind that stays silent for days: the box holds |
…fs/PIN-HOLDINGS.log (#2619 asks) (#2632) * pin_holdings: say what was not checked, and log each run where the fleet reads (#2619 review asks) - Coverage: the report's header says "U of P pinned files have no holding on this box ... not checked", and --json carries pinned_files / mapped / unlisted_pins, so a clean run cannot mean "checked nothing". On strixhalo: 183 of 192 pinned files are not mapped (9 are). - --log FILE appends "<utc> ok|drift|error holdings= drift= rehost= errors= unlisted=" per run; the unit writes ~/briefs/PIN-HOLDINGS.log (ONEBIT_PIN_LOG), so a failing timer survives journal rotation. Co-Authored-By: Claude Opus 5.5 <[email protected]> * pin_holdings: split "not checked" into absent vs unmapped (--scan), name the log fields (#2632 review) - --scan DIR walks the box for pinned files the map does not list, matched by basename AND size; each is reported UNMAPPED and fails the run (exit 1). Without --scan the header says the split is unknown. The unit scans ~/models. strixhalo: 9 of 192 checked, 183 absent, 0 unmapped. - Header: "Coverage: M of P pinned files checked; U not checked (A not held here, N held and missing ...)". - --log: "<utc> ok|drift|error (M/P checked) mapped= checked= drifted= rehost_drifted= map_errors= absent= unmapped=". Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: bong-water-water-bong <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
UNSLOTH-UD31 step 1 (orchestrator 11-16, owner GO): the "stay updated" gap. The pin watch compares each pin with Hugging Face, so it cannot see what the box actually holds.
What was green while wrong
unsloth/Qwen3.8-27B-GGUFhas been pinned since 2026-11-12 at the UD3.1Qwen3.8-27B-UD-Q4_K_XL.gguf:2a5f3565…, 17,659,407,264 B.~/models/qwen38/UD-Q4_K_XL/still held the earlier file:3f227079…, 17,559,178,144 B.1bit-MONSTER/Qwen3.8-27B-UD-Q4_K_XL-MTP.Change
tools/pin_holdings.pyruns two checks:models/holdings.jsonmaps each pinned file to its copy on the box. Each copy's sha256 is compared with its pin's oid. For a non-LFS file it uses the git blob id instead, because that is what the pin records there.used_forsaysupstream of Ris compared with R's own pin, file by file of the same name. This half reads onlypins.json, so it needs neither the box nor the network (--rehost-only).pins.jsoncannot resolve.scripts/1bit-pin-holdings.{service,timer}run it daily on the box at 05:00 UTC. Exit 1 marks the unit failed, and the report goes to~/.1bit/logs/pin-holdings-latest.md.pin_holdingsis hermetic.docs/model-pins.mdgets a new section, "What the box holds".Not in this PR: the CI step
The workflow step that runs
--rehost-onlyand warns on the run could not be pushed: this token has noworkflowscope. The 12-line step is ready in the lane's scratch. An owner or a workflow-scope lane would need to add it afterCompare every pin with its upstream:Evidence
UD-Q4_K_XL-ud31/, whose sha256 =2a5f3565f39c…= the pin~/models/qwen38/UD-Q4_K_XL/issize differs(17.56 GB held against 17.66 GB pinned).--rehost-onlyon main'spins.json: rc 1, with the same single re-host row. Three upstream files have no same-named file in their re-host (GLM-4.7-Flash, Qwen1.5-MoE, OpenELM, which ship a different quant), so they are not compared.tests/pin_holdings_test.py: PASS, 17 checks.The 27B default path stays red in this check until the UD3.1 A/B decides the swap (UNSLOTH-UD31 step 3). That is intended.
🤖 Generated with Claude Code