Repository navigation
registry check: a one-prompt "passed / said Paris" row is not a decode verification - the row now states the measured agreement and KLD - #3466
Conversation
…on - the row now states the measured agreement and KLD engine#3340's registry record was the last place still claiming a verification that was never made. registry/checked.json said MiniCPM4-8B "passed" on hrx (engine b9812e0, "said Paris"), and tests/serve_e2e.sh asks one question: that prompt agrees on the engine that dropped the last layer's attention term too (2 of 8 prompts, 25 % greedy agreement, mean KLD 0.305 nats). The cause -- common.get_rows_scale.f32 compiled MiniCPM's residual_scale 0.2475 through an int64_t-only to_config_value, so the layer-31 term was multiplied by 0 -- is fixed on main since the pin bump 0dcf064 (llama.cpp#493). What main still carried was a row that cannot catch the class, and nowhere for a route to state what was measured. - registry/decode_agreement.json (new): one entry per tools/logprob_agree.py run -- the hrx/llama.cpp and Loom arms against the CPU arbiter, the same GGUF, greedy, thinking off -- with its engine, llama.cpp commit, date, source link and the known answers. MiniCPM4-8B: 75 % greedy agreement, 0.649 token-id match, 0.0266 nats mean KLD, same top token 100 %, 391 and the primes; before the fix 25 % / 0.252 / 0.305. The numbers are copied from the issue's measurement comment (its source), not re-measured here: CI has no device and the GGUF is not in the tree, and its "about" says exactly that. - registry/checked.json:43-84: the MiniCPM4-8B row carries that record as its "decode" object, beside the serve pass it already had, so the row states what was measured rather than only what it said. - tools/registry_check.py: --annotate-decode copies the record onto the checked rows and runs no model (sync_decode, :144); --check-decode fails when a checked row loses its measurement or states one nothing recorded (decode_problems, :182), and every sweep write re-applies the record so a re-run cannot erase it (:498). The record's shape is checked, not just its JSON: commit/date/source, each number in the range logprob_agree prints it in, the row's own backend arm present, and the file present at all -- annotate refuses a missing record instead of reading it as "record nothing" and stripping the rows. - --self-test (:276): a scratch registry driven through the stale row, the annotation and every refusal, so the check's firing behaviour is pinned by a row that runs (ctest registry_check_self). - CMakeLists.txt:1742: ctest registry_decode (--check-decode) and registry_check_self (--self-test). - docs/registry.md:81: what a pass does and does not clear, and the new record's format. Evidence $ python3 tools/registry_check.py --check-decode # this branch, checked.json committed ok: 1 recorded decode measurement(s), every one stated on its row [rc 0] # CONTROL: origin/main's checked.json, which states no decode block $ git show origin/main:registry/checked.json > registry/checked.json $ python3 tools/registry_check.py --check-decode registry_check: hrx MiniCPM4-8B-Q4_K_M.gguf: the checked row does not state this measurement [rc 1] $ python3 tools/registry_check.py --annotate-decode # restore set hrx MiniCPM4-8B-Q4_K_M.gguf 1 row(s) changed, 1 measurement(s) recorded (the restored file is byte-identical to the committed one) $ python3 tools/registry_check.py --self-test ok --check-decode fails a checked row that carries no decode measurement (rc 1, row named) ... registry_check --self-test: ok [rc 0] $ ctest --test-dir build -R 'registry_decode|registry_check_self' 100% tests passed, 0 tests failed out of 2 $ scripts/pre-pr-checks.sh --tree-only --base origin/main pre-pr-checks: all 16 check(s) green, 2 skipped (no gpu-kernels tree), 0 could not be told, 2 open-PR row(s) not run (--tree-only) Co-Authored-By: bong-water-water-bong <[email protected]>
Pull Request is not mergeable
…o, and draft the freeze RFC (engine#3448) Security review (cl-flm lane, 24 Nov). Issue #3448 has two halves. The rollback half is fixed by #3454 (69bb03f): --latest reads the release identity from inside the verified image and refuses anything that is not the tag asked for and strictly newer. The freeze half is open, and it is a release-trust decision (CONTRIBUTING.md: anything touching security is an RFC), so this commit does NOT invent a fix for it: it stops the tool from claiming the freshness it cannot prove, and puts the decision on record. Rebased onto origin/main a95beca (after #3465/#3466/#3467); the line references below are that tree's. The mechanism, as it stands (os/v3/puppy/embed/usr/local/bin/1bit-update): - update_pick decides which release is the channel's newest and whether it is newer than the running one, from GitHub's release list (:257-302). That list is not signed; the first signature is checked at :453-455, after the "is it newer" decision, and the early exit says "up to date" without checking any signature (:430-438). So a release host that keeps serving the current release also keeps the machine answering "up to date" (freeze). What changed: - update_pick prints ahead=yes when the RUNNING release is newer than the channel's newest (a final against its own -rcs, or a channel that has not caught up), which used to be folded into newer=no (:291-295). - update_check and update_latest answer that case "up to date: running X is newer than the CHANNEL's newest Y" and print one note that the answer is the unsigned release list's word, so a host that hides a newer release is not detectable (:328-336, :430-438). A plain "up to date" line is kept for the same-tag case, so the console, the notice and the board rows keep reading it. - docs/update-trust.md (new): what the signature covers today (tools/release_sign.py), the exact order --latest decides in with file:line, what #3454 closed and what it leaves open, the freeze threat model (adversaries, in/out of scope, P1-P3), and the draft RFC body: options A (signed, expiring latest per channel reusing release_sign.py), B (TUF-style metadata), C (signed tag -> commit), D (tag+channel in the signed SHA256SUMS), E (accept the risk), each with its trust assumptions and cost, the test plan and the NOTICE impact, and the open owner questions. - docs/os-v3.md, "In-system updates": a paragraph after the trust order saying what the order does not prove - freeze, with the release-list/commit/rollback facts - and pointing at the draft. - tests/update_check_test.sh: two arms (the ahead wording, the note), and the existing "a final release sorts after its own release candidates" arm now asserts the ahead wording, which is what the tool says there now. os/mini/release-check.sh --self-test gains that same output as a PASS fixture, so the update-check row still recognises the answer on the board. What remains open, and is the RFC's first question: is a compromised release host (freeze) in the threat model? If yes, option A is the recommendation; if no, record that in docs/os-v3.md and close #3448. No code in this commit closes it - the honest wording says exactly that. Evidence: - Control (new test, PRE-FIX updater from origin/main a95beca): c=~/.cache/scratch-3448/control; mkdir -p $c/tests $c/os/v3/puppy/embed/usr/local/bin git show origin/main:os/v3/puppy/embed/usr/local/bin/1bit-update > $c/os/v3/puppy/embed/usr/local/bin/1bit-update cp tests/update_check_test.sh $c/tests/ (cd $c && sh tests/update_check_test.sh) FAIL a final release sorts after its own release candidates (v2026.49 > v2026.49-rc1) FAIL a running release newer than the channel's newest is said as ahead, not as a flat 'up to date' FAIL the up-to-date answer names the unsigned release list it rests on, and what that cannot detect update_check_test: FAIL - Branch: sh tests/update_check_test.sh -> "update_check_test: ok" (12 arms). - Sanity: the same control tree with origin/main's own test and updater -> "update_check_test: ok" (only the arms this change adds or re-words differ). - ctest --test-dir build -R 'update|release_check_selftest|release_sign' --output-on-failure --timeout 600: "100% tests passed, 0 tests failed out of 12" (update_e2e_loop skipped: needs root/loop, unchanged). - scripts/pre-pr-checks.sh --tree-only --base origin/main: "pre-pr-checks: all 15 check(s) green, 3 skipped, 0 could not be told, 2 open-PR row(s) not run (--tree-only)"; skips: submodule_pin (0 submodules initialised), hip_f16_audit and kernel_id_selftest (no gpu-kernels tree). Refs #3448.
…o, and draft the freeze RFC (engine#3448) (#3474) Security review (cl-flm lane, 24 Nov). Issue #3448 has two halves. The rollback half is fixed by #3454 (69bb03f): --latest reads the release identity from inside the verified image and refuses anything that is not the tag asked for and strictly newer. The freeze half is open, and it is a release-trust decision (CONTRIBUTING.md: anything touching security is an RFC), so this commit does NOT invent a fix for it: it stops the tool from claiming the freshness it cannot prove, and puts the decision on record. Rebased onto origin/main a95beca (after #3465/#3466/#3467); the line references below are that tree's. The mechanism, as it stands (os/v3/puppy/embed/usr/local/bin/1bit-update): - update_pick decides which release is the channel's newest and whether it is newer than the running one, from GitHub's release list (:257-302). That list is not signed; the first signature is checked at :453-455, after the "is it newer" decision, and the early exit says "up to date" without checking any signature (:430-438). So a release host that keeps serving the current release also keeps the machine answering "up to date" (freeze). What changed: - update_pick prints ahead=yes when the RUNNING release is newer than the channel's newest (a final against its own -rcs, or a channel that has not caught up), which used to be folded into newer=no (:291-295). - update_check and update_latest answer that case "up to date: running X is newer than the CHANNEL's newest Y" and print one note that the answer is the unsigned release list's word, so a host that hides a newer release is not detectable (:328-336, :430-438). A plain "up to date" line is kept for the same-tag case, so the console, the notice and the board rows keep reading it. - docs/update-trust.md (new): what the signature covers today (tools/release_sign.py), the exact order --latest decides in with file:line, what #3454 closed and what it leaves open, the freeze threat model (adversaries, in/out of scope, P1-P3), and the draft RFC body: options A (signed, expiring latest per channel reusing release_sign.py), B (TUF-style metadata), C (signed tag -> commit), D (tag+channel in the signed SHA256SUMS), E (accept the risk), each with its trust assumptions and cost, the test plan and the NOTICE impact, and the open owner questions. - docs/os-v3.md, "In-system updates": a paragraph after the trust order saying what the order does not prove - freeze, with the release-list/commit/rollback facts - and pointing at the draft. - tests/update_check_test.sh: two arms (the ahead wording, the note), and the existing "a final release sorts after its own release candidates" arm now asserts the ahead wording, which is what the tool says there now. os/mini/release-check.sh --self-test gains that same output as a PASS fixture, so the update-check row still recognises the answer on the board. What remains open, and is the RFC's first question: is a compromised release host (freeze) in the threat model? If yes, option A is the recommendation; if no, record that in docs/os-v3.md and close #3448. No code in this commit closes it - the honest wording says exactly that. Evidence: - Control (new test, PRE-FIX updater from origin/main a95beca): c=~/.cache/scratch-3448/control; mkdir -p $c/tests $c/os/v3/puppy/embed/usr/local/bin git show origin/main:os/v3/puppy/embed/usr/local/bin/1bit-update > $c/os/v3/puppy/embed/usr/local/bin/1bit-update cp tests/update_check_test.sh $c/tests/ (cd $c && sh tests/update_check_test.sh) FAIL a final release sorts after its own release candidates (v2026.49 > v2026.49-rc1) FAIL a running release newer than the channel's newest is said as ahead, not as a flat 'up to date' FAIL the up-to-date answer names the unsigned release list it rests on, and what that cannot detect update_check_test: FAIL - Branch: sh tests/update_check_test.sh -> "update_check_test: ok" (12 arms). - Sanity: the same control tree with origin/main's own test and updater -> "update_check_test: ok" (only the arms this change adds or re-words differ). - ctest --test-dir build -R 'update|release_check_selftest|release_sign' --output-on-failure --timeout 600: "100% tests passed, 0 tests failed out of 12" (update_e2e_loop skipped: needs root/loop, unchanged). - scripts/pre-pr-checks.sh --tree-only --base origin/main: "pre-pr-checks: all 15 check(s) green, 3 skipped, 0 could not be told, 2 open-PR row(s) not run (--tree-only)"; skips: submodule_pin (0 submodules initialised), hip_f16_audit and kernel_id_selftest (no gpu-kernels tree). Refs #3448. Co-authored-by: bong-water-water-bong <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
engine#3340's last unfixed surface was the registry record, not the route.
registry/checked.jsonsaidMiniCPM4-8B "passed" on hrx (engine
b9812e0ca35e, "said Paris") while the bug that lost the lastlayer's attention term was live.
tests/serve_e2e.shasks one question under temperature 0, and thatprompt agrees on the broken engine too, so the row could never see the class (2 of 8 prompts, 25 %
greedy agreement, mean KLD 0.305 nats). The cause --
common.get_rows_scale.f32compiled MiniCPM'sresidual_scale0.2475 through an int64_t-onlyto_config_value, multiplying the layer-31 attentionterm by 0 -- is already fixed on main by the pin bump
0dcf0647(llama.cpp#493). What main stillcarried was a row that reads as verification, and no place that makes a route state what was measured.
registry/decode_agreement.json(new): each entry is onetools/logprob_agree.pyrun -- thehrx/llama.cpp and Loom arms against the CPU arbiter, same GGUF, greedy, thinking off -- with its
engine, llama.cpp commit, date, source link and known answers. MiniCPM4-8B: 75 % greedy agreement /
0.649 token-id match / 0.0266 nats mean KLD / same top token 100 %, 391 and the primes; 25 % / 0.252
/ 0.305 before the fix. The numbers are copied from the issue's own measurement comment (named in
source), not re-measured by CI, and the file says so.registry/checked.json:43-84: the MiniCPM4-8B row carries it as itsdecodeobject, beside theserve pass it already had, so the row states what was measured rather than only what it said.
tools/registry_check.py:--annotate-decodecopies the record onto the checked rows and runs nomodel;
--check-decodefails when a checked row loses its measurement or states one nothingrecorded; every sweep write re-applies the record (
sync_decodein the run loop, :498), so a re-runcannot erase it. The record's shape is checked, not just its JSON: commit/date/source, each number in
the range
logprob_agreeprints it in, the row's own backend arm present, and the file present --annotate refuses a missing record instead of reading it as "record nothing" and stripping rows.
--self-test: a scratch registry driven through the stale row, the annotation and every refusal, sothe check's firing behaviour is pinned by something a machine runs.
CMakeLists.txt:1742: ctest rowsregistry_decode(--check-decode) andregistry_check_self(
--self-test).docs/registry.md:81: what a pass does and does not clear, and the record's format.Evidence
The two skips are the gpu-kernels add-on rows (
hip_f16_audit,kernel_id_selftest): no$GPU_KERNELS_DIRand nothird_party/gpu-kernelson this box, each printed with its own SKIPPEDreason. Nothing exited 77 or 2.
What is not verified
1c195c45+llama.cpp fork commit
edf7f11bc, i.e. with llama.cpp#493), copied into a reviewed record. Nodevice/model run was made for this PR, and
registry/decode_agreement.jsonsays in itsaboutthat the numbers are recorded, not re-measured by CI. A re-run on the current pin (
f36c1e825) isthe remaining issue verification (triage expects 75 % / KLD 0.027); this PR does not claim it.
lane's row; this PR only makes the fallback's registry provenance honest.
engine 1c195c45,llama_cpp edf7f11bc; the fix is carried onmain by pin bump
0dcf0647. Thewhyfield spells that out sollama_cppnot being the currentpin does not mislead a reader.
Review risk
decode_problems()is the new gate over a reviewed data file: every recorded measurement must bestated on its row and every stated one recorded, plus commit/date/source/range checks and the row's
own backend arm. The one judgement call to read is the deliberate "a missing record is a FAIL, and
annotate refuses instead of stripping rows" behaviour, pinned by the self-test.
Refs #3340