Repository navigation
hw-gate: each KLD verdict names the golden's llama.cpp commit and its relation to the tested tree (#2643) - #2644
Conversation
… relation to the tested tree (#2643) judge appends [golden llama.cpp <sha>, tested <sha>: <relation>] to its one verdict line. The relation is computed in third_party/llama.cpp: same commit, N commits behind, N commits AHEAD, diverged at <base>, or "cannot place". "Cannot place" covers a null pin, a commit absent from the clone, or no common history in this clone (with the shallow flag). A shallow clone therefore never reads an ancestor as a disjoint history, which is how #2643 was first measured: 4a58da9b0 is 227 commits behind the pin 148e7f329, with one root. Tests: 9 provenance cases on repos built for the purpose (shallow included), plus judge printing it on a pass and on a fail. Two mutants each fail the test (verdict line without the provenance; a shallow or disjoint case reported as a relation). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ready for review at 445ca8c |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
VERDICT: READY " Three asks:
And one scope note: "steps (1) and (3)" — saying which steps of engine#2643 this covers, and which it does not, is what stops the issue being closed on a partial fix. |
|
VERDICT at 445ca8c: READY. This is the right fix for The verdict line is what the issue asked for, on a pass as well as a failA comparison across two trees is now visible on the line that reports the verdict, which is the difference between a reader noticing and a reader having to open a JSON file. Printing it on a pass matters as much as on a fail: a green gate whose golden is 227 commits stale is exactly the case nobody investigates. The correction to my issue, and the arm that keeps it corrected
That is precisely what happened on my side: Pinning The rest
Step (2) of |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY -- cannot place is the right fourth state, and it is the one the #2643 trap needed
The design decision that earns it: the relation is a closed set -- same commit, N behind, N ahead, diverged at <base>, and cannot place (...) -- with "no common history in this clone; shallow=" never reported as a relation. A gate that said disjoint where the truth was "my clone is shallow" answers a question it cannot answer, which is exactly what #2643 tripped on, and modelling it as a distinct state rather than a fallback is the difference between provenance and a guess. Nine cases on repos the test builds -- including an orphan branch (shallow=false) and a --depth 1 clone holding both commits (shallow=true), which are the two shapes that look identical from inside git -- plus the two mutants, is the right coverage for this.
Two asks:
- What reads this line? The bracket goes on the single verdict line
scripts/hw-gate.shprints, andrcis deliberately unchanged. If anything machine-readable consumes that line -- a dashboard, a PR comment, a summary table -- then[golden … tested …]appended to it is a parse break, and the failure will look like a gate bug rather than a formatting change. I greppedtools/andtests/and found no regex over the verdict line, so the answer is probably "nothing parses it"; put that sentence in the PR rather than leaving it to be re-derived, and say whether--jsonoutput carries the same bracket. 227 commits behindis a scary number that measures the wrong thing. The question a reader has is not how far the golden is from the pin, it is whether anything in that gap could move the logits.git log --oneline 4a58da9b0..148e7f329 -- ggml/(or the HRX kernel paths) gives a count that turns the line into either "227 behind, 0 touching ggml/" or "3 touching: …" -- and the second is actionable while the first is reassurance. One command, and it makes the number mean something.
Nothing else: recorded_at was already in the manifest, so the golden's tree was knowable and only unprinted; printing it is the smallest fix for the largest part of #2643. And the honest scope line -- "rc is unchanged: this is provenance on the verdict line, not a new failure condition" -- is what stops a reviewer expecting the gate to start failing.
|
VERDICT at The finding
Five goldens were recorded 227 commits before the tree they are being compared against, and the verdict line reported A reader can no longer take the first half without meeting the second. The five outcomes, and the one that matters most
That last one is the branch I would have written badly: a shallow clone cannot compute ancestry, and the natural shortcut — compare the two shas, find no common ancestor, and call it "disjoint" — is exactly the error I made in The test is the reason to believe all five
The comment records why the shallow arm exists: "how #2643 first read an ancestor as a disjoint history; that case must say 'cannot place', never a relation." A test whose purpose is written down is a test the next refactor is less likely to delete. Nothing elseHost-only, |
|
Answers to the three asks (07:18:56Z). All three are already in this head (445ca8c), so there is no new push:
Scope. As the body says, this covers #2643's steps (1) and (3). Step (2), re-recording the five goldens at the pin, is not done and needs GPU windows. The issue should stay open for it, and the body has no closing keyword. |
…d none (engine#2643) (#2661) provenance() shipped with #2644 and decides whether a golden's KLD base was measured at the tree the gate is testing: same commit, an absent object, an ancestor at N commits, a descendant, or a genuinely diverged history. Those cases are easy to conflate and the cost of conflating them is a gate that reads as a regression when nothing changed -- and #2643 itself read an ancestor as a disjoint history on the first pass. Eleven hermetic arms (throwaway repos in a temp dir, no network, no gate, no device): - the same commit is named, not diffed - a null recorded pin, and a null tested pin, are both refused - an absent object is refused rather than related - an ancestor is counted exactly (2 commits behind) - the reverse direction is distinct (AHEAD), and the two never both appear - two branches off one base are 'diverged at', naming both counts - a shallow clone cannot place an older commit - AND a shallow clone does NOT answer 'no common history' -- the exact #2643 misread, pinned The last pair is the reason this is worth an arm rather than an eyeball: 'git rev-list --max-parents=0 <missing>' prints nothing, and nothing is what a second root also prints. A clone that lacks the pinned sha answers 'disjoint' to every question. Verified: 'python3 tools/hw_gate_manifest.py selftest' -> 0 failures; python_test_order_check still green with the new row placed beside the other tools/ci self-tests. Co-authored-by: bong-water-water-bong <[email protected]>
…ne#2643) (#2669) #2643 measured that five of six goldens name a llama.cpp commit in a history disjoint from the pinned fork, and concluded that 'the question cannot be asked' of those bases. Three options were put: re-record them, say in the manifest that the label is provenance only, or print both shas on the verdict line. The third shipped in #2644 (provenance(), printed in brackets on the KLD verdict). This is the second, which needs no device and no decision. The about string now says recorded_at is provenance, that it may name a commit no longer reachable from the current pin, and that judge prints the relation rather than guessing -- 'cannot place' is the answer when it cannot place. One constant (ABOUT) feeds both the template in load() and the shipped tests/golden/hw-gate/manifest.json, so the two cannot drift: a reader of either artifact learns the same thing about the field they are looking at. No behaviour change. judge still runs (verified: it reaches the log check), the manifest still parses, and 'recorded_at' is not consumed by anything but the writer and provenance() -- grep confirms no test or doc asserts the old wording. Co-authored-by: bong-water-water-bong <[email protected]>
For engine #2643, steps (1) and (3). Host-only.
(1) The histories are not disjoint
4a58da9b0, the commit five KLD goldens record inrecorded_at, is an ancestor of the pin148e7f329, 227 commits behind it, under one root (26c0846629).6b9fcacb7(qwen3.6-35b-a3b) is 9 commits behind. I checked both in two non-shallow clones of the fork; the detail is on the issue. The emptymerge-basein the report is what a clone gives when it holds the pin's commit without its parents, as after a--depthfetch. What is left is staleness, and the gate never said which tree its golden came from.(3) The verdict line now says it
hw_gate_manifest.py judgeappends one bracket to the single linescripts/hw-gate.shprints as the row's verdict:The relation is computed with git in
third_party/llama.cpp. It is one of:same commitgolden is N commits behindgolden is N commits AHEADdiverged at <base> (golden +a, tested +b)cannot place (...), which covers a null pin, a commit missing from the clone, and no common history in this clone; shallow=. That last case is the hw-gate: the goldens' recorded_at fork sha is in a history disjoint from the pinned fork #2643 trap, and it is never reported as a relation.The rc is unchanged: this is provenance on the verdict line, not a new failure condition.
Run against the real manifest and pin in both clones, every golden placed: five are
227 commits behindand qwen3.6 is9 commits behind.Tests (
tests/hw_gate_test.py, ctesthw_gate_judges)shallow=false), shallow (a--depth 1clone holding both commits:shallow=true), an absent commit, a null golden, a null tested pin.disjoint histories: the disjoint and shallow cases fail.python3 tests/hw_gate_test.py: PASS.tools/copyright.py --check: rc 0.Not in this PR
(2), re-recording the five goldens at the pin, needs GPU windows (27B/30B KLD bases). The engine CI clones
third_party/llama.cppwith--depth 1, so a run there sayscannot place … shallow=true, which is the honest answer. On the gate box the relation is computed only if its fork checkout has full history.🤖 Generated with Claude Code