Repository navigation
docs(bench): measure what the L5 main-thread repayment is worth - #125
Conversation
#58's L5 bullet states the repayment as deleting "the plan interpreter, batch pipeline, and recursive validator from the main-thread bundle", and #66 §6 makes it a cutover gate against 1.5x the reference median. The re-audit established that the gate is missed and that none of the three is deletable yet. Nobody has said what the deletion is worth — which is the number the cutover decision is missing, and the only part of L5 that can be produced without native evidence. Four arms, deterministic bytes, both fixtures. On the gated fixture's preview main program: baseline 81,068 B gzip (1.582x), recursive validator gone 73,000 (1.425x), plan interpreter and batch pipeline gone 55,139 (1.076x), both gone 46,411 (0.906x). On the rows-0 app: 60,683 -> 53,376 -> 40,657 -> 33,178, or 1.185x -> 0.648x. The two fixtures disagreed about the gate in the re-audit and do not disagree about this. The repayment is worth 34,657 B gzip, 42.7% of the Lynx main-thread program, and the gate's gap is 4,226 B — 12.2% of it. A repayment collecting an eighth of what is on the table still closes the preview arm. Either half clears it alone; the IFR arm needs the batch pipeline, where the validator alone falls 976 B short. Two things this does not say. It does not close the complete-artifact ratio #58's motivation quotes, which walks 3.214x -> 2.361x across the arms: L5 is a main-thread gate and the artifact gate is a larger, separate question. And the halves may not be added — compressed deltas are non-additive, here slightly super-additive, because each half opens removals in the other. Each arm removes its target by exported entry and lets production tree-shaking compute the closure, so a helper the direct first-screen path still calls stays and is not counted. It remains an upper bound: the exit gate keeps header checks where this arm keeps none, and prepareLynxHostBatch stays reachable while the staged path is the direct applier's native-list fallback. What the repayment collects is less, which is why the comparison that matters is against the gap. The control is that an ablation may delete machinery, never application. Every arm reproduces the baseline's visible-tree and background semantic checksums or the tool fails the run, the batch arm leaves the background program byte-identical on both fixtures, and the baseline reproduces byte-for-byte. The tool is an operator tool, not a CI gate: it rewrites packages/lynx/src/core so a production build can be taken with a target absent, refuses to start unless those sources are clean, and restores them in a finally. The two halves are also blocked differently. The send side is already development-only; the receive side is not, and its failure path is load-bearing — it recovers the sender's identity and settles a pending call rather than only reporting. So the validator half is a scoped replacement rather than a deletion, and its 8,068 B is the loosest of the three bounds. The batch half's blocker is coverage, not posture. Refs #103, #66. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
|
Validation note, correcting the body's Validation section rather than rewriting it. The second full run this PR promised — the one that would attribute every failing What stands is the first run: 8 failed / 21,058 passed / 8 skipped across 2,197 Everything else in the Validation section holds as written: Generated by Claude Code |
The per-file attribution this PR owedThe earlier note said the second full run did not finish and that five of the eight failures were unattributed — outstanding work, not a passing claim. That run has now been done, on a quiet host, and it discharges the promise. 4 files failed / 2193 passed (2197); 4 tests failed / 21,070 passed (21,074); 2,512 s. Host load 0.16 at start, 4.34 at end (1-minute, 4 CPUs). Because this branch is the tip of the stack, its tree contains #121 + #122 + #124 as well as this PR, so the run is validation evidence for all four. Every failure, attributed
Why these are the container's and not the stack'sNot an argument from the diff — an argument from a second branch. The B0 branch ( The other four from the first run were load, not defectsThe first run reported 8 failures in 3,755 s and named None of the four persistent failures is in a package this stack changes: #121/#122/#124 touch Generated by Claude Code |
With --harness inventory no checksums exist, so the semantic-checksum control silently skipped and an ablation that changed the authored application would have printed its byte deltas as if validated. The tool now warns loudly in that mode instead of implying the control passed. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YHfFsy9CLaRovTFH8pTGyY
# Conflicts: # docs/lynx-specialized-target-l0.md
Summary
#103 §5's last item is the L5 bundle repayment, and #58 states it as deleting
"the plan interpreter, batch pipeline, and recursive validator from the
main-thread bundle". #114 established that the ≤1.5× gate is missed and that none
of the three is deletable yet. Nobody has said what the deletion is worth —
which is the one number the cutover decision #115 handed to the owner is missing,
and the only part of L5 that can be produced without the native evidence #66 §6
says this container cannot produce.
This measures it. It deletes nothing and flips no default.
The repayment is worth 34,657 B gzip — 42.7% of the Lynx main-thread program —
and the gate's gap is 4,226 B, 12.2% of it. A repayment that collects an eighth
of what is on the table still closes the preview arm. Either half clears it
alone; the IFR arm needs the batch pipeline, where the validator alone falls
976 B short.
Two things it deliberately does not say. It does not close the
complete-artifact ratio #58's motivation quotes — 3.214× at baseline, 2.361×
with both gone — because L5 is a main-thread gate and the artifact gate is a
larger, separate question. And the halves may not be added: compressed deltas are
non-additive, and here they are slightly super-additive (8,068 + 25,929 against
34,657 measured together), because each half opens removals in the other.
Why a ceiling is the honest form
Each arm removes its target by exported entry and lets production
tree-shaking compute the closure. That is what keeps it from over-claiming: a
helper the direct first-screen path still calls stays in the bundle and is not
counted against the repayment.
It is still an upper bound, because each arm deletes outright where the shipping
change replaces. #66 §3's exit gate keeps header checks on delta traffic; this
keeps none.
prepareLynxHostBatchstays reachable while the staged path is thedirect applier's native-
<list>fallback and while the universal path is thetransition core per #103 §4; this removes it unconditionally. The repayment
collects less than the number above — which is exactly why the relevant
comparison is against a 4,226 B gap rather than against the ceiling itself.
The control
An ablation may delete machinery, never application.
background-program semantic checksum exactly. The tool fails the run if one
moves.
fixtures — independent evidence that
prepareLynxHostBatchis main-thread-onlycode, and a live check that the ablation reaches only what it names.
These are deterministic bytes, not wall clock; no host-quiet claim is involved.
Changes
benchmarks/lynx-bundle-size/l5-ceiling.mjs— new. An operator tool, not a CIgate: it rewrites
packages/lynx/src/coreso a production build can be takenwith a target absent, refuses to start unless those sources are clean so the
restore can never lose work, and restores in a
finallyso an aborted runleaves the tree as it found it. Arms are selectable (
--arms,--harness).benchmarks/lynx-bundle-size/results/l5-ceiling.md— the execution report.benchmarks/lynx-bundle-size/README.md— documents the tool beside the twosuites it drives.
docs/lynx-specialized-target-l0.md§8 — the numbers, against §6's existinglist of what the specialized path deletes.
Validation
pnpm format:check(repo-wide, clean)pnpm typecheck(repo-wide, clean)pnpm test— 8 failed / 21,058 passed / 8 skipped across 2,197 files,3,755 s wall. This diff adds a benchmark script, a report, a README
section, and a docs section; it changes no package source and no test. The
first run's console capture was truncated, so a second full run is in
flight to attribute every failing file individually; this section will be
updated with that list. The three visible in the first capture were
rspeedy-pluginnative-demo(pre-existing per Execution plan (#58): complete L2, then drive L4→L6 — full context handoff #66 §2.3),docusaurushydration, and
syntax-highlighternegative-controls.node benchmarks/lynx-bundle-size/l5-ceiling.mjs— full four-arm run,reproducing every number in the report, with the semantic-checksum control
passing and the working tree clean afterwards
node benchmarks/lynx-bundle-size/inventory.mjs— baseline reproducesbyte-for-byte across repeated runs
No package source changes, so no changeset: this adds a benchmark tool and
documentation.
Risk / follow-ups
packages/lynx/src/coreonrestore. It refuses to start when that path is dirty, which is the guard, but
it is still a tool that writes to product sources and it is deliberately kept
out of
bench.mjsfor that reason.measurement — only the three references'
.web.bundlefixtures are vendored.Every ratio here inherits that, as docs(bench): re-audit the L5 bundle gate on the unmerged issue-66 stack #114 already recorded.
differently. The batch half's blocker is coverage: Lynx specialized background core: the Block model over the wire (#58 L2 body, post-attribution direction) #103's U3b — native lists
on the block core — is a deferred GO awaiting the owner, and once the
specialized core covers every page there is nothing left in
prepareLynxHostBatchfor a Lynx main thread to call. The validator half's isposture: the send side is already development-only, but
main-thread.ts:2485validates every message a production main thread ishanded, and that failure path is load-bearing — it recovers the sender's
identity and settles a pending
call-backgroundrather than only reporting. SoExecution plan (#58): complete L2, then drive L4→L6 — full context handoff #66 §3 asks for header checks on delta traffic, keeping the recovery, where
this arm keeps neither. Its 8,068 B is the loosest of the three bounds here.
new-lynx, sorun.mjsexits non-zero onevery tree this tool is useful on. That is docs(bench): re-audit the L5 bundle gate on the unmerged issue-66 stack #114's finding, unchanged here; this
reads the JSON payload rather than the exit code and does not edit a budget.
Provenance
agent-authored)Generated by Claude Code