Repository navigation
Commit cee012c
committed
graph: re-pin materializeRows() steady-state cost 0 -> 1, the re-validation's own number
`GraphHopTest` was RED on `origin/main` before this branch existed --
1 FAILED / 65 passed, verified by running it from a clean worktree at
bb81d80, not inferred. Consumers have no CI line (the only workflow gates
`lgj-abi`: fmt, clippy, test), so nothing would have reported it.
The assertion said a second `materializeRows()` on the same Mask costs zero
further crossings, citing the plan's §3.5 "describe cached per Mask; zero
crossings steady-state". It measured 1.
Root cause, and it is deliberate: `Mask.words()` no longer returns the cached
window directly. It re-describes through `lgj_mask_describe` and compares the
returned epoch against the stamp it holds, so a cached address is never read
after the substrate has moved under it. Root CLAUDE.md names that as the
shipped property -- `Mask` "re-validates the cached window against the
generation-checked registry at each top-level facade call". The stale pin was
written against the pure-cache behaviour that preceded it. Reverting the
number would mean deleting the re-validation, so the test moves, not the code.
The describe is still cached in the sense that matters: the words are not
re-fetched and the population is never re-scanned -- `lgj_mask_describe` fills
a descriptor and does no work over the rows. It is simply no longer free.
Steady-state is "constant per call", not "zero".
So the re-pin asserts that, rather than just flipping 0 to 1: a THIRD call is
measured and required to equal the second. One extra describe happening once
would satisfy a bare `== 1` on the second call; only a per-call cost satisfies
second == third, which is what a per-call re-validation predicts. The content
of the third call is checked against the first as well -- the re-validation
returns the same selection, it does not re-answer the question.
`PREDICTED_MATERIALIZE_STEADY_CROSSINGS` replaces a bare literal, so the
number now carries its provenance next to its sibling first-call constant.
Gates: GraphHopTest 68/68 (was 65 + 1 failed; the third-call cost and its
content check are the +2), core 612/612, bricks 70/70, trades 12/12 + 3/3,
JDK 28 `--release 28 --enable-preview` against abi 0.12.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG1 parent 1aa159d commit cee012c
1 file changed
Lines changed: 40 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
152 | 172 | | |
153 | 173 | | |
154 | 174 | | |
| |||
449 | 469 | | |
450 | 470 | | |
451 | 471 | | |
452 | | - | |
453 | | - | |
454 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
455 | 477 | | |
456 | 478 | | |
457 | 479 | | |
| |||
462 | 484 | | |
463 | 485 | | |
464 | 486 | | |
465 | | - | |
466 | | - | |
467 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
468 | 502 | | |
469 | 503 | | |
470 | 504 | | |
| |||
0 commit comments