Repository navigation
test(bench): Phase 0 update-path attribution — delta candidate is NO-GO - #100
Merged
Merged
Conversation
The stage harness attributed create, replace, and append, so the two operations issue #66 A5 actually targets had a wall-clock total from the web harness and no owner. Deciding whether a typed delta plus main-thread slot dispatch is worth a wire ABI change needs the share `mt_prepare` and `wire_clone_transfer` hold on a pure prop mutation, and that number did not exist. Add both cells. Each sets up its own table at the create scale and then mutates it without creating or destroying rows, so whatever it costs is replanning, wire, and host apply. `select` clicks a row cell rather than a button, and `update10th` stamps a suffix onto a label the setup click chose, so its predicate is only knowable once the table exists; both go through the shared driver primitives the other cells already use. The operation table moves to `stages/operations.mjs` because `run.mjs` launches Chromium at import time and could not be tested. The equivalence test pins the create, replace, and append cells against the pre-change behaviour, so the published attribution stays comparable across sessions. The reported mutation list is derived from the table rather than listed beside it, so an added operation cannot be measured and then silently left out of the report. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
Issue #66's revised Phase 0 requires update10th, select, and updateStorm decomposed on the real dual-thread path. The storm runs fifty rounds back to back and cannot finish inside the per-operation deadline the other cells share, so the operation table now carries an explicit timeout and only the storm gets the long one. The storm is expected to sit at the flush/layout floor rather than in any segment a wire or replanning change could reach, which is what makes it the bound on the other two cells rather than a target of its own. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
The revised Phase 0 asks whether wire plus main-thread prop-bag replanning explains the update path's gap to the architecture floor. Measured on the real dual-thread web-core path, n=5, same window: those two segments are 3.4% of update10th, 2.3% of updateStorm, and 0.1% of select, against a 10% owner gate. The gate fails by an order of magnitude. What owns the update path instead is background render and reconcile: 49.5% of update10th and 62.0% of select. The sharpest form of it is that select flips one row's class in a 10,000-row table, sends 289 bytes, and spends 126.7 ms on the background thread producing them — the output is already proportional to the change while the time is proportional to the tree. No wire representation can reach that. The conclusion survives the instrumentation caveat: profile/control is 1.40x on update10th and 1.47x on select, and charging that entire delta to background replay still leaves it at 29.4% and 44.4%. updateStorm sits at the flush/layout floor at 74.9%, bounding what any upstream change wins. Per the gate's own terms its output outranks the original plan, so the delta protocol should be completed for correctness and validation simplification but must not be justified by update-path milliseconds. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
Huxpro
changed the base branch from
fix/lynx-hidden-activity-events
to
new-lynx
August 19, 2026 23:22
Picks up #98's wire-safe prop journalling in the direct first-screen applier, which the stack branched before. Without it `web-host.test.ts` fails: a `main-thread:` event prop stays a tagged callable in the snapshot that crosses the ContextProxy wire. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
Huxpro
pushed a commit
that referenced
this pull request
Aug 20, 2026
Huxpro
pushed a commit
that referenced
this pull request
Aug 20, 2026
…attribution Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
This was referenced Aug 20, 2026
Huxpro
marked this pull request as ready for review
August 20, 2026 17:55
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
Issue #66's revised Phase 0 asks for update-path attribution before betting on the A4/A5 wire cutover, with an explicit decision gate. This is that measurement and its verdict.
The stage harness decomposed only
create,replace, andappend.update10th,updateStorm, andselect— the operations A4/A5 targets — existed only as wall-clock totals fromweb/run-web.mjs, so the gap to the architecture floor had no owner. This adds all three cells and records the result.The gate fails by an order of magnitude. Measured on the real dual-thread web-core path (n=5, same window, AB/BA, fresh page per sample, quiet host):
mt_prepare+wire_clone_transferbg_replaypresentation_residualA typed delta plus main-thread slot dispatch can only remove host prop-patch planning and wire cost. Against a 10% owner gate those are 3.4% / 2.3% / 0.1%.
The sharpest form of the finding:
selectflips one row's class in a 10,000-row table, sends 289 B, and spends 126.7 ms on the background thread producing them.bg_replayis instrumented from the native event batch arriving on the background thread until the commit message is ready, so it covers event dispatch, render, reconcile, and batch construction. The wire output is already proportional to the change; the time to produce it is proportional to the tree. No wire representation reaches that.The conclusion survives the instrumentation caveat. Profile/control is 1.40× on
update10thand 1.47× onselect— the largest of any cell. Charging that entire delta tobg_replaystill leaves it at 29.4% and 44.4%, an order of magnitude above the delta candidate.updateStormsits at the flush/layout floor (74.9%) exactly as the revision predicted, bounding what any upstream change can win there.Per the gate's own terms ("the gate's output outranks the original plan"), Phase 2 needs re-aiming at background render/reconcile.
delta-protocol.tsremains worth completing for correctness and the header-only validation simplification (§3.4), but must not be justified by update-path milliseconds.Changes
benchmarks/lynx-table/stages/operations.mjs(new): the measured operation table as plain data.run.mjslaunches Chromium at import time and could not be tested, so the table lives here. Addsupdate10th(button, predicate derived from the pre-click label),updateStorm(fifty rounds, its own long deadline), andselect(row-cell click) alongside the existing cells.benchmarks/lynx-table/stages/operations.test.mjs(new): pinscreate/replace/appendagainst their pre-change click targets and predicates so the published attribution stays comparable across sessions, plus the new cells, the derived-predicate rules, and the deadline split.benchmarks/lynx-table/stages/run.mjs: click plumbing generalized to button and cell targets with per-operation deadlines; sampling, reporting, and markdown driven off the table. The reported mutation list is derived from the table rather than listed beside it, so an added operation cannot be measured and then silently omitted from the report.benchmarks/lynx-table/stages/results/live-10000.{json,md}: re-measured with all six cells.docs/lynx-specialized-target-l0.md§8: the Phase 0 entry, the gate verdict, and the consequence for the roadmap.Validation
pnpm format:checkpnpm typecheckpnpm test— started against this diff; result reported in a follow-up comment. The diff touches only benchmark harness files and docs, no published package source, and no vitest project coversstages/.node --test benchmarks/lynx-table/stages/*.test.mjs→ 17/17, run from the repo root.Red-green verified, per the issue's §1 discipline — ten deliberate breaks, each confirmed to fail and then restored:
appendpredicate 2000 → 2001selectrow 1 → 0update10thset up at 1k instead of the create scaleselectderivedPredicatereplacesetup predicate follows the create scalebench 50→bench 49Measurement conditions (per
benchmarks/lynx-table/README.md): 4-CPU container, load 0.32/4 at start; n=5 per A/B cell; control/profile alternating AB/BA; one vue-vdom pass per pair; fresh page per operation sample, each mutation cell re-creating its own table first; no other benchmark process in the window. Absolute milliseconds are host-bound and are not comparable with the 32-core sessions recorded elsewhere in spec §8 — only the within-window shares and ratios are.Risk / follow-ups
stages/analyze.test.mjsresolvespackages/lynx/...viapath.resolveagainst the cwd, so it only passes when run from the repo root;pnpm test:stagesruns from the package directory and fails on that test. Pre-existing and untouched here, but worth a follow-up.JSON.stringify(report, null, 2), which is not Prettier-clean, so every run leavesresults/*.jsonneeding a format pass before commit. Pre-existing.Provenance
agent-authored)Generated by Claude Code