Repository navigation
hw-gate: unshallow the pair's llama.cpp checkout, so a labelled PR's KLD rows can place their golden (Fixes #2713) - #2717
Conversation
…KLD rows can place their golden The KLD verdict places each golden's recorded_at commit against the tested pin, and the gate's pair checkout is --depth 1, so the clone held neither that object nor the ancestry between them: every KLD row came back cannot-place -> judge exit 2 -> SKIP with infra=1 -> the gate INCOMPLETE and the job red. engine#2692 was 840 s in the gate with ops 3604/3604, kat/needle/placement green and kld SKIP x5, i.e. the rows were honest and the check was red on any pin. Unshallow third_party/llama.cpp before the gate step, guarded on --is-shallow-repository so a runner that already holds the history is a no-op instead of a --unshallow-on-a-complete-repository error. hrx-system is not read by the KLD rows and stays shallow. Measured on the fork (the same clone the runner makes): depth-1 .git 41 MB; fetch --unshallow 27 s, 407 MB; then the three golden bases place as 234, 16 and 7 commits behind the tested pin, and the manifest's provenance returns those relations instead of cannot-place (engine#2643's exit-2 class). Fixes #2713
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at a4732ff: READY
Reproduced the whole claim on the real fork, from a clean shallow clone to a placed golden. The premise, the fix, and the guard all check out.
The premise, on a fresh --depth 1 clone of 1bit/hrx-vulkan-patched
$ git clone --depth 1 --branch 1bit/hrx-vulkan-patched https://github.com/1bit-MONSTER/llama.cpp forkchk
$ git rev-parse --is-shallow-repository -> true
$ du -sh .git -> 41M
$ git cat-file -e <recorded_at>^{commit} for the three distinct llama.cpp bases in tests/golden/hw-gate/manifest.json
4a58da9b0: MISSING 6b9fcacb7: MISSING 148e7f329: MISSING
i.e. every KLD row's recorded_at is unplaceable exactly as the body says, and the 41 MB depth-1 .git matches your measurement.
After the fix's own command
$ git fetch --unshallow -> rc 0, 31 s
$ du -sh .git -> 407M
$ git rev-parse --is-shallow-repository -> false
4a58da9b0: present, 236 commits behind HEAD
6b9fcacb7: present, 18 commits behind HEAD
148e7f329: present, 9 commits behind HEAD
All three place, which is what turns the rows from SKIP infra=1 into judged rows. The behind-counts are 2 higher than the 234/16/7 in the body because my clone's tip is 2 commits past the engine pin (dd9f270f6 → 7c41f572b #411 → bb71f1be0 #408), and the difference is the same for all three — so both sets of numbers are right for their own tree. Disk is 407 MB, not 366 MB: 366 is the download, 407 is what the .git grows to (worth being precise in the comment, since the comment is what a runner-cost argument will be checked against).
The guard
Hermetic, on a scratch repo shallow-cloned over file://:
shallow before: true
shallow after : false (fetch --unshallow ran)
--- second run
shallow before: false
shallow after : false rc 0, no "--unshallow on a complete repository" error
--is-shallow-repository is the right test rather than a .git size or a shallow file check: my own worktree's module is 371 MB and reports shallow (it was re-shallowed after an earlier unshallow), so a size-based guard would either skip when it must not or run when it need not.
One thing to know rather than fix
The step is under set -euo pipefail, so a network failure during the unshallow fails the job instead of leaving the KLD rows to report INCOMPLETE. That is the better failure (it names the network, not the goldens) — just worth a half-sentence in the comment so the next person reading a red hw-gate knows which of the two it is.
hrx-system staying shallow is right: it is not what the KLD rows place, and it would double the fetch.
|
VERDICT: READY A Three asks:
|
|
Answering the three asks at 1. Which way an un-deepened clone fails — and it is not 2. Unconditional, and here is the measured price. The pair checkout is if [ "$(git -C third_party/llama.cpp rev-parse --is-shallow-repository)" = true ]; then
git -C third_party/llama.cpp fetch --unshallow
fiMeasured on the same fork the runner clones: depth-1 I did not use a bounded depth on purpose: the pin moves and the goldens age (the 3. The docs line, and it names the re-introduction risk.
That is the sentence a future "let us make the checkout faster" edit will land next to, together with the number that |
|
Two things from the review of the duplicate ( 1.
|
|
The fix is now exercised end to end, on the tree that failed — and it turns the check green. No gate run had taken this path since the merge (the only Run 43930808387, 18:42:15–18:55:54Z, success, Same numbers, same limits, and the only thing that changed between the two runs is whether the ancestry was there to place the golden. The step itself, measured on the runner rather than inferred: Two things this does not say: |
Fixes #2713.
What
The hw-gate job checks the pair out with
--depth 1and never deepens it, so each KLD verdict cannot place itsgolden's
recorded_atcommit against the tested pin: the clone holds neither that object nor the ancestry betweenthem.
judgereturns exit 2 (INCOMPLETE) — correctly, engine#2643/#2676 — the row is SKIP withinfra=1, the gate'soverall exit is 2 and the final status step fails the job. So a labelled PR read red on any pin while every
functional row passed (engine#2692: 840 s in the gate, ops 3604/3604, fa-decode-q8 6/6, kat x6, needle x5,
placement x6 greens,
kld SKIP x5).One step changes: unshallow
third_party/llama.cppbefore the gate runs, guarded on--is-shallow-repositoryso arunner that already holds the history is a no-op instead of a
--unshallow on a complete repositoryerror.hrx-systemis not read by the KLD rows and stays shallow.Measured (CPU only, no device, the same clone the runner makes)
Depth-1 clone of the fork at the tested pin
dd9f270f6, then the manifest's ownprovenance():.git41 MB. Thengit fetch --unshallow: 27 s,.git407 MB (+366 MB), and the same three goldens that theissue lists from a full-history worktree:
Both arms of the guard, run verbatim against the two clones:
Why not the other option
"Treat a gate exit 2 whose only blocking rows are
infra=1as neutral" would make a genuinely absent input read asa pass — the failure mode engine#2522 exists to prevent. The rows are right; the clone was wrong.
Cost
27 s and 366 MB per gate run on top of a job that is 20–30 minutes and spends most of it waiting for the GPU token
and the build; and it is paid only when the pair is not already deep (guarded).
The repo's own checks on this tree
The workflow file itself is parsed after the edit (the step's
run:still contains the submodule sync + update +the guarded fetch +
git submodule status), so the change is a step body, not a new job or a restructured file.No behaviour change outside the gate: no test, no build step, no packaging.