Skip to content

docs(bench): re-audit the L5 bundle gate on the unmerged issue-66 stack - #114

Merged
Huxpro merged 4 commits into
new-lynxfrom
docs/lynx-l5-bundle-reaudit
Aug 21, 2026
Merged

Huxpro merged 4 commits into
new-lynxfrom
docs/lynx-l5-bundle-reaudit

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked on #113. Issue #66 Phase D, first item — the L5 bundle re-audit that
#66 §6 calls a hard gate.

No code changes. Two documents: a new
benchmarks/lynx-bundle-size/results/stack-66-reaudit.md and a §8 entry in
docs/lynx-specialized-target-l0.md pointing at it.

#58's cutover gate wants main-thread gzip "meaningfully toward the ~51 KB median
(propose ≤1.5× as the target)". #66 §6 records that #95 already repaid #63's
module-level gzip trade, so this milestone should re-verify rather than
re-pay
. This is that re-verification, and it does not come back clean.

Protocol

Two arms, same host, same session, deterministic bytes — so the comparison is
exact and does not depend on host quiet:

  • base — origin/new-lynx 5d61724, the integration base for the whole
    stack.
  • head — perf/lynx-direct-first-screen-lists 566700e, the tip.

Plus five cut points in between. The inventory arm ran with
OCTANE_INVENTORY_CALIBRATE=1 — the harness's own escape hatch — so the whole
metric set is collected instead of aborting on the first breach. No budget was
edited to obtain any number here.

Findings

1. The #63 trade stays repaid

Nothing in the stack re-incurs it. The compiler-side arm moves preview main gzip
by 0 bytes.

2. Every frozen budget but one is already red on new-lynx

Before a single commit of this stack. They were calibrated on upstream
ffadd397, and new-lynx has moved since.

gate budget base head
preview main gzip 77,286 79,491 ✗ 81,212 ✗
IFR main gzip 82,274 85,106 ✗ 87,016 ✗
preview background raw (must equal) 272,504 277,052 ✗ 278,520 ✗
rows-0 web raw 485,345 489,394 ✗ 493,596 ✗
rows-0 web gzip 132,334 134,200 ✗ 135,495 ✗
rows-0 lynx raw 474,618 479,350 ✗ 483,375 ✗
rows-0 lynx gzip 159,077 161,888 ✗ 163,744 ✗
rows-0 lynx main raw 203,712 208,894 ✗ 213,096 ✗
rows-0 lynx main gzip 57,563 59,494 ✗ 60,783 ✗
rows-0 lynx background raw 277,505 276,387 ✓ 276,387 ✓
rows-0 lynx background gzip 74,381 74,414 ✗ 74,418 ✗

node benchmarks/bench.mjs --ratios lynx-bundle-size fails on the base and on
the head, first at preview main gzip both times. A gate red on its own base
cannot report a regression, so it needs a deliberate recalibration on a chosen
tree. This PR does not do that, because re-freezing from the branch that grew
the number would launder the growth into the baseline. It is a call for the
owner to make, and the table above is what it needs.

3. The stack costs +1,721 B main gzip, and the ladder says exactly where

arm commit preview main gzip Δ base step
base new-lynx 5d61724 79,491 — —
#103 U2b block core af33496 79,491 +0 +0
Phase B end fbccb04 79,794 +303 +303
C1 decline (#110) 5ac4c9b 80,108 +617 +314
C2a binding (#111) 6e52ff8 80,161 +670 +53
C2b adoption (#112) f34bea7 80,682 +1,191 +521
C3 direct lists (#113) 566700e 81,212 +1,721 +530

The specialized background core taxes the main thread nothing — 0 bytes on
preview main, −1 on IFR main — and puts its whole +1,468 B where it runs, on the
background program. A per-root flag shipping a second core did not tax the
thread it does not run on.

Every byte of main-thread growth is first-screen work: +2.17%, against a
1,000-row native-list page that now appears at 29.5 ms instead of 70.4 ms. On the
rows-0 app the split is total — main raw +4,202 B, background raw +0.

C1 reads oddly at +314 B: it added a pre-check walk that C2b then deleted, and
C2b still grew, because what replaced it is the adoption journal for rows that
were never painted.

4. The ≤1.5× target is missed, and was missed before this stack

what is compared base head ratio, head
App.lynx.tsrx preview main gzip 79,491 81,212 1.585×
App.lynx.tsrx IFR main gzip 85,106 87,016 1.699×
rows-0 lynx main gzip 59,494 60,783 1.187×
rows-0 lynx complete artifact gzip 161,888 163,744 3.196×

The verdict depends on which fixture answers the gate, and #58 does not say.
On the lynx-bundle-size fixture — whose budgets are the checked gate — it is
1.585× and missed, from 1.552× on the base. On the rows-0 app it is 1.187× and
met with room. The two disagree because they are different applications.

Closing it needs what #58's L5 bullet actually names — deleting the plan
interpreter, the batch pipeline, and the recursive validator from the main-thread
bundle — and none of the three is deletable yet: the staged batch path is
still the fallback the direct applier hands trees back to, and
validateLynxBackgroundInboundMessage still runs on every inbound message.

One caveat on the denominator, stated in the report: the 51,228 B median is a
carried constant, not a reproducible measurement. Only the three references'
.web.bundle fixtures are vendored; the median was taken over five Lynx-mode
configs and nothing in this repository rebuilds them.

Validation

  • pnpm format:check
  • pnpm sync — no generated changes
  • node benchmarks/bench.mjs --ratios lynx-bundle-size on both arms — the
    measurement itself; it reports a gate failure on both, which is finding 2
  • node benchmarks/lynx-bundle-size/inventory.mjs with
    OCTANE_INVENTORY_CALIBRATE=1 on both arms
  • node benchmarks/lynx-bundle-size/run.mjs on all seven cut points
  • n/a pnpm typecheck, pnpm test — documentation only, no source touched.
    Both were run green on the parent commit for perf(lynx): build native lists through direct first-screen emission #113.

No changeset: documentation and benchmark results only, no user-facing package
change.

Risk / follow-ups

  • The frozen budgets stay red until someone recalibrates them deliberately.
    Recommendation: recalibrate on new-lynx once the stack's disposition is
    decided, so the gate can report regressions again — and re-freeze the +1,721 B
    only if the trade is accepted.
  • The 51,228 B reference median is not reproducible in-repo. If the ≤1.5× target
    is to stay a gate, the five reference configs need rebuilding and vendoring, or
    the target needs restating against something this repository can measure.
  • The report deliberately does not replace production-inventory.md, which
    remains the frozen baseline on upstream ffadd397.

Provenance

  • An agent produced this diff (agent-authored)

Generated by Claude Code

#58's cutover gate wants main-thread gzip "meaningfully toward the ~51 KB
median (propose ≤1.5×)", and #66 §6 records that #95 already repaid #63's
module-level trade — so this milestone re-verifies rather than re-pays. Two
arms, same host, deterministic bytes: `origin/new-lynx` against the tip of the
unmerged stack, plus seven cut points in between.

Four findings, none of them a code change.

The #63 trade stays repaid; nothing in the stack re-incurs it.

Every frozen budget but one is already breached on `new-lynx`, before a commit
of this stack — they were calibrated on upstream `ffadd397`. The suite fails on
the base and on the head, first at `preview main gzip` both times. A gate that
is red on its own base cannot report a regression, so it needs a deliberate
recalibration on a chosen tree; re-freezing from the branch that grew the number
would launder the growth into the baseline, so this does not do it.

The stack costs +1,721 B main gzip (+2.17%), and the ladder says where. The
specialized background core taxes the main thread nothing — 0 bytes on preview
main, −1 on IFR main — and puts its whole +1,468 B on the background program.
Every byte of main-thread growth is first-screen work, against a 1,000-row
native-list page that now appears at 29.5 ms instead of 70.4 ms. On the rows-0
app the split is total: main raw +4,202 B, background raw +0.

The ≤1.5× target is missed on the gated fixture and was missed before this
stack: 1.585× the median, from 1.552×. The rows-0 app's main program is 1.187×
and meets it; the two fixtures are different applications and #58 does not say
which answers the gate. Closing it needs what that bullet names — deleting the
plan interpreter, batch pipeline, and recursive validator from the main bundle —
and none is deletable while the staged path is still the direct applier's
fallback and every inbound message is still revalidated.

Refs #66.
@Huxpro
Huxpro changed the base branch from perf/lynx-direct-first-screen-lists to new-lynx August 21, 2026 20:25
@Huxpro
Huxpro marked this pull request as ready for review August 21, 2026 20:25
@Huxpro
Huxpro merged commit 4d6710b into new-lynx Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants