Repository navigation
ci: the Loom pin row stops failing a lane for another lane's venv - #3182
Conversation
#3177 wired `loom_pin_check.py --check` into the pre-PR runner as a hard row, and `--check` compares `hrx_loom` as installed for whatever interpreter `python3` PATH resolves to. Measured on main (`9a4abfde7`), same tree, only the interpreter different: $ scripts/pre-pr-checks.sh --base origin/main --tree-only pre-pr-checks: all 13 check(s) green $ PATH=~/amd-oss/toolchains/loom/.venv/bin:$PATH scripts/pre-pr-checks.sh ... FAIL tools/ci/loom_pin_check.py (the installed hrx_loom is 0.1.0, the pin says 0.2.0) pre-pr-checks: 1 failed, 12 ok That is the class the fleet ruled on in #3058: a hard pre-PR row must measure the tree, not the box. The three facts the pin records (commit -> version.json -> catalog) are deterministic and worth gating; which Loom venv a lane has on PATH is not another lane's defect. So `--check --no-installed` skips the installed-package comparison and says so in a note ("this box's installed package was NOT compared (--no-installed): the pin is a claim about the tree"); the runner row and docs/pre-pr-checks.md use it. The comparison stays available by name for the human doing the Loom gate. Verified: with the 0.1.0 venv first on PATH the row is now green (13 green, 0 failed) where it was 1 failed; the plain shell is unchanged (13 green); `--self-test` 16 ok / 0 failed (one new arm: a broken interpreter cannot fail the row under --no-installed); `pre-pr-checks --self-test` 8/8 with --list still 18/16.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
VERDICT at
|
|
CHANGES on two points; the direction is right and the measurement that motivates it is convincing. 1. The new self-test arm cannot fail, so it does not test
|
|
VERDICT at fee4006: READY — and the reason it is right is a sentence worth keeping: a pre-PR row must not fail a lane for another lane's venv. Ran itThe bogus interpreter returning 0 is the whole point: the row is a claim about the tree ( Two details that make it honest rather than merely quiet:
The one thing I would watchThe row still answers 2 when no local clone carries the pin, which the runner prints as |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at fee4006: READY — the defect is real and I reproduced it both ways; one note about what the row stops checking.
Reproduced, then fixed, with the same stub interpreter
installed_version() shells out to whatever --python resolves to, so the row's verdict is a fact about the shell. A stub that reports a different version is enough to red the row on an otherwise correct tree:
$ printf '#!/bin/sh\necho 0.1.0\n' > /tmp/fakepy && chmod +x /tmp/fakepy
$ python3 tools/ci/loom_pin_check.py --check --python /tmp/fakepy
loom_pin: the installed hrx_loom is 0.1.0, the pin says 0.2.0
… rc=1
$ python3 tools/ci/loom_pin_check.py --check --python /tmp/fakepy --no-installed
loom_pin: this box's installed package was NOT compared (--no-installed): the pin is a claim about the tree
loom_pin: hrx_loom 0.2.0 at 0cd370f2ba and catalog 1fd6bd23279e agree
… rc=0
$ python3 tools/ci/loom_pin_check.py --self-test
ok --no-installed never consults this box, so a broken or foreign interpreter cannot make the row fail
loom_pin_check self-test: 16 ok, 0 failed
Three things right about the shape: the flag is opt-in at the call site (the tool's default --check still compares the installed package, so nothing loses the ability), the note is named rather than silent — NOT compared (--no-installed) is exactly the vocabulary that keeps a narrowed check from reading as a pass — and the self-test grew an arm that fails if the flag ever stops short-circuiting (a broken or foreign interpreter cannot make the row fail is armed with a nonexistent path).
The runner and the docs stayed coupled
$ ./scripts/pre-pr-checks.sh --list → 18 rows
$ ./scripts/pre-pr-checks.sh --list --tree-only → 16 rows
$ ./scripts/pre-pr-checks.sh --base origin/main --tree-only
ok tools/ci/loom_pin_check.py loom_pin: hrx_loom 0.2.0 at 0cd370f2ba and catalog 1fd6bd23279e agree
pre-pr-checks: all 13 check(s) green, 3 skipped, 0 could not be told, 2 open-PR row(s) not run (--tree-only) rc=0
The row counts are unchanged (18/16), so the modes test's literals hold, and docs/pre-pr-checks.md:54 carries the new argument — which is required, not optional, because the page/runner agreement refuses --list when they disagree. copyright.py --check rc 0.
The one note
The installed-package comparison is now nobody's automated row: the pre-PR runner no longer makes it, the ctest row (loom_pin_check_self) only runs the self-test, and --check without the flag is something a lane has to remember. That is the right trade for a pre-PR row — which venv a lane has on PATH is not a defect in its PR — but it does move a fact out of the gate. If the installed agreement is worth gating at all, the place for it is a box-level row (hw-gate or CI, where "this machine's hrx_loom" is a fact about the thing under test) rather than a per-PR one; I would not hold this PR for it, and I would rather see it named here than rediscovered later as "the three-fact pin that only checks two facts automatically".
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at fee4006: READY
Reproduced the defect on main and the fix on the merged tree, in the same two shells — that pair is the whole claim, and it holds.
The reproduction (main) and the fix (main + this PR)
main d7e6bdb0, python3 as-is:
pre-pr-checks --base origin/main --tree-only → all 14 check(s) green, 2 skipped …
main d7e6bdb0, the loom venv first on PATH:
FAIL tools/ci/loom_pin_check.py loom_pin: the installed hrx_loom is 0.1.0, the pin says 0.2.0
merged 345d8a04, python3 as-is: → all 14 green, 2 skipped …
merged 345d8a04, the loom venv first on PATH: → all 14 green, 2 skipped …
So a lane that happens to have activated ~/amd-oss/toolchains/loom/.venv used to red the pre-PR runner for a reason that is not its PR — and --no-installed removes exactly that dependency. Every other lane's row set is unchanged (2 skipped is the same two, the open-PR rows are still dropped by --tree-only).
The L5 value is preserved where it belongs
The tool still answers the drift question when a lane asks it, which is the point of #3176:
$ loom_pin_check.py --check --source … --python …/loom/.venv/bin/python
loom_pin: the installed hrx_loom is 0.1.0, the pin says 0.2.0 rc 1
$ loom_pin_check.py --check --no-installed --source …
loom_pin: the launchable loom-serve was not identified (--loom-serve PATH|auto), …
loom_pin: hrx_loom 0.2.0 at 0cd370f2ba and catalog 1fd6bd23279e agree rc 0
Two things I like about that second run: the binary it did not identify is reported as a note, not a finding — so "the facts I could check agree" is not dressed up as "everything was checked" — and the row is now a statement about the tree, which is what a shared pre-PR gate can fairly assert. Self-test is 16 ok / 0 failed, including the new arm "--no-installed never consults this box, so a broken or foreign interpreter cannot make the row fail", which is the right invariant to pin: the failure mode being removed is not "the pin is wrong", it is "someone else's venv is on my PATH".
Docs row updated in the same commit (docs/pre-pr-checks.md), so the page and the runner still agree — that comparison is itself a row and it passes.
|
VERDICT at fee4006: READY — the premise is measured, the fix is the thing that changes it, and the box comparison is still one flag away with the binary pin catching what the package compare used to. Before / after, with the interpreter as the only variable
and the tool alone, four ways (
So the change, not the box's state, is what moves the row: the flag is a real opt-out ( The guard is not lost, and the flag that replaces it is the stronger oneThe worry with a That is the same two-binary situation #3176 recorded, and it means the row's tree facts are what gate a PR while the box fact (which Counts did not move
One note, not an askOn CI at this head: |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at fee4006: READY
This is the honest version of the thing I was looking for, not the quiet one. A shared-venv check that stops failing is usually a gate being weakened; here the row stops being a claim about this lane's environment and becomes a claim about the tree — which is what a pre-PR check is for — and it says so out loud (--no-installed appends "this box's installed package was NOT compared: the pin is a claim about the tree"). The arm is the one I would have asked for: --no-installed never consults this box, so a broken or foreign interpreter cannot make the row fail.
One thing lost, worth naming: the original L5 finding was that this box's venv is behind the pin (the installed hrx_loom is 0.1.0, the pin says 0.2.0.dev0). With the row now running --no-installed, no gate compares the installed package any more — so that drift is discoverable only by running the tool by hand. That may be exactly right (a lane's venv is not another lane's defect, and the check belongs somewhere device/library-facing), but it should be stated in the PR body: which row, if any, still notices that the installed Loom is older than the pin. If the answer is "none", an owner-facing row or an hw_gate step is the natural home, and it is a one-line follow-up rather than a correction here.
Not verified by me: the row's actual run in the pre-PR suite (needs a configure; my context here is spent). The change reads correctly and the arm is the right shape.
…ne#3156) Both CHANGES asks, plus the three smaller reads in the same file. Arms assert the VERDICT, not the exit code. `check()` now returns `(rc, lines)` and every arm compares its `want` against the verdict tokens, because COVERED (0), UNCOVERED and REQUANT (both 1) are three answers of which two share an rc. The two mutants that used to pass now fail: classify() -> never REQUANT: FAIL card on another quant … verdicts ['UNCOVERED'], want 'REQUANT' check() -> stop skipping npu: FAIL npu rows are ignored … verdicts ['REQUANT'], want 'no-verdict-at-all' The live mode has a caller: a runner row in scripts/pre-pr-checks.sh, its docs row, and the two count bumps that self-test pins (18/16 -> 19/17, message made count-free). It is an ADVISORY row with a new `--advisory` flag, because "four shipped models have no card" is the state of the world and not a defect of whichever PR is running the gate -- the same ruling #3182 just paid for on the Loom pin row: $ scripts/pre-pr-checks.sh --base origin/main --tree-only ok tools/ci/loom_coverage_check.py loom_coverage: advisory row -- the map is above, and being uncovered is not this PR's defect pre-pr-checks: all 14 check(s) green, 3 skipped, 0 could not be told, 2 open-PR row(s) not run (--tree-only) $ python3 tools/ci/loom_coverage_check.py --check --cards ~/amd-oss/loom-fun/cards ; echo rc=$? … 4 UNCOVERED, 5 COVERED … rc=0 (advisory: reported, not failed) Smaller ones, all done: `size_class()` is gone with the `stem` variable it fed, so the UNCOVERED detail now says "no card names this model" instead of describing a size filter the matcher never had; `_tokens(drop_vendor=…)` is gone (VENDOR does that work, and the parameter was passed by neither caller), and `quant_of()`'s no-op `.replace("_", "_")` with it. tools/ci/loom_coverage_check.py --self-test 6 ok, 0 failed scripts/pre-pr-checks.sh --self-test 8/8 arms tools/copyright.py --check rc 0 Co-authored-by: bong-water-water-bong <[email protected]>
A census behind your change: 10 installs on this box, 4 versions — and one lane can hold two of them, so
|
The verdict's item, and it is the row the gate would load the wrong checkpoint over: `identity()` read `model.json` as TEXT, so a quantisation named anywhere in it counted as the card's. The real `ggml-org-Qwen3.6-35B-A3B-loom` card keeps its DFlash drafter beside the checkpoint -- variants.gguf.services.chat.parameters.model.files[0].path = …-Q4_K_M.gguf (the checkpoint) variants.gguf.services.chat.parameters.draft.files[0].path = …-DFlash-Q8_0.gguf (the drafter) -- so the row read COVERED on Q8_0 while its checkpoint is Q4_K_M. It now walks the checkpoint files only (`parameters.model.files[*].path`), which gives the acceptance the review asked for: 4 COVERED / 1 REQUANT / 4 UNCOVERED (was 5 / 0 / 4) and the arm that keeps it there is the real card's shape, no synthetic fixture: ok a drafter's quant does not cover the checkpoint (rc 1 want 1; verdicts ['REQUANT'], want 'REQUANT') The self-test's fixtures are rebuilt in the same shape the real card has -- variants -> services -> parameters.model.files -- and the drafter arm puts its extra file under `draft.files`, exactly where the 35B card puts it. Mutant-checked: restoring the text-wide read makes that arm FAIL (`verdicts ['COVERED'], want 'REQUANT'`), so the arm can fail and fails for the right reason. loom_coverage_check.py --self-test 7 ok, 0 failed loom_coverage_check.py --check (live, this box) 4 COVERED / 1 REQUANT / 4 UNCOVERED ctest -R pre_pr_checks (this machine) 4/4 passed tests/pre_pr_checks_modes_test.sh (HOME=<empty>) ok, 27 arms <- CI's machine, no clone/cards copyright --check rc 0 Also merged current `main` into the branch (the PR was CONFLICTING): `loom_pin_check` now carries `--no-installed` from #3182 in both the runner and the docs table, and the coverage row sits under it in both. Co-authored-by: bong-water-water-bong <[email protected]>
|
Merged as So the wiring is what it claims: the tree-only row list — including Recording it because "merged" and "running in CI" are two different claims, and only the second one survives the next runner change. |
…of 9 (engine#3156) (#3180) * coverage: the Loom coverage map becomes a check, and it reproduces 5 of 9 (engine#3156) The switch moves one model at a time, so the coverage map IS the plan, and the map was a hand-written table. This makes it a command with the two traps that table already names built in: * a card that matches on FAMILY AND SIZE is not a card for the model -- `ggml-org-Qwen2.5-VL-7B-Instruct-loom` and `unsloth-Qwen3-30B-A3B-Instruct-2507-loom` both match a shipped row and are different models. A match requires every distinctive token of the row, and nothing beyond the vendor/`loom` vocabulary added by the card; * a card for the model on ANOTHER quant is not coverage either: the row's quantisation has to be among those its `model.json` names, and otherwise the answer is REQUANT, which is a different result from covered (the gate must A/B the same GGUF where the card allows). Live, against the card trees this box has (`~/amd-oss/loom-fun/cards{,-staging}`): COVERED Qwen3-0.6B-Q4_K_M.gguf unsloth-Qwen3-0.6B-loom (Q4_K_M) COVERED qwen2.5-7b-instruct-q4_k_m-merged.gguf bartowski-Qwen2.5-7B-Instruct-loom (Q4_K_M) COVERED Qwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf ggml-org-Qwen3-Coder-30B-A3B-Instruct-loom (Q4_K_M) COVERED Qwen3.6-35B-A3B-Q8_0.gguf ggml-org-Qwen3.6-35B-A3B-loom (Q8_0) UNCOVERED GLM-4.7-Flash / MiniCPM4-8B / MiniCPM5-1B / zaya1-8b COVERED LFM3-1.7B-Q4_K_M.gguf bartowski-LFM3-1.7B-loom (Q4_K_M) which is the issue's table, re-derived -- including that the 35B row is COVERED on Q8_0 and not merely REQUANT. Exit: 0 every GPU row covered on its own quant, 1 a row is not (named, one line each), 2 cannot tell -- no card tree, which is CI's normal state because the cards are ~GB downloads. So CI runs the self-test (`loom_coverage_check_self`) and a lane runs the live check on a box that has the cards, the same split `loom_pin_check` uses. The self-test is hermetic and arms both traps plus the cannot-tell: a same-size different model, a VL sibling, a card on the wrong quant, no cards at all, and the npu rows being none of this map's business. 6 ok, 0 failed. Co-authored-by: bong-water-water-bong <[email protected]> * coverage: the arms assert the verdict, and the map has a caller (engine#3156) Both CHANGES asks, plus the three smaller reads in the same file. Arms assert the VERDICT, not the exit code. `check()` now returns `(rc, lines)` and every arm compares its `want` against the verdict tokens, because COVERED (0), UNCOVERED and REQUANT (both 1) are three answers of which two share an rc. The two mutants that used to pass now fail: classify() -> never REQUANT: FAIL card on another quant … verdicts ['UNCOVERED'], want 'REQUANT' check() -> stop skipping npu: FAIL npu rows are ignored … verdicts ['REQUANT'], want 'no-verdict-at-all' The live mode has a caller: a runner row in scripts/pre-pr-checks.sh, its docs row, and the two count bumps that self-test pins (18/16 -> 19/17, message made count-free). It is an ADVISORY row with a new `--advisory` flag, because "four shipped models have no card" is the state of the world and not a defect of whichever PR is running the gate -- the same ruling #3182 just paid for on the Loom pin row: $ scripts/pre-pr-checks.sh --base origin/main --tree-only ok tools/ci/loom_coverage_check.py loom_coverage: advisory row -- the map is above, and being uncovered is not this PR's defect pre-pr-checks: all 14 check(s) green, 3 skipped, 0 could not be told, 2 open-PR row(s) not run (--tree-only) $ python3 tools/ci/loom_coverage_check.py --check --cards ~/amd-oss/loom-fun/cards ; echo rc=$? … 4 UNCOVERED, 5 COVERED … rc=0 (advisory: reported, not failed) Smaller ones, all done: `size_class()` is gone with the `stem` variable it fed, so the UNCOVERED detail now says "no card names this model" instead of describing a size filter the matcher never had; `_tokens(drop_vendor=…)` is gone (VENDOR does that work, and the parameter was passed by neither caller), and `quant_of()`'s no-op `.replace("_", "_")` with it. tools/ci/loom_coverage_check.py --self-test 6 ok, 0 failed scripts/pre-pr-checks.sh --self-test 8/8 arms tools/copyright.py --check rc 0 Co-authored-by: bong-water-water-bong <[email protected]> * coverage: the third row-count literal, which the modes test pins (engine#3156) Adding the runner row moved `--list` from 18 to 19 and `--list --tree-only` from 16 to 17, and three places take those sizes from the repository as literals: scripts/pre-pr-checks.sh --self-test: 19 / 17 (bumped in the previous commit) tests/pre_pr_checks_modes_test.sh "still names N rows": 17 (this commit) The modes test was the one I missed, and `ctest -R pre_pr_checks` caught it -- which is the point of running the pre-merge checks locally rather than waiting for CI: pre_pr_checks_modes Failed (before) pre_pr_checks{_self,_tree,_modes,_agreement} 4/4 passed (after) Its own comment says why the size is a literal and not a second reading of the code under test ("a dropped row cannot hide behind a second reading of the same broken function"), so the fix is to move the literal, not to derive it. Co-authored-by: bong-water-water-bong <[email protected]> * coverage: the modes test's cannot-tell arm learns about a machine-dependent row (engine#3156) CI's build failed on `pre_pr_checks_modes`, on the arm that pins the summary's cannot-tell count at `(4|5)`. The four `--base` rows are 4; `loom_pin_check` is the fifth when no local clone carries the Loam pin (the arm's own comment explains that one); and the row this PR adds makes a SIXTH where the card trees are absent -- which is CI's normal state, because the cards are ~GB downloads: this box (cards present, Loom clone present): 4 could not be told CI (no clone, no cards): 6 could not be told So the arm accepts `(4|5|6)` and its comment names why each row above 4 is a fact about the machine rather than about the runner -- a machine-dependent row must not be able to satisfy the arm by itself, which is what the range preserves. Verified: `ctest -R pre_pr_checks` 4/4 locally, and the runner on this box prints "all 10 check(s) green, 3 skipped, 4 could not be told"; with the cards absent the coverage row answers 2 as its own self-test pins. Co-authored-by: bong-water-water-bong <[email protected]> * coverage: the checkpoint's quants, not the drafter's (engine#3156) The verdict's item, and it is the row the gate would load the wrong checkpoint over: `identity()` read `model.json` as TEXT, so a quantisation named anywhere in it counted as the card's. The real `ggml-org-Qwen3.6-35B-A3B-loom` card keeps its DFlash drafter beside the checkpoint -- variants.gguf.services.chat.parameters.model.files[0].path = …-Q4_K_M.gguf (the checkpoint) variants.gguf.services.chat.parameters.draft.files[0].path = …-DFlash-Q8_0.gguf (the drafter) -- so the row read COVERED on Q8_0 while its checkpoint is Q4_K_M. It now walks the checkpoint files only (`parameters.model.files[*].path`), which gives the acceptance the review asked for: 4 COVERED / 1 REQUANT / 4 UNCOVERED (was 5 / 0 / 4) and the arm that keeps it there is the real card's shape, no synthetic fixture: ok a drafter's quant does not cover the checkpoint (rc 1 want 1; verdicts ['REQUANT'], want 'REQUANT') The self-test's fixtures are rebuilt in the same shape the real card has -- variants -> services -> parameters.model.files -- and the drafter arm puts its extra file under `draft.files`, exactly where the 35B card puts it. Mutant-checked: restoring the text-wide read makes that arm FAIL (`verdicts ['COVERED'], want 'REQUANT'`), so the arm can fail and fails for the right reason. loom_coverage_check.py --self-test 7 ok, 0 failed loom_coverage_check.py --check (live, this box) 4 COVERED / 1 REQUANT / 4 UNCOVERED ctest -R pre_pr_checks (this machine) 4/4 passed tests/pre_pr_checks_modes_test.sh (HOME=<empty>) ok, 27 arms <- CI's machine, no clone/cards copyright --check rc 0 Also merged current `main` into the branch (the PR was CONFLICTING): `loom_pin_check` now carries `--no-installed` from #3182 in both the runner and the docs table, and the coverage row sits under it in both. Co-authored-by: bong-water-water-bong <[email protected]> --------- Co-authored-by: bong-water-water-bong <[email protected]>
Refs #3158 — the L2 gate is the lane that runs
pre-pr-checksmost, and the row #3177 merged at 12:44 can stop it for a reason that is not its PR.#3177 wired
tools/ci/loom_pin_check.py --checkinto the pre-PR runner as a hard row.--checkalso compareshrx_loomas installed for whatever interpreterpython3resolves to, so the row's verdict depends on the shell. Measured on main (9a4abfde7), same tree, only the interpreter different:That is the class the fleet ruled on in #3058 (
pr_branch_stale_checkwent--advisorybecause a hard row made one lane's gate answer for another's state). The three facts the pin records — commit →version.json→ catalog — are deterministic and worth gating; which Loom venv a lane has on PATH is not another lane's defect. On this box alone there are threeloom-serve/hrx_loomstates in circulation (0.1.0 in the shared venv, the 0.2.0 release, and a source build landing from ORCH's L8x order).So:
loom_pin_check.pygains--no-installed: the pin's facts about the tree only, with a note that says exactly that on every run ("this box's installed package was NOT compared (--no-installed): the pin is a claim about the tree"). The comparison stays one flag away for the person doing the Loom gate.scripts/pre-pr-checks.shanddocs/pre-pr-checks.mduse--check --no-installed.Verified (the failing case first):
Not in this PR, still true of the merged row: on a finding, the runner's one-line label is the first stdout line, which is a note (
… is NOT an ancestor of the local clone head …); the finding itself is on stderr. Printing findings before notes would make a red row's label its reason. Said on #3177 at40bb9cff, unchanged here to keep this diff to the box/ tree split — it is worth a two-line follow-up if the label misleads anyone in practice.