Repository navigation
npu: a depth neither table reached is n/a, not a 0.00 pp pass - #916
Conversation
--match judged every depth with a percentage computed as 0.0 when its denominator was missing, so
live 0/0 vs offline 0/0 came out as "delta +0.00 pp PASS" and counted toward the bar. At tau=0 it
cannot fire (the loop drafts k every iteration); at tau>0 it is the normal case: p0's gated chain
measured 30/34, 1/1, 0/0, 0/0, i.e. the bar would have read "4 of 4 depths within 2 pp" for a
comparison that scored two depths.
Root cause is in the report, not the loop: the numerator/denominator arithmetic and the verdict are
now one function (npu/mtp/mtp_head.cpp depth_verdict) that returns scored=false when either side has
no denominator, and both print sites (per-prompt detail, summary bar) print n/a and leave the depth
out of the count. The summary now says "N of M scored depths" and says so explicitly when a depth
was not scored.
Red/green, host only (no device): tests/mtp_draft_test.cpp [9] keeps the old rule as legacy_within --
it still returns true for 0/0, which is the defect stated -- and asserts depth_verdict does not, plus
that the tau=0.6 shape scores 2 depths and that a real 20 pp gap still fails. With the old arithmetic
put back in depth_verdict: 4 checks FAIL ("4 of 4 depths scored"). With the fix: all checks passed,
ctest -R mtp_draft 1/1. A standalone reproducer over the same counts prints the old "4 of 4 depths
within 2 pp" and the new "2 of 2 scored depths".
No loop, cursor, engine or draft-logic change; the numbers a device run prints are unchanged at tau=0.
PR Reviewer Guide 🔍(Review updated until commit 2463a04)Here are some key observations to aid the review process:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 547033660 — reproduced both directions on this box, including the negative control that reinstates the old rule.
With this patch (ninja mtp_draft_test at this head, host only):
PASS verdict: a real 20 pp gap still fails, by its own amount
INFO verdict tau=0.6 shape: 2 of 4 depths scored, 2 within 2 pp (old rule said 4 of 4)
all checks passed (exit 0)
Negative control — the old cond ? a / b : 0.0 arithmetic put back inside depth_verdict(), same build:
FAIL verdict: 0/0 is n/a, not a pass
FAIL verdict: live reached nothing -> n/a
FAIL verdict: offline scored nothing -> n/a
FAIL verdict: the tau=0.6 chain scores 2 depths, never 4
PASS verdict: a real 20 pp gap still fails, by its own amount
INFO verdict tau=0.6 shape: 4 of 4 depths scored, 4 within 2 pp (old rule said 4 of 4)
4 CHECK(S) FAILED
So the four new cases are exactly the defect, the fifth shows the bar still bites on a real gap (the tests are not all passing vacuously), and the INFO line states the old behaviour instead of only describing it. git diff clean after the control.
Why the shape is right, not just green: both print sites now call the one function — tools/mtp_acceptance.cpp:618 (acc_live[d], reached) and :724 (the summary bar) — so a site cannot reintroduce the reading by editing a formula, and scored = false on either missing denominator is what makes "0/0 vs 0/0" stop being +0.00 pp. The summary now counts scored depths and says how many were not scored, which is what makes the tau>0 case (2 of 4) legible instead of looking like a 4/4 pass.
There was a problem hiding this comment.
🟡 Changes recommended
The report can incorrectly score an undrafted live depth and inflate the scored count, while the test fixture bypasses the denominator construction and fails to catch this case.
2 open issues
What changed in this PR
This PR centralizes live-versus-offline depth scoring so missing denominators are reported as unmeasured rather than counted as agreement.
Changes:
- Adds
DepthVerdictand a shared scoring helper. - Updates both reports to print
n/afor unscored depths and exclude them from summary totals. - Adds regression cases for missing denominators and a genuine acceptance-rate gap.
| File | Description |
|---|---|
tools/mtp_acceptance.cpp |
Uses shared verdicts in per-prompt and summary reporting. |
tests/mtp_draft_test.cpp |
Adds depth-verdict regression checks. |
npu/mtp/mtp_head.h |
Declares the verdict structure and scoring helper. |
npu/mtp/mtp_head.cpp |
Implements denominator checks and percentage-point scoring. |
Review effort: Balanced
…, not accepted_at[d-1] Under a tau gate a chain can stop right after ACCEPTING its last draft, so accepted_at[d-1] is positive while drafted_at[d] is zero. Both report sites used `d ? accepted_at[d-1] : drafted_at[0]` as the live denominator, so a depth the loop never drafted was scored live 0 % against an offline rate that WAS measured, and it counted toward the 2 pp bar's scored total. (Copilot review of #916, threads r4460421836 / r4460421905.) Root cause, host-reproduced before the fix (~/wt/mtp-window/zero-draft-denom-repro.cpp, toy model, tau=0.6, head confident only in draft 0 so the gate -- not a rejection -- stops the chain at nd=2 with both accepted): iterations 8, drafted_at 8/8/0/0, accepted_at 8/8/0/0 depth 3: old denominator 8 -> live 0.00 % <-- scored a depth never drafted new denominator 0 -> n/a At tau=0 every reached chain offers draft d, so the two denominators are equal at every depth -- which is why no published number (all tau=0) moves. Fix: Stats::reached_at[d] = chains that accepted drafts 0..d-1 AND offered a draft at d, maintained by the loop, plus one shared builder add_live_depths()/LiveDepths that both print sites and the test read -- so the report cannot derive the denominator a second way, which is the second review thread. Red/green, host only (no device): tests/mtp_draft_test.cpp [9] now drives the REAL construction from a gated toy run (PerfectGatedHead) with the same head's ungated run as the offline side, instead of hand-typed counts. * old denominator put back into add_live_depths: 3 CHECK(S) FAILED ("only the depths the gated loop drafted are scored"), exit 1; * reached_at left unmaintained in the loop: 3 CHECK(S) FAILED, exit 1; * both in place: all checks passed, ctest -R mtp_draft 1/1, tools/copyright.py --check rc 0. No loop, cursor, engine or draft-logic change; at tau=0 the printed numbers are identical by construction and [9] asserts it.
|
#916 ready for review at |
|
Persistent review updated to latest commit 68a2a5c |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 68a2a5ca — my previous READY was at 547033660 and the tprs-ready label names that old head, so this is the re-verdict for the current one.
Built and ran it here rather than reading the test names (~/wt/… scratch worktree, -DCMAKE_BUILD_TYPE=Release, gcc-16, the same flags CI uses):
$ cmake --build build --target mtp_draft_test rc 0, 3/3
$ ./build/mtp_draft_test all checks passed, rc 0 (94 PASS lines)
$ ctest -R mtp_draft 1/1, 100% tests passed
The fix is the shape the analysis says it is. Stats::reached_at[d] is incremented in the loop at the one place that knows both numbers — for (int i = 0; i <= a && i < nd && i < kMaxDepth; i++) — i.e. depth d counts when the prefix was accepted (d <= a) and a draft at d actually existed (d < nd), so a chain that stopped because the tau gate cut it contributes no denominator at the depth it never drafted. LiveDepths + the shared add_live_depths() put the pair in one place, which is what stops the report sites and the test from reading the table differently.
The negative control is exact. Removing only that one increment (nothing else) gives:
FAIL verdict: a reached depth is a drafted depth once the prefix was accepted
FAIL verdict: only the depths the gated loop drafted are scored
FAIL verdict: at tau=0 the denominator equals accepted_at[d-1] at every depth (no number moves)
3 CHECK(S) FAILED rc 1
— the three checks that carry the claim, and only those. So the test is load-bearing rather than descriptive.
The compatibility promise holds in the test's own numbers: INFO verdict gated chain: drafted 8/8/0/0 accepted 8/8/0/0, 2 of 4 depths scored (old denominator: 3). The defect is stated in the suite itself (verdict: the OLD denominator scored the undrafted depth (the defect, stated)), so a future reader sees what was wrong, not just what is right.
Two notes, neither a gate:
- My first attempt at a negative control was
i <= a→i < a, and it passed. That is not a hole in the fix, it is a limit of the toy: the gated chain there hasa == nd, where the two forms coincide. The case that distinguishes them — a rejection at depthawitha < nd, wherereachedmust includea— is covered by the ordinary chains but not by a check that fails when<=is narrowed. If you want that arm to have teeth, one chain witha < ndand an assertion thatreached[a]is non-zero would do it. pr_agentis red at this head (run 41746168207) — the usual coder-llm-off condition, not this PR.buildpassed in 4m41s, Analyze ×5 + CodeQL pass,hw_gateskips.
No device number is claimed here and none can move: this is host arithmetic over counters the loop already kept.
|
Persistent review updated to latest commit a9c61a1 |
|
Persistent review updated to latest commit 2463a04 |
… prompts it did not cover mtp_depth_pool.py kept only the rows it could score, so the tool's own `not scored` line was dropped. The tool prints `depth 4: n/a (live 0/0 reached, offline 15/20) not scored` whenever one side has no denominator, and its reason for refusing to score it is written down in npu/mtp/mtp_head.h:96 -- at tau>0 the chain gate stops before depths 3-4, so that line is expected, not exotic. A pool over a four-depth run whose chains reached three depths therefore printed `3 of 3 scored depths within 2 pp at the same positions`: a bare full pass over a table that had silently lost a depth, which is the phantom-depth read (#916) one layer up. The same hole on the prompt axis. This lane runs one or two prompts per ticket, so prompts 0,1,5 is a normal pool; the header printed `prompts 0..5`, i.e. the range it spans rather than the set it measured, and the brief's window is prompts 0..7 -- so a gapped pool read as the whole window. Both are now reported rather than inferred: * a depth some ticket reported as not scored and no ticket scored a cell for is printed as unmeasured and named, and the verdict counts it: `3 of 3 scored depths ... (1 of 4 depths unmeasured: 4)`; * a non-contiguous prompt set says which prompts are missing instead of printing a range. Red on the old tool, green after -- tests/mtp_depth_pool_test.py grew two fixtures and reports: FAIL the not-scored depth is printed as unmeasured FAIL ... and it is depth 4, the one the log named FAIL the verdict says 3 of 4 depths, not a bare '3 of 3': 3 of 3 scored depths within 2 pp ... FAIL the header names the hole instead of spanning it: ... (prompts 0..5, 3 ticket(s)) (the rest of the suite, including the four refusal cases, was already green and stays green) The recorded 8x64 window is unchanged to the count: `--selftest` over the three clause55 tickets still pools 32 cells = 8 prompts x 4 depths at +0.00 / +0.55 / +0.09 / +1.08 pp, `4 of 4 scored depths`, PASS.
…ct, with its traps as refusals (#1146) * tools: mtp_depth_pool.py -- the pooled per-depth live-vs-offline verdict, with its traps as refusals The MTP brief's clause is judged on 8 prompts x 64 tokens POOLED, but one `mtp_acceptance --live` run costs ~90 s of array time plus a model + head load, so an 8-prompt window is two or three npu-hold tickets of <= 3 min. Pooling those logs by eye produced two wrong numbers in this lane, so the arithmetic moves into the tree and the two traps become refusals: * a ticket log REPEATS ITS TAIL after the harness' exit line (pooling that inflated a 12-cell window to 20) -- everything after '== ticket exited' is ignored; * a cell is keyed by (prompt, depth); a second row for a key with different counts is a disagreement between tickets or a format change, never an average; * a ticket's own run-level row must equal the sum of its per-prompt rows, so a truncated log cannot pass as a smaller window; * a depth with no denominator is UNMEASURED, not a +0.00 pp pass (the phantom-depth defect, #916). Known-answer check, on the real logs that produced the recorded numbers: pointing the tool at the three 2026-11-05 clause tickets reproduces 136/181, 86/136, 63/86, 53/63 and the recorded deltas (+0.00 / +0.55 / +0.09 / +1.08 pp) to the count, so this port is equivalent to the script that made the claim. tests/mtp_depth_pool_test.py drives fixture tickets (no model, no device) through the agreeing, duplicated, disagreeing, short-read and empty-denominator cases; registered as ctest mtp_depth_pool. * tools: the pooled verdict names the depths it could not score and the prompts it did not cover mtp_depth_pool.py kept only the rows it could score, so the tool's own `not scored` line was dropped. The tool prints `depth 4: n/a (live 0/0 reached, offline 15/20) not scored` whenever one side has no denominator, and its reason for refusing to score it is written down in npu/mtp/mtp_head.h:96 -- at tau>0 the chain gate stops before depths 3-4, so that line is expected, not exotic. A pool over a four-depth run whose chains reached three depths therefore printed `3 of 3 scored depths within 2 pp at the same positions`: a bare full pass over a table that had silently lost a depth, which is the phantom-depth read (#916) one layer up. The same hole on the prompt axis. This lane runs one or two prompts per ticket, so prompts 0,1,5 is a normal pool; the header printed `prompts 0..5`, i.e. the range it spans rather than the set it measured, and the brief's window is prompts 0..7 -- so a gapped pool read as the whole window. Both are now reported rather than inferred: * a depth some ticket reported as not scored and no ticket scored a cell for is printed as unmeasured and named, and the verdict counts it: `3 of 3 scored depths ... (1 of 4 depths unmeasured: 4)`; * a non-contiguous prompt set says which prompts are missing instead of printing a range. Red on the old tool, green after -- tests/mtp_depth_pool_test.py grew two fixtures and reports: FAIL the not-scored depth is printed as unmeasured FAIL ... and it is depth 4, the one the log named FAIL the verdict says 3 of 4 depths, not a bare '3 of 3': 3 of 3 scored depths within 2 pp ... FAIL the header names the hole instead of spanning it: ... (prompts 0..5, 3 ticket(s)) (the rest of the suite, including the four refusal cases, was already green and stays green) The recorded 8x64 window is unchanged to the count: `--selftest` over the three clause55 tickets still pools 32 cells = 8 prompts x 4 depths at +0.00 / +0.55 / +0.09 / +1.08 pp, `4 of 4 scored depths`, PASS. * tools: the pooled verdict states the generation budget it covers, and refuses one prompt at two lengths Third hole of the same family as the previous commit: the pool reported which prompts and depths it scored, but never the generation budget, and the brief's window is 8 prompts x 64 tokens. The live per-prompt header carries it (`prompt 0: TEXT IDENTICAL, 64 tokens, accepted 44/80, ...`), so a pool mixing a 64-token ticket with a 32-token one silently produced a table whose shape matched neither -- the same failure as the prompt gap: a verdict that reads as the window it was not measured over. The budget is now part of the header (`..., 64 tokens/prompt, 3 ticket(s)`), and a pool that mixes budgets says so per prompt instead of inheriting whichever ticket was read first: MIXED token budgets: 64 on prompts 0; 128 on prompts 1 -- the pooled verdict is not one window Mixing lengths across *different* prompts stays legal, because a longer prompt is a legitimate measurement; the same prompt measured at two lengths is a contradiction about one cell and is refused, like any other disagreement already refused here. Only the live header shape is read: its `N tokens` is the emitted count (`r.stats.emitted`, i.e. --tokens), while the offline header's number in the same position is the stream length -- reading both would have compared two different quantities, which is the class of mistake this file exists to stop. Red on the previous commit, green after (three of the new checks fail against `9ec6cce8`, 26/26 pass now): FAIL a uniform budget is stated in the header FAIL the mixed budget is named per prompt FAIL prompt 3 at 64 and at 32 tokens is refused `--selftest` over the three clause55 tickets still reproduces the recorded window to the count, now labelled `64 tokens/prompt`: 32 cells = 8 prompts x 4 depths, +0.00 / +0.55 / +0.09 / +1.08 pp. * tools: a pre-`reached` log is refused for the reason it is actually refused Last night's corpus sweep (all 70 `mtp_*/ticket-*` logs in ~/wt/mtp-window, one at a time) turned up two logs this tool refuses with the wrong explanation: `ticket-match-p0-1-20261102-151015.log` and `ticket-match-p0-3-diffs-20261102-152047.log` (2 of the 16 that carry cells; the other 54 are offline runs with no `--match` rows and are skipped as such). They are REFUSED CORRECTLY -- their per-prompt rows are the pre-`reached` shape, depth 1: live 90.00 % (18/20) offline 90.00 % (18/20) delta +0.00 pp whose live rate is the MARGINAL one, not the rate conditional on reaching the depth that the current column reports, so pooling them would mix two different quantities. But the diagnostic said "the log was read incompletely, do not pool it", which is about truncation, and would send a reader to re-run a complete six-minute ticket. Now the two cases are distinguished by structure rather than guessed: the run-level rows live after the `== live vs offline at the SAME positions` header, so a `delta`-shaped row BEFORE that header is a per-prompt row in the old shape, and the refusal names it -- <path>: 8 per-prompt row(s) in the pre-`reached` shape (live rate marginal, not conditional on reaching the depth) -- this log predates the column, so its cells are a different quantity; re-run it with a current build rather than pooling it (the counts are right: 8 = 2 prompts x 4 depths on the first log, 16 = 4 x 4 on the second). A log that really is short still gets the "read incompletely" refusal, unchanged. Corpus re-swept after the change: 14 pool, 54 skipped as offline-only, the same 2 refused -- and now for the right reason. Recorded 8x64 known answer unchanged to the count (`32 cells = 8 prompts x 4 depths`, `64 tokens/prompt`, +0.00 / +0.55 / +0.09 / +1.08 pp, `selftest PASS`). 28/28 checks in tests/mtp_depth_pool_test.py; ctest 1/1; copyright clean. * tools: the pooled verdict states the chain width too, and names the prompts that ran wider Fifth axis of the same defect, and the last one the window has: k. Each `--live --match` row carries every depth the run drafted, so a k=6 ticket pooled with k=4 ones produces a SIX-depth table whose depths 5-6 have cells only on the k=6 prompts -- and the verdict then reads `6 of 6 scored depths within 2 pp at the same positions`, i.e. a pass over depths five of the tickets never attempted. On the brief's deliverable (a four-depth table) that is not the claim being made. The chain width is read from the rows themselves (the deepest depth a prompt has a row for, scored or not-scored, so a depth the chain never reached still counts toward k) and printed: pooled 32 scored cells = 8 prompts x 4 depths (prompts 0..7, 64 tokens/prompt, k=4, 3 ticket(s)) and when it is not one value, per prompt: MIXED chain width (k): 4 on prompts 0; 6 on prompts 1 -- the depths above 4 come from the wider prompts only, not from the whole pool Pooling different widths stays legal -- a k sweep is a legitimate measurement -- but the table no longer implies the whole pool reached those depths. A prompt measured twice resolves to the wider run, which is the one whose cells the table keeps. Red on `56487b49`, green after: `the differing chain width is named per prompt`, `... and says what it means for the table` and `a uniform chain width is stated once in the header` all fail there. Suite 34/34; `--selftest` over the three clause55 tickets still reproduces the recorded window to the count, now labelled `k=4`; `ctest -R mtp_depth_pool` 1/1; copyright clean. * tools: the pooled verdict states the run identity (vocab, batch width, hidden source) Last input that can change what a cell means, and the one this lane has published the largest number for: the hidden source alone moved acceptance between 2.1 and 3.19 tokens/pass, and `mtp_acceptance` prints the identity of the run that produced a log on one line at init, forward ready: vocab 248320, max_batch_rows 16, hidden source post-final-norm so a pool that mixes a `residual` ticket with `post-final-norm` ones averages two measurements while reporting one table. Same for a different vocabulary (a different model) and a different batch width (a different sealed ELF family). None of that is visible in the cells; all of it is in the log. The identity is now in the header -- pooled 32 scored cells = 8 prompts x 4 depths (prompts 0..7, 64 tokens/prompt, k=4, vocab 248320, max_batch_rows 16, hidden post-final-norm, 3 ticket(s)) -- and a mixed pool names each identity with the ticket it came from instead of blending them: MIXED run identity: vocab 248320/M16/post-final-norm from norm.log; vocab 248320/M16/residual from rsd.log -- a different model, batch width or hidden source is a different measurement, not one pool Only tickets that contributed cells are listed, so an offline log in the same command does not fake a mix. With this the header states the whole window -- prompt set (and any gap), depth coverage (and any depth no chain reached), generation budget, chain width, and run identity -- which is the set of inputs the logs carry that can change a cell. The lane's own corpus is uniform on all of them (86 logs: one model, vocab 248320, M=16, post-final-norm), so this changes no recorded number; it stops the next pool from quietly not being one. Red on `4f53bf61`, green after (2 checks, 36/36 total); `--selftest` still reproduces the recorded 8x64 window to the count; the corpus sweep is unchanged (14 pool / 54 offline-only / 2 refused for the pre-`reached` shape); `ctest -R mtp_depth_pool` 1/1; copyright clean. * tests: the recorded 8x64 window is now checkable in CI, not only on the box that holds the tickets The tool's known answer -- the per-depth live-vs-offline table the brief is judged on -- could only be reproduced with the original `npu-hold` logs, which live in one home directory on one machine. So the artefact that produces the deliverable's published verdict could break its own recorded numbers and CI would stay green: `ctest mtp_depth_pool` ran only the refusal self-test, with no logs. The three tickets are now shipped as fixtures under `tests/fixtures/mtp_clause55/`, extracted verbatim from the 2026-11-05 tickets (prompts 0 / 1-4 / 5-7, 78 lines together), and the test runs `--selftest` over them: PASS the fixtures pool to the recorded 8 x 4 cells PASS fixture pool reports 136/181 = 75.14% PASS fixture pool reports 86/136 = 63.24% PASS fixture pool reports 63/86 = 73.26% PASS fixture pool reports 53/63 = 84.13% PASS all four depths are inside the bar on the fixtures PASS the tool's own known-answer check passes on them Nothing the tool reads was edited -- the `[ Ns]` stamps, the `[live joint …]` brackets and the `match pN:` headers are as the tickets printed them -- so the pool still has to reproduce the counts instead of a fixture written to agree with the code. The extraction command is in the directory's README, with the tickets it came from. Proven it is not vacuous: adding 1 to `live_n` in `table()` reds 8 checks, including `the shipped fixtures reproduce the recorded 8x64 window (rc=1)`; reverting returns `all checks passed` (44 checks). Copyright clean; no model, no device, no token. * tests: carry the Apache notice on the fixture README (copyright --check) * tests: the clause-55 fixtures were never committed (.gitignore `*.log`), so CI could not read them The build on `673faa2e` failed in exactly one test, and it was mine: 53 - mtp_depth_pool (Failed) FAIL tests/fixtures/mtp_clause55 is incomplete: ['/__w/engine/engine/tests/fixtures/mtp_clause55/p0.log', ...] `.gitignore:19` is `*.log`, so `git add -A tests/fixtures/mtp_clause55` committed the README and silently left all three tickets behind. Locally the test passed because the untracked files were lying in the working tree; in a clean checkout there was nothing to read. The guard fired -- that is the guard doing its job, one environment too late -- but the real defect is that a fixture can be present locally and absent from the commit at all. Two changes, so this cannot recur quietly: * the fixtures carry `.txt` (the ignore rules do not match it) and the directory README says why, with the CI failure quoted, because a rename or a fresh clone must not be able to drop them; * `tests/mtp_depth_pool_test.py` now asserts with `git ls-files` that all three are **tracked** before it pools them, so an unfixtured tree fails locally rather than only on a clean checkout. Measured: with the files present but unstaged, `FAIL the three fixtures are tracked by git (0 of 3)`; staged, `PASS ... (3 of 3)` and `all checks passed`. Verified from a clean tree rather than in my working copy: a fresh `git worktree add` at this commit runs the test green, which is what CI will do. No model, no device, no token. --------- Co-authored-by: bong-water-water-bong <[email protected]>
… bare FAIL on 2 chains (#1318) The tau=0.6 window (engine#1300) put this in the leaderboard and in docs/npu.md, and the tool that produced it still printed its two deep rows as plain verdicts: depth 2 11/13 = 84.62 % offline 57/99 = 57.58 % +27.04 pp FAIL depth 3 2/2 = 100.00 % offline 17/32 = 53.12 % +46.88 pp FAIL 1 of 3 scored depths within 2 pp at the same positions Read on its own that says the live loop regressed against the offline protocol at tau=0.6. It did not: at 13 and 2 live chains those deltas are arithmetic, not measurement. One chain moves a depth's rate by 100/n pp, so under 100/2 = 50 chains a single accepted draft is worth more than the whole 2 pp bar. The table now says which depths a bar of this size can survive, in arithmetic rather than statistics: depth 2 11/13 = 84.62 % offline 57/99 = 57.58 % +27.04 pp FAIL (thin: 13 live chain(s), one chain = 7.7 pp > the 2 pp bar) depth 3 2/2 = 100.00 % offline 17/32 = 53.12 % +46.88 pp FAIL (thin: 2 live chain(s), one chain = 50.0 pp > the 2 pp bar) 1 of 3 scored depths within 2 pp at the same positions ... 1 of 3 scored depths have a denominator a 2 pp bar can survive (>= 50 live chains; below that one chain moves the rate by more than the bar) PASS/FAIL is untouched -- the bar is the brief's criterion, not a hypothesis test -- and the tau=0 window prints exactly what it printed before (all four depths have 63-181 chains, so no note and no extra line). Verified: `tests/mtp_depth_pool_test.py` -> all checks passed, with two new arms (a 3-chain depth is marked thin and counted out of the summary; a 120-chain depth prints its verdict and no thin note); injection: disabling the note makes exactly those two arms FAIL; `--selftest tests/fixtures/mtp_clause55/*.txt` rc 0 (the recorded 8x64 window still reproduces to the count); `npu_leaderboard.py --check` 30 record(s) valid; `copyright.py --check` rc 0 with the tree staged; `ctest -R 'mtp_draft|mtp_depth_pool|npu_leaderboard'` 3/3. refs #805 (whose tau=0.6 row this annotates), refs #916 (the phantom-depth rule this generalises). Co-authored-by: bong-water-water-bong <[email protected]>

What
--matchscores the live loop against the offline protocol per depth. Every depth was judged with a percentagecomputed as
0.0when its denominator was missing, so live0/0vs offline0/0came out as "delta +0.00 pp PASS"and counted toward the brief's 2 pp bar.
At
tau=0(the configuration the deliverable was measured in) this cannot fire: the loop draftskevery iteration,so
drafted_at[d]is always the iteration count. Attau>0it is the normal case — the chain gate stops early, andp0's gated chain measured
1 30/34 2 1/1 3 0/0 4 0/0(ticket-live-tau0.6-p0-1-20261102-163633.log), i.e. the barwould have printed "4 of 4 depths within 2 pp" for a comparison that scored two depths.
Root cause
Not in the loop: in the report. Two print sites (
tools/mtp_acceptance.cpp:617-625per-prompt detail,:719-731summary bar) each did their own numerator/denominator arithmetic with
cond ? a / b : 0.0, then compared two zeroes.A depth with no chain on either side is unmeasured, and an unmeasured depth is not a pass.
Fix
The arithmetic and the verdict are now one function,
onebit::npu::mtp::depth_verdict()innpu/mtp/mtp_head.{h,cpp}, returningscored = falseas soon as either side has no denominator — so a print sitecannot reintroduce the reading by editing a formula. Both sites print
n/a (live a/b reached, offline c/d) not scoredand leave the depth out of the count; the summary now reads "N of M scored depths within 2 pp" and says explicitly
when a depth was not scored.
Measured before/after (host only, no device)
tests/mtp_draft_test.cpp[9] carries the three cases at once: the counts of the tau=0.6 chain above, a 20 pp gapthat must still fail, and the old rule kept as
legacy_withinso the defect stays stated rather than described.A standalone reproducer over the same counts (
~/wt/mtp-window/zero-denom-repro.cpp, not part of the tree) prints theold line
4 of 4 depths within 2 pp at the same positionsand the new2 of 2 scored depths ...with the twon/arows, and keeps the "a real gap still fails" arm at
−20.00 pp.Build:
ninja mtp_draft_test mtp_acceptancerc 0 underthermal-runon a fresh worktree offorigin/main65460184;python3 tools/copyright.py --checkrc 0 (no new files).What this does not change
No loop, cursor, drafter, engine or
npu/forwardfile: attau=0every number the lane reported (p044/80,chain
3.20,stream 72 rows,0 mismatch,+0.00 ppat four depths) prints exactly as before. The device-sidere-confirm of those numbers is parked on the npu-hold queue (see
~/briefs/TMTPLOOP-STATE.md), not on this PR.Review follow-up (
68a2a5ca, Copilot threads r4460421836 / r4460421905, both resolved)The review found the hole this PR still left: the denominator itself was
d ? accepted_at[d-1] : drafted_at[0],and under a tau gate a chain can stop right after accepting its last draft — so
accepted_at[d-1]is positive whiledrafted_at[d]is zero, and a depth the loop never drafted was scored live0 %against an offline rate that wasmeasured. That is a phantom score, not a missing one, so
depth_verdict'sscoredflag could not catch it.npu/mtp/draft.h:Stats::reached_at[d]— chains that accepted drafts0..d-1and offered a draft atd—maintained by the loop (
for i <= a && i < nd), plus one shared builderadd_live_depths(Stats&, LiveDepths&)thatboth print sites and the test read, so the denominator cannot be derived a second way in one place. At
tau=0itequals the old expression at every depth, i.e. no published number moves (asserted in [9]).
Reproduced before the fix, host only, toy model (
~/wt/mtp-window/zero-draft-denom-repro.cpp, tau=0.6, headconfident only in draft 0 so the gate stops the chain at
nd=2with both drafts accepted):tests/mtp_draft_test.cpp[9] now drives the real construction from that gated toy run (the ungated run of the samehead is the offline side) instead of hand-typed counts: old denominator in
add_live_depths→3 CHECK(S) FAILED(exit 1),
reached_atunmaintained in the loop →3 CHECK(S) FAILED(exit 1), both in place →all checks passed,ctest -R mtp_draft1/1,tools/copyright.py --checkrc 0.