Repository navigation
test(bench): give the FCP window a reference control - #251
Conversation
FCP@N was the one window with no cross-framework control. A pre-populated first screen is a build-time define of the app source, so every vendored reference reported it "not measured" and Octane could only be compared against its own composed `startup + create@N` projection — a projection whose own error was the only bound on how far it sat from a real first screen. Vendor ReactLynx built with a pre-populated first screen, one bundle per row count, as `reference/react-first-screen`. It is a second set rather than a rebuild of `reference/react` for exactly the reason that cell gave for having no variant: rebuilding it would change the hash the featured runs recorded. Vendoring beside it costs 316 KB and costs those runs nothing. The two are different builds — different upstream commits, different `@lynx-js/react` — and that is disclosed rather than hidden. It is also checkable: both cells run the same create window, and their host calls per row is the control that says whether the two workloads still do the same work. They agree at 21.001 each. `reference/manifest.json` gains a `firstScreen` section naming the source and pinning each digest. `papi-run.mjs` reads that section for which scales it can offer, so a scale nobody vendored reports "not measured" rather than failing against a 404, and re-checks each bundle against its pinned digest on first use. This is the one cell whose bytes nothing here builds, so what a run reports is only as good as the bytes it drove. `stages/reference-manifest.test.mjs` makes the record binding: the pinned bundles are present with the pinned bytes, the row keys are unique and ordered, the tree carries nothing unpinned, and the two react artifacts are still distinct. Red-verified by appending a byte and by adding a stray file. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
The report has always split the Octane-minus-reference delta into candidate owners with GO/NO-GO verdicts — for the create and startup windows. The first-screen window had no such section, and could not: the delta needs both cells to have measured FCP, and until `react-first-screen` no reference ever had. Compute it in `papi-run.mjs` beside the other two, and render it in `papi-report.mjs`. Absent rather than zero when either side did not measure the window: a missing delta is a window nobody ran, and nothing downstream should be able to read it as a gap of nought. The `react` cell in the checked-in run is exactly that case, in the same file as a cell that did measure one. The record it renders on, `results/c247-o1-*`, is the first run to carry a reference first screen — octane, react and react-first-screen at 1,000 and 10,000 rows, five repetitions, one interleaved window. Its own verdicts at 10,000: publication op count GO at 271.9 ms of a 476.4 ms timed delta, off-boundary GO at 298.5 ms, and NO-GO for flush cadence, first-paint scheduling, and per-element stream shape — Octane's calls are cheaper per call than the reference's, and it makes 100,081 more of them. Red-verified by removing the guard: the new test goes red, and so do the two beside it, which is the guard doing its job on a delta that has no FCP member. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
`c247-o1-direct` is the same cells, the same scales and the same five repetitions as `c247-o1`, on the same code, in a separate window. It is here because a ratio nobody has repeated has no known resolution. Repeated, it does: the two windows put octane over react-first-screen at FCP@10,000 at 1.411x and 1.452x. That +-0.04 is the floor any first-screen improvement claim has to clear, and repeating the *control* arm rather than only the candidate is what made it visible. The buckets it bounds, read against `c247-o1`: bundle eval plus boot lands at 2.0% and 2.3% of the gap, and the off-boundary delta at 298.5 and 291.4 ms — stable. The host-boundary render delta is 128.1 against 63.2 ms, which is not, because the timed probe's overhead on the reference cell varied 6.8% between windows while its control wall varied 1.2%. That bucket is reportable as row-scaled and second-largest, not as a number. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
#247 asked for Cause A to be measured in this window rather than guessed. This is that measurement, and the finding is parity: after the fold, Octane's first screen issues the same count of every element-creating and tree-shaping call as ReactLynx's — __CreateView, __CreateText, __CreateRawText, __AppendElement, __SetClasses and __AddEvent all identical, zero spread across five repetitions. The whole residual is the adoption read (6 per row against react's one call in total), two extra attribute writes per row, and one extra flush. Total host calls at FCP@10,000 go 310,195 to 290,169; the gap to react goes +100,081 to +80,055. Its wall clock is not claimed. The ratio reads 1.441x here against 1.411x and 1.452x for two windows of unchanged code, so the reading sits inside the same-code spread. Provenance, which the record's own meta does not carry: the octane arm is this branch's cell driven against the head of the static-text fold, the two merged in a local branch that was never pushed. Reproducing it needs both — this branch for the react-first-screen cell, the fold for the octane one. The react arm is this branch's vendored bundle, unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
…tion #247 Order 1's four-bucket split lived only in an issue comment. The instrument is documented in the bench README, but the procedure built on it was not: which buckets a fair boundary can separate, what denominator the shares use, and what resolution the result has. Writes down the part that is load-bearing and easy to get wrong: - buckets 1 and 2 are irreducibly fused, because sliceStartEpoch precedes the browser's load/parse/eval and the only framework-agnostic event in that window is the first host call — a limit of a fair boundary, not a missing probe; - bucket 4 is a named exclusive remainder, so it cannot nominate an owner however large it is, which is the #230 rule applied to this window; - the share denominator is the octane-minus-reference wall, not the sum of the bucket deltas — dividing by the latter forces the shares to 100% and discards the median non-additivity, which is real; - the workload control (create ops/row agreeing across two different react builds) is what licenses any delta between them. And the bound worth carrying forward: two windows of identical code put the octane/react FCP@10k ratio at 1.411x and 1.452x, so a single-window ratio here resolves to +/-0.04. That is wider than most changes move it, which is why the counts are the oracle and the milliseconds only size things. Establishing it needed the control arm repeated, not just the candidate — the step usually skipped. Every figure is recomputed from the checked-in c247-o1 and c247-o1-direct records rather than restated from the report. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
…first-screen-cell # Conflicts: # benchmarks/lynx-table/README.md
…first-screen-cell
…ed for docs/measurement/heap-after-clear.md opens by noting that grepping benchmarks/ for heapMtsAfterClear returns nothing and invites the conclusion that #241's retention oracle is unmeasurable. Nothing in benchmarks/ pointed back at it, so that grep still returned nothing and the recipe fixed only half the problem it named. The bench README now carries the pointer beside the FCP one. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
Base merge onto the live
|
… no rows-0 digest The rows-0 fallback path drove the cell's startup and create windows from unverified bytes whenever reference/manifest.json was unreadable or lost its pin — while the surrounding comments promise the opposite. The cell now refuses, the same way its FCP windows already report 'not measured' rather than substituting. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YHfFsy9CLaRovTFH8pTGyY
#254's base branch bench/lynx-react-first-screen-cell landed in new-lynx as #251, so the PR retargets to new-lynx and takes the base directly. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
… which window it comes from The phase split invites two different shares and #254 reported them by hand. Only one of them is section 3's: framework excess over the FCP gap is a claim about the reference, while framework over Octane's own bucket 4 is a composition statement about one cell that says nothing about it. Quoting the second as the first overstates the finding by about 22 points, so the report now emits both with their denominator named beside them and no reader has to reconstruct either. The gap denominator is the timed FCP walls, the same one attributeDelta divides by and the window the numerator's off-boundary terms come from. Taking it from the control walls instead divides a timed numerator by an uninstrumented denominator, and the mismatch is not small: it moves this share from 61.6%/61.9% across the two same-code windows to 68.0%/85.0%. Both the unit test and the rendered-report test fail on that substitution, and were seen to. fcp-attribution.md gains the two subsections the split was missing: which denominator each share uses and why they are not interchangeable, and the split's own resolution measured the way section 3 measured the ratio's. Section 3's +/-0.04 is the resolution of a single-window FCP ratio and does not transfer here. From the two same-code windows, the gap share replicates to 0.003 and the own-bucket share to 0.027, while frameworkMs spreads 11.2% and 11.5% within a single window -- the derived shares are steadier than the terms they are built from, because a hot window is hot for both cells and the common-mode drift divides out of a ratio taken inside it. It does not divide out of a millisecond. Also records that frameworkMs and residueMs are medians of their own per-sample series, so summing the four phase medians by hand gives a different and wrong answer, and that #254's base branch landed in new-lynx as #251, which this merge takes directly. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
Summary
The FCP window had no cross-framework control. This gives it one, and then gives
the harness's own delta attribution the section it could never render.
A pre-populated first screen is a build-time define of the app source, so every
vendored reference reported FCP@N as "not measured", and Octane's first
screen could only be compared against its own composed
startup + create@Nprojection — a projection whose own error was the only bound on how far it sat
from a real first screen.
This vendors ReactLynx built with a pre-populated first screen, one bundle per
row count, as
reference/react-first-screen, registers it as a cell, and addsthe FCP delta section to the boundary report.
Why
Because the question the window is for could not be asked. Issue #247 Order 1
asks where Octane's first screen spends ~610 ms more than ReactLynx's at 10,000
rows. Every segment of that answer needs a reference measured in the same
window on the same host, and the harness could not produce one — not for lack
of an instrument, but for lack of a bundle.
It is a second vendored set rather than a rebuild of
reference/react, forexactly the reason that cell gave for having no variant: "rebuilding the
reference would change the bundle hash the featured runs recorded." That is
still true, so the existing artifact is left alone. Vendoring beside it costs
316 KB and costs those runs nothing.
Changes
reference/react-first-screen/rows-{0,1000,10000}/main.web.bundle— thevendored set, taken from the campaign entry that already builds and hash-pins
these variants (
Huxpro/lynx-js-framework-benchmark,entries/react), builtupstream from
Huxpro/vue-lynx@28f7acbawithBENCH_AUTOROWSset per variant.reference/manifest.json— a newfirstScreensection: source, upstreamcommit, build command, framework version, and the sha256 of each bundle. Kept
separate from the
cellsblock above it, which all share one upstream committhat this set does not.
stages/papi-run.mjs— thereact-first-screencell.the harness can only offer a scale the manifest pins. A scale nobody vendored
returns
nulland reports "not measured" through the existing path, ratherthan DNF-ing against a 404.
one cell whose bytes nothing in this repository builds — every other cell is
compiled from source on each run, so a wrong bundle is a wrong build and shows
up as a wrong number against a known one. A vendored bundle has no such
backstop.
bundleis the rows-0 variant, so this cell's startup and create windows comefrom the same build family as its FCP window. Nothing is borrowed across
builds.
stages/papi-run.mjs+stages/papi-report.mjs— the FCP delta section.The report has always split the Octane-minus-reference delta into candidate
owners with GO/NO-GO verdicts, for create and startup. The first-screen window
had none and could not: the delta needs both cells to have measured FCP, and no
reference ever had. Computed beside the other two and rendered the same way,
absent rather than zero when either side did not measure the window — a
missing delta is a window nobody ran, and nothing downstream should be able to
read it as a gap of nought.
stages/reference-manifest.test.mjs— new, four tests, making the recordbinding rather than decorative.
Three records under
stages/results/, each with a reason to exist:c247-o1-*— the first run to carry a reference first screen, and the fixturethe FCP-delta test renders.
c247-o1-direct-*— the same code, same cells, separate window. A rationobody has repeated has no known resolution; repeated, this one has ±0.04.
c247-o1-causea-*— the same cells with the octane arm driven against the headof perf(lynx): fold a compile-time-known text child onto its text host #250, which is what Attribute the 1.6× web-startup gap to ReactLynx before deciding whether to chase it #247 asked for. Reproducing it needs both branches,
and the commit message says so, because the record's own
metadoes not carrya source commit.
docs/measurement/fcp-attribution.md— new, the procedure built on top ofthe instrument. The bench README documents the observation contract; what it did
not document is how to use it against a reference, and that part has two traps
in it. Written down rather than left in an issue comment:
sliceStartEpochis the moment thehidden main-thread iframe is handed its Blob script URL — before the browser
loads, parses or evaluates anything — so bundle evaluation and framework boot
both sit inside
start_delay, and the only event in that window observablewithout knowing either framework's internals is the first host call. Any line
between them would have to be drawn from framework-specific knowledge, which is
what stops the two cells being measured the same way.
off_boundaryis a named exclusive remainder — arithmetic, not an observation.That is the The create residual: attribute it, tax-test it, then extend compiled programs to steady-state mounts (E-train) #230 rule applied to this window.
bucket deltas. Dividing by the latter forces the shares to exactly 100% and
silently discards the median non-additivity, which is real.
arm, not just the candidate.
Every figure in it is recomputed from the two checked-in records rather than
restated from the report.
README.md— documents the cell, rewrites the two-windows paragraph (whichsaid the references have no FCP variant; one now does), and points at the recipe.
Validation
pnpm format:check— viapnpm format:fileson all changed files, cleanpnpm typecheck— n/a, no TypeScript changedpnpm test— not run; this touches onlybenchmarks/lynx-tableanddocs/, whichvitest.config.jsdoes not include. The owning suite isnode --test stages/*.test.mjs, run below.pnpm sync— clean, no generated changesBoth new tests red-verified.
node --test stages/reference-manifest.test.mjsis 4/4 green; appending one byteto
rows-0/main.web.bundleturns test 1 red, and adding a stray file underrows-1000/turns test 3 red. Restored, and the digest re-checked against themanifest afterwards.
The FCP-delta test renders the checked-in
c247-o1record and asserts thesection is there for
react-first-screenand not forreact— whichmeasured create but not FCP, in the same file. Removing the
delta.fcp !== undefinedguard turns it red, and turns the two tests beside it red as well,which is the guard doing its job on a delta that has no FCP member.
node --test stages/*.test.mjs— 184 tests, 0 failures (18 files), on thehead after the base merge below. It was 117/117 on this branch before that
merge; the rise is perf: measure the second create and its teardown in the lynx-table gate #235's and perf(lynx): #230 Order 3 — the four-build split #240's stage suites arriving from
new-lynx, notnew tests here.
The cell works, and the workload control passes.
--cells octane,react,react-first-screen --scales 1000 --reps 5:octanereactreact-first-screenThe two react cells issue the same 21.001 host calls per row in the create
window and land within noise of each other on the wall clock, which is the check
that says the two builds still do the same work operation-for-operation. Without
that row agreeing, no delta against the new cell would mean anything, which is
why the README tells a reader to look at it first.
reactkeeps reporting "not measured" for FCP, unchanged and deliberately.What the new section renders, on the checked-in record at 10,000 rows —
included here because it is the first output of a code path that had no output
before, not as a finding:
Risk / follow-ups
only claim made about its contents is the digest. What certifies it as a
comparable workload is the ops-per-row control above, measured every run — not
the provenance note.
@lynx-js/react0.124.0 against 0.122.1). Their create windows agree today; ifthat row ever diverges, the two are no longer measuring the same benchmark and
the divergence, not the delta, is the finding.
out; adding it is a copy plus a manifest entry, and the code needs no change.
metadoes not carry the source commit, which is whyc247-o1-causea-*needed its provenance written into a commit message. That isa gap in the harness worth closing separately; this PR does not close it.
identical code give ±0.04 on the octane÷react FCP@10k ratio. Any claim of a
first-screen improvement smaller than that needs more windows, and this PR is
what makes that bound measurable at all. It is written into the recipe rather
than left here, so the next first-screen claim meets it before it is made.
docs/measurement/heap-after-clear.mdis still unlinked, on perf(lynx): stop describing detaches a clear's own destroy performs #249's branch.It is not linked from here because the file does not exist on this branch and
the link would be broken; adding the pointer on perf(lynx): stop describing detaches a clear's own destroy performs #249 instead would touch this
README on two branches and manufacture a conflict that does not currently
exist. Whichever lands first should give
docs/measurement/an index.there.
landed on
new-lynxafter this branch opened, soorigin/new-lynxis mergedinto the head rather than rebased onto it — no history rewritten, no
force-push. The single conflict was in
benchmarks/lynx-table/README.md: thebase had acquired this PR's own FCP prose (see the note at the top), and this
branch adds the recipe-link paragraph immediately after it. Resolved by keeping
both — the base's text is unchanged and the paragraph sits after it. The
remaining
#245/#248/#249/#250branches were checked against the samebase and all merge clean.
claude/octane-issue-66-phase-a-7wz97z, butcreate-a-prmandates a topicbranch so
label-pr.ymlcan derive the type label. Topic branch used; flaggingrather than silently picking a side.
Provenance
agent-authored)