Repository navigation
Description
Filed by an agent while working #247's bucket-4 slice (#254). Not a request for that PR — it is a standing risk to every campaign that reads from benchmarks/lynx-table/stages/.
What happened
Two instruments in that directory had stopped working, and nothing anywhere went red.
-
stages/mts-profile.mjsrefused every run. It identified the profiled main-thread script by patchingURL.createObjectURLand keeping what the page minted. That list came back holding one blob URL that was not the one the profiled frames ran from, so every invocation died onproduced no main-thread script frames; the profile named none. Fixed in test(bench): split the FCP remainder into phases, and repair the profiler that names its functions #254 by reading the URL from theabout:srcdocrealm's own<script src="blob:…">. -
applier walkread 0.0 ms in that instrument's output while its two functions,visitandpushChildren, sat inunmatchedat 93.5 and 18.0 ms — the two largest unnamed frames in the run. The probe wasphysicalParent, taken from avisitthat destructured its frame at the top; a dense-span fast path added ahead of that destructuring pushed the probe past the 160-character match window. Fixed in test(bench): split the FCP remainder into phases, and repair the profiler that names its functions #254 with one probe per function.
The second one is the more instructive failure: the instrument ran, produced a complete-looking report, and simply attributed 111 ms to nobody. mts-profile-buckets.mjs anticipates exactly this — it reports unmatched rather than folding it away for this reason — but reporting it only helps a reader who is looking.
Why nothing caught it
- No workflow references
test:stagesorbench:stages.grep -rn "test:stages" .github/workflows/returns nothing. pnpm testruns one root Vitest invocation per project invitest.config.jsand does not fan out to packagetestscripts, sobenchmarks/lynx-table's node:test suite is never invoked by it either.- The suite itself is healthy — 186 tests across 18 files, all passing — and it is entirely pure-function tests over fold logic, probe tables and report rendering. Nothing runs an instrument end to end.
So the pure half is well covered and never runs in CI, and the half that talks to a browser is not covered at all.
Suggested shape
Two separate things, and the first is worth doing even alone:
-
Run the existing suite in CI.
cd benchmarks/lynx-table && node --test stages/*.test.mjstakes 3.5 s. It would have caught neither defect above, but it is the cheapest possible guard against the probe tables and report code drifting, and it is currently zero. -
A smoke that actually drives an instrument. The class of defect above is only visible end to end: one profiled sample at a small row count, asserting that the run names a non-zero share of the script and that
unmatchedis below some ceiling. Two of the stage tests already launch Chromium (dom-attach-report.test.mjs,production-ab.test.mjs), so the pattern exists. The cost is a build plus a page load, which is why this is a separate decision from (1) — it may belong in a scheduled job rather than on every PR.
An unmatched ceiling is the specific assertion that turns a silent probe drift into a failure. A ceiling of, say, 20% of the named total would have failed at 41.4%, which is what the drifted table produced.
Not claimed
Whether any earlier record was affected. For the probe drift it was checked and it was not: the pre-drift record stages/results/mts-profile-10000.md (2026-08-25) reads applier walk at 113.7 ms, and the repaired probe reads 111.2 ms on current code, so the drift is newer than that record. The other checked-in records in that directory were not audited.
Activity
Huxpro commentedon Aug 31, 2026
A third rotted instrument, and one thing here that is not rot
Found while adding a teardown cell to
stages/run.mjs(PR #266). Two findings, and they have different causes — worth separating, because the fix for one says nothing about the other.1.
stages/run.mjscannot run at all, and has not been able to for some timeIt dies in its own build preflight before it opens a browser:
Reproduced on pristine
new-lynx(33d9358) with my diff stashed, so it predates the change I was making.The preflight requires the string
firstScreenPrepareMsto survive into the profiled bundle. The only placeinstrument-source.mjsmentions that name is:41, inside the interface widening it injects intopackages/lynx/src/core/profiling.ts— a TypeScript field, which erasure deletes. Nothing assigns it, so the marker can never appear and the preflight is unsatisfiable.It is not one field. Of the sixteen members that widening declares, nine are never assigned anywhere in
packages/orbenchmarks/:firstScreenPlanMsfirstScreenCommandStageMsmtSliceEvalMs,mtSliceStartEpochMs,papiCreateMs,bgReplayMs,mtExpandMsfirstScreenRenderMsfirstScreenContainerMsfirstScreenPrepareMsfirstScreenApplyMsfirstScreenPapiCreateMsfirstScreenCaptureMsfirstScreenCommands,firstScreenHosts,firstScreenLogicalIdsThey were assigned once.
git log -Sputs the hunks in21f4dfb24("perf(lynx): compact first-screen component rows", upstream octanejs#765), which added both the declaration and, in the same file, the timer aroundprepareLynxHostBatchthat wrote it. Today'sinstrument-source.mjsretains the declaration and not the timer.The second-order consequence is the one worth naming.
analyzeFcpSamplereads every one of those fields throughobserved(), which returns0forundefinedrather than throwing. So if the preflight were ever relaxed instead of the instrumentation restored, the FCP stage split would report six of its nine stages as 0 ms, dump the whole cost into the residual, and look entirely well-formed doing it. The preflight is the only thing standing between this harness and a plausible wrong answer, which is a fair description of what this issue is about.Blast radius is bounded:
analyzeFcpSampleis imported only bystages/run.mjsand its own tests.papi-run.mjsandpapi-analyze.mjsdo not use it, so the #247/#254 bucket numbers taken through those are unaffected.instrumentLynxStageSourcesis shared —scripts/build-app.mjscalls it for every profiled build — but only for the type widening, which costs nothing when the timers are absent.I did not restore the six timers. Re-deriving where each one belongs in today's
packages/lynx/srcis real work with a real chance of putting a wrong number into a measurement instrument, and it deserves its own change with its own evidence rather than a side effect of a harness cell.2. Three checked-in records had drifted off the writer — and that one is not rot
evidence.test.mjswas red onnew-lynx: 201 of 202.c230-retention-10000.jsonwas tab-indented, which the repository's own JSON Prettier override rejects too, sopnpm format:checkwas red with it; the twoc252-*records differed fromwriteEvidenceJsonin ways Prettier accepts. Fixed in #266 by rewriting all three through the writer, with content verified unchanged by a SHA-256 of each record's canonical JSON taken before and after in one process.But the cause is different from finding 1, and I do not think it belongs under this issue's thesis. Every one of the three arrived while the CI pool was stopped.
lint_checksrunspnpm format:checkon every PR and would have caught the first one immediately. Nothing rotted unnoticed here — the gate that exists simply never ran.What that says about the fix
This issue asks for CI coverage of
benchmarks/lynx-table/stages/, and finding 1 is the case for it:node --test benchmarks/lynx-table/stages/*.test.mjsis 209 green after #266 and is in no workflow, whilebench.yml— the only workflow that touchesbenchmarks/— runs on manual dispatch and a weekly cron, so a rot there could sit for a week even when the pool is healthy.ci.ymlis where it belongs.Two things a coverage step would still not have caught, worth saying so the fix is not oversold.
stages/run.mjsis a browser harness that no unit test drives, so its preflight would have stayed unsatisfiable regardless; what an oracle overinstrument-source.mjscould assert is that every field the widening declares is assigned by some hunk in the same module, which is a cheap invariant and would have failed the moment those timers were dropped. And finding 2 needed no new coverage at all.I have not wired the CI step in #266.
scripts/ci-workflow.test.mjsreadsci.ymland asserts on it, so the change is locally verifiable, but with the pool stopped I cannot see the step actually run, and a workflow edit whose only evidence is a local structural test seemed worth leaving to a change that owns it rather than smuggling into a harness PR.Generated by Claude Code
Huxpro commentedon Sep 6, 2026
Resolved by #292 and #293.
Evidence:
firstScreenRenderMs,firstScreenPublishMs,firstScreenCaptureMs,firstScreenAnnounceMs, plusfirstScreenPlanMs,firstScreenCommandStageMs, andpapiCreateMs. Obsolete injected-only fields were removed instead of being accepted as zeros.new-lynx@1b44d99apush passed on rerun: https://github.com/Huxpro/octane/actions/runs/34062692657new-lynx@e82160fcpush CI passed at first attempt: https://github.com/Huxpro/octane/actions/runs/34064421108The original two gaps are now both covered: the pure stage suite runs in CI, and end-to-end browser execution detects stale/missing attribution rather than emitting plausible zeroes.