Repository navigation
test(bench): count what the direct-emission floor touches (#103 U0 harness) - #104
Merged
Merged
Conversation
#103 U0 needs the architecture floor stated as a deterministic count, not only as a wall clock: the exit gate is whether the reconcile-equivalent for `select@10k` returns to the semantic floor rather than 10,042. The octane-direct cell now publishes three counters, read by the web harness from whichever realm defines them and summarised per operation: - `rowVisits` — row regions a patch touches on the main thread. - `writes` — PAPI slot writes it performs. - `rowScans` — row entries the background program examines to service the update, counted separately because it measures the state lookup rather than the tree walk. `rowScans` is where this cell is honestly worse than the core it models: `selectById` finds a row by scanning a plain id array, where a Block core holds the row's block directly. Counting it rather than optimising it away keeps the floor reported as measured; it is microseconds against tens of milliseconds either way. Counters are unconditional rather than build-flagged, so the measured bundle and the counted bundle are the same one. A patch performs O(change) increments. Cells that do not define them report nothing and the report omits the section, the same way a cell that cannot be driven reports "not measured" rather than a zero. Spread across reps is printed beside every count, because a non-zero spread means the number is not the invariant it is being quoted as. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
…ount The unified web harness ran every repetition of one cell before starting the next, so any host drift across the run landed entirely on whichever cell went second. That is the error a same-window comparison exists to avoid, and #103 U0 reads its verdict off exactly that comparison. Repetitions now interleave AB / BA / AB / ... and the report records one-minute/five/fifteen load at both ends of the window, so a reader can judge how quiet it was. Unlike the stage harness this one records rather than gates, because it also feeds the cross-framework chart. The direct cell's background counter conflated two different questions. `rowScans` counts what the stub actually touched, and its `selectById` finds a row by scanning a plain id array, so it reports up to 2n for a two-row change. A keyed core holds the block directly: `ForSlot.items` is a `Map<key, Block>`. `blockLookups` counts that instead and is reported beside `rowScans`, never in place of it, so the architecture claim and the fixture measurement stay separable. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
The direct-emission cell against the current path over the mutation ops, at 1,000 and 10,000 rows, on a quiet host with the cells interleaved AB/BA. The count the gate is written against: `select@10k` reconciles 10,042 child blueprints on the current path against 1 keyed block lookup on the floor, and `update10th@10k` 11,041 against 1,000. Spread 0 in every cell, as a deterministic count must be. The milliseconds separate only where presentation is a minority of the wall — `create` and `update10th@10k` have disjoint min-max ranges at 0.75x and 0.59x, `select@1k` at 0.54x — and do not separate in the storm cells, which are 78% presentation. `updateStorm@10k` has the floor's median on the wrong side with 5x the spread; that stays on the record as an open gate rather than being averaged away. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
Huxpro
changed the base branch from
perf/lynx-bg-replay-attribution
to
new-lynx
August 20, 2026 17:56
Huxpro
marked this pull request as ready for review
August 20, 2026 17:56
This was referenced Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Harness groundwork for #103 U0 — the update-path ceiling measurement.
Stacked on #102; review the last commit only.
U0 asks for the architecture floor for updates, the way
benchmarks/lynx-table/prototype/was the architecture floor for FCP. Most ofthat cell already exists:
prototype/app-service.jsemits change-proportionalslot deltas for every mutation op and
prototype/lepus-root.jsapplies themthrough the real Element PAPI, and
web/run-web.mjsalready drives--cells octane,octane-directovercreate/update10th/select/updateStorm/selectStormbehind a byte-identical page driver.What was missing is the half the exit gate actually turns on. The gate is not a
wall clock: it is whether the reconcile-equivalent for
select@10kreturns tothe semantic floor instead of the 10,042 blueprints #66 Phase 3 measured. So the
direct cell now publishes three deterministic counters:
rowVisits— row regions a patch touches on the main thread.writes— PAPI slot writes it performs.rowScans— row entries the background program examines to service theupdate, kept separate because it measures the state lookup, not the tree walk.
web/run-web.mjszeroes them immediately before each click and reads them whenthat op's predicate resolves, so each op's counts cover that op alone. Cells that
do not define them report nothing and the section is omitted — the same rule the
harness already applies to a cell it cannot drive, which reports "not measured"
rather than a zero.
rowScansis where this cell is honestly worse than the core it models.selectByIdfinds its row by scanning a plain id array; a Block core holds therow's block directly and would visit one. It is counted rather than optimised
away, so the floor is reported as measured. It is microseconds against tens of
milliseconds either way.
Counters are unconditional rather than build-flagged, so the measured bundle and
the counted bundle are the same one; a patch performs O(change) increments.
Spread across reps prints beside every count, because a non-zero spread means the
number is not the invariant it is being quoted as.
No measurement is reported here. The U0 run itself, and its GO/NO-GO verdict, go
on #103.
Validation
pnpm format:files:checkover every changed pathpnpm typecheck— pendingpnpm test— pending; these files are benchmark harness and are not in anyvitest.config.jsprojectprototype/smoke.mjsfunctional parity, pendingRisk / follow-ups
rather than hidden: the alternative is a build flag, which would mean the
counted bundle and the measured bundle are different bundles.
prototype/results/web-l0-session.md,2026-08-18, different host) has
updateStorm@10kat octane 539 ms againstdirect 572 ms — the floor losing at the flush/layout floor. U0's verdict has
to be per-cell for that reason, and
updateStormis already excluded from thedrain claim by Execution plan (#58): complete L2, then drive L4→L6 — full context handoff #66 Phase 2 (77.3% presentation residual).
Provenance
agent-authored)Generated by Claude Code