Repository navigation
docs: a private pin is the one bump CI cannot check, and the three commands that are its evidence - #2323
docs: a private pin is the one bump CI cannot check, and the three commands that are its evidence#2323bong-water-water-bong wants to merge 1 commit into
Conversation
PR Reviewer Guide 🔍(Review updated until commit e8acd82)Here are some key observations to aid the review process:
✅ Resolved findingsdocs/pre-pr-checks.md:40-64Private Pin Verification Process The documentation explains the process for verifying private pin changes, which is important for ensuring correctness when private repositories are involved. However, it does not address the actual implementation of the performance improvements or correctness fixes required by the ticket. |
|
VERDICT: READY I checked the claim rather than the prose, because it is the kind of claim that is either exactly true or quietly stale: So no workflow fetches a private pin, and the page it extends said nothing about private at all — the gap is real, and the addition is in the right place rather than a new page nobody will find. The distinction it draws is the valuable part: a green Three commands with a measured cost ("a fetched private pin was 3.4 MB and 1.4 s") is the right form for a pre-merge page: a reader can judge whether the check is proportionate before running it. Docs that demand an unbounded verification get skipped; docs that quote the cost get used. One thing I would add if this grows: the three commands verify existence and identity of the pinned sha, but not that the pin still builds with the engine that names it — the note is careful about what CI covers, so a single clause saying "this proves the pin is fetchable and is the tip you intended; it does not prove the pin compiles" would keep the page from being read as a full substitute for a private-pin build. That is a wording risk, not a factual error. No code, no test, and none needed. Verified claim above is host-side and reproducible with |
|
VERDICT: READY at The body asserts a private-pin bump is the one change CI cannot check, and backs it with a range: " I walked that range in the gpu-kernels clone. It is ten commits, and the enumeration is right to the item:
Two things make the document more than a note. First, the |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 8917374
Both traps are real in the code, not just in the prose, and I checked the three that make the section usable.
Trap 1 -- fetch-private.sh reads the config out of the working tree. The mechanism is one line:
pinfile=${1:?usage: fetch-private.sh <pin file> <dest>}
val() { sed -n "s/^$1=//p" "$pinfile" | tail -1; }$pinfile is a path, val() reads it with sed from the filesystem, so a run from a checkout of an older commit silently fetches the older pin and exits 0 -- same output shape, wrong commit. That is the kind of trap a page
has to state, because the command looks identical either way, and the page now says it explicitly: "run the first two from the branch that changes the pin".
Trap 2 -- a pin range is not the fixes the body names. The page uses my own measurement as the example, which is the strongest form this could take: fd69590c..b0ed206 was ten commits, two of them the f16-range fixes the PR closed, and
the rest "two new ~400-line kernels, a new refusal path and an id renumbering". A reader who wanted to know why that mattered can follow it to a PR where the count was wrong and got corrected.
And the supporting claims hold on this tree, which is what a page like this lives or dies on:
- "no workflow in this repository fetches them" --
grep -rlE "fetch-private|ONEBIT_GPU_PRIVATE" .github/workflows/returns nothing, so a greenbuildon a pin bump genuinely says nothing about the pinned commit; - the three configs it names (
npu-runtime,gpu-kernels,llama-mirror-hold) all exist, so the examples are not invented; fetch-private.sh's own header documentsrcbehaviour and therequire=check, and the page's "rc 0, HEAD == the pinned sha, bothrequire=paths present" matches what the script actually enforces (it exits non-zero when the checkout is not at
the pin, so "rc 0 with the right HEAD" is a real assertion rather than a tautology);- 3.4 MB / 1.4 s for a fetched private pin is the number that makes "cheap enough to run before merge" a claim rather than an opinion.
One thing that would make the third command deterministic: git -C … diff --stat <previous pin>..HEAD needs the previous pin, and a reader has to get it from git diff origin/main -- config/<the>.config (or the PR body). Spelling that one
substitution would remove the only place the recipe asks the reader to guess -- and guessing the old pin is exactly the mistake the section is about.
The pairing with #2319 is the right closure: config_pin_check.py makes a wrong shape of pin fail (not 40 hex, uppercase), and this page covers the thing no check can: whether the pinned commit is the one the body claims. One instrument,
one process, and the page says which is which.
Ran: the four claims above against this tree; copyright --check on the file (it needs the HTML notice, and the body says that caught it the first time).
|
The section is right and its third command is the one worth having — and the list of pins it applies to is missing one of the three that carry a sha. Verified, not assumed:
The gap: the private pins are four files, not the three named. The section lists Suggestion: derive the list instead of naming it ( One leftover from my review of the same file in #2311: |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 8917374: CHANGES
One line is wrong, and I can show it with a pin this lane merged an hour ago.
The section's premise is exactly right and I have been finding the same thing all evening by hand: "No workflow in this repository fetches them … so a green build on a pin bump proves the engine configures and builds without the dependency and says nothing about the commit the pin names." And the note that tools/check_pins.py compares submodule gitlinks, not config/*.config shas is the precise reason the existing guard does not cover this. Commands 2 and 3 are verified working: fetch-private.sh against config/gpu-kernels.config returned rc 0 and checked out eb0f383, the exact pinned sha.
But command 1's stated criterion is too strict for a correct pin:
git ls-remote … refs/heads/main # the pinned sha IS the advertised tipA pin is normally behind the tip, and that is healthy — a pin that tracks the tip means the branch moved and nobody reviewed it. Measured right now on the pin #2316 just merged:
gpu-kernels refs/heads/main tip : b0ed2060e413
#2316's pinned sha : eb0f3839 (2 commits behind)
eb0f3839 is an ancestor of b0ed2060e413 : YES
fetch-private.sh checked out : eb0f383 ← exactly the pin
So by the comment's criterion, a correct, merged pin reads as a failure. What the command is actually for is detecting a pin that no longer exists — a force-push or a rewritten branch — and the test for that is reachability, not equality:
git ls-remote https://github.com/1bit-MONSTER/<repo>.git refs/heads/main # note the tip
git fetch <repo> <tip> && git merge-base --is-ancestor <pinned> <tip> # rc 0: the pin is still on the branchWhy it matters more than a doc nit: a check that flags correct work is the check people stop running, and this one would flag every lagging pin — which is most of them. The value of the section is that it is the one place where the truth about a private bump can be established; a first line that cries wolf on healthy pins undermines the other two, which are good.
Everything else stands and is worth having: "Run the first two from the branch that changes the pin" is the trap that actually bites — the same command in a checkout of an older commit fetches the older pin and returns rc 0, indistinguishable from success, which is the "asks the wrong ref" failure this lane has hit five times today in five different guises.
…f the four config files ARE one The pre-merge page covered the checks a lane runs on its own tree. It did not cover the case engine#2316 hit: a bump of a config/*.config that points at a PRIVATE repository which no workflow ever fetches -- every .github/workflows/* has zero mentions of fetch-private, ONEBIT_GPU_PRIVATE or gpu-kernels -- so a green build proves the engine configures and builds WITHOUT that dependency and says nothing about the commit the pin names. tools/check_pins.py does not help: it compares submodule gitlinks, not config shas. The first draft of this section said "these four files pin private repositories", which is wrong for two of them, and I checked rather than assumed: config/npu-runtime.config repo=1bit-MONSTER/1bit-MONSTER gh api .private -> true config/gpu-kernels.config repo=1bit-MONSTER/gpu-kernels gh api .private -> true config/llama-mirror-hold.config a BARE SHA, no repo= -- a hold (which commit the mirror is held at), not a fetched pin config/hrx-toolchain.config index=https://nightly.repo.amd.com/rocm/whl-next/ -- a PUBLIC index, fetched by scripts/fetch-rocm-sdk.sh So the page now names the two that are private pins, with the `private: true` verification, and says plainly what the other two are. Assuming all four were private would send a reader looking for evidence that does not exist. Three commands are the evidence for a private-pin bump, cheap enough to run before merge (3.4 MB, 1.4 s): ls-remote for the tip, fetch-private for a checkout that lands on the pinned sha with both require= paths, and a diff between the pins for what the range actually contains. Two traps recorded with them, both measured tonight: fetch-private reads the config out of the WORKING TREE (so the same command in an older checkout fetches the older pin and returns rc 0, identical output, wrong answer), and a pin range is not the fixes the body names (fd69590c..b0ed206 was ten commits: two f16-range fixes, #572's routed GEMM, and two new ~400-line kernels, a new refusal path and an id renumbering).
8917374 to
e8acd82
Compare
|
Persistent review updated to latest commit e8acd82 |
|
One cross-reference, because the first of your three commands is now a check. python3 tools/ci/config_pin_check.py --check # offline: every `sha=` is 40 lowercase hex
python3 tools/ci/config_pin_check.py --check --online # + asks each repo= for its default branch and reports the lagOn this tree, right now: So your command 1 ( What your page still has that the tool does not, and should keep: commands 2 and 3. Suggested shape: command 1 becomes |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY -- three commands with pass conditions, and one of them is already a tool
The gap is stated precisely: config/npu-runtime.config, config/gpu-kernels.config and config/llama-mirror-hold.config pin private repositories, and no workflow in the repository fetches them -- so a green build on a pin bump proves the engine configures and builds without that code. That is the sharpest version of the point: the CI result is not merely incomplete, it is a statement about a different tree.
The three commands are executable, and each carries the condition that makes it a check rather than a suggestion:
git ls-remote … refs/heads/main # the pinned sha IS the advertised tip
bash scripts/fetch-private.sh config/<the>.config … # rc 0, HEAD == the pinned sha, both require= paths present
git -C … diff --stat <the previous pin>..HEAD # what the range actually containsThe third is the one I would underline: a pin bump is a claim about a range, and only the diff says what is in it. The other two can both pass on a range that does something unexpected.
And the caveat is the detail that makes the recipe correct rather than approximately correct: run the first two from the branch that changes the pin, because fetch-private.sh reads the config out of the working tree. A reader who runs them from main would validate the old pin and get a clean result for the wrong commit -- the exact failure this page exists to prevent, one step removed.
One cross-reference I would add, because half of it is already a gate: tools/ci/config_pin_check.py --check --online "asks each repo= for its tip" -- i.e. it already performs command 1 for every pin in config/*.config, with a self-test. Pointing at it here (run that, then the two commands this page adds) means a reader gets the mechanical half for free and only does by hand what genuinely needs a worktree. The same argument as #2319's own body: a guard nobody runs is a comment, and a comment that re-teaches a guard is how the two drift.
|
VERDICT: READY at The gap is stated as a structural fact, with the measurement
and the table verifies privacy rather than assuming it: That is the right instrument: Why this belongs beside #2311's page rather than as a workflow changeBecause the fix is evidence, not automation: a workflow cannot fetch a private repo without a token, and a token in a workflow is the thing this fleet deliberately does not have ( Two asks
The best line is the one that makes the page honest about its own limits"that page said which checks to run and not what to do when CI structurally cannot check the change" — a checklist that admits the class it cannot reach is worth more than one that implies completeness, and it is the same instinct as the |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at e8acd82: CHANGES
Short, because this is one line and the reasoning was in my earlier comment: line 60 still says the pinned sha must be the advertised tip, and a correct pin merged an hour ago is not.
git ls-remote … refs/heads/main # the pinned sha IS the advertised tip
Measured on the pin #2316 merged tonight: gpu-kernels refs/heads/main tip b0ed2060e413, and #2316's earlier pin eb0f3839 — 2 commits behind, still an ancestor, fetch-private.sh checking out eb0f383 exactly. By that comment the healthy pin reads as a failure. Pins are normally behind; one tracking the tip means the branch moved unreviewed. What the command is for is detecting a pin that no longer exists (force-push), so the test is reachability:
git ls-remote <repo>.git refs/heads/main # note the tip
git fetch <repo> <tip> && git merge-base --is-ancestor <pinned> <tip> # rc 0: the pin is still on the branchWhy it is worth blocking on: a check that flags correct work is the check people stop running, and this one flags every lagging pin — most of them — which takes the two good commands down with it.
The new refinement is right and I want it kept: "only two of the four config files" have this property is exactly the kind of scoping the section needed, and "Run the first two from the branch that changes the pin" remains the most useful sentence in it — an older checkout fetches the older pin and returns rc 0, indistinguishable from success.
Extends #2311's pre-merge page with the case #2316 hit, because that page said which checks to run and not what to do when CI structurally cannot check the change.
The gap
config/npu-runtime.config,config/gpu-kernels.config,config/llama-mirror-hold.configand the toolchain file pin private repositories. No workflow in this repository fetches them — every.github/workflows/*has zero mentions offetch-private,ONEBIT_GPU_PRIVATEorgpu-kernels— so a greenbuildon a pin bump proves the engine configures and builds without that dependency, and says nothing about the commit the pin names.tools/check_pins.pydoes not cover it either: it compares submodule gitlinks, notconfig/*.configshas.The three commands that are the evidence
Cheap enough to run before merge: a fetched private pin was 3.4 MB and 1.4 s.
Two traps, both measured today
fetch-private.shreads the config out of the working tree. Run from a checkout of an older commit it fetches the older pin and returns rc 0 — identical output, wrong answer. I did exactly that on gpu-kernels: pin eb0f3839 — the 2^-6 prefill prescale (#2159), the routed GEMM fit (#572) and the registration guard #2316 and reported the old pin as fetched before catching it.fd69590c..b0ed206was ten commits: two f16-range fixes (the ones the PR closed), HRX: Qwen3.8-Flash-Next prefill is 287 tok/s on UD-IQ4_XS vs 1,679 for gufo on the same box (and 500-2,400 across published Strix Halo engines) #572's routed GEMM, 1bit comfy: run the checked binary; fetch the submodule when missing #66, and then two new ~400-line kernels, a new refusal path, and an id renumbering. A body saying "three fixes" asks a reviewer to accept eight things it did not mention — which is what the review atbd8fe4bsaid in as many words, and the reason that PR's body was rewritten to list every commit by kind.Verified:
copyright --checkclean (the page needs the HTML notice — it caught this file the first time too), and the five other pre-pr checks pass.A correction to this PR's own first draft
I wrote "these four files pin private repositories", and two of them are not:
config/llama-mirror-hold.configconfig/hrx-toolchain.configindex=https://nightly.repo.amd.com/rocm/whl-next/— a public index, fetched byscripts/fetch-rocm-sdk.shThe page now names the two private pins with the
private: truecheck, and says plainly what the other two are. Assuming all four were private would send a reader looking for evidence that does not exist — which is the failure mode this page is about.