Repository navigation
Description
Important
Plan revision 2026-08-19: §3 Phase A's A4/A5 cut is superseded by the plan-revision comment — the integration base is now new-lynx, Phase A resumes as Phase 0 (update-path attribution with a decision gate) → Phase 1 (protocol v2 per #61's closure analysis) → Phase 2 (A4/A5 fused ABI cutover) → Phase 3 (in-loop gates). Phases B–E below stand. Read that comment together with this body.
Single-goal execution plan for finishing the #58 roadmap, written as a self-contained handoff for an agent session with no prior context. Read this top to bottom before writing any code. The owner reviews PRs the next morning — everything lands as draft stacked PRs, nothing merges autonomously.
0. Where things stand (verified state, 2026-08-18)
Landed as a 4-PR draft stack (merge order #59 → #63 → #64 → #65; each base is the previous branch):
| PR | branch | what it proved |
|---|---|---|
| #59 (L0) | claude/octane-issue-58-arch-j4ya6v |
GO verdict: direct emission beats the interpreted representation — FCP@10k 0.575× vs the universal path on the architecture-floor prototype; committed session records in benchmarks/lynx-table/prototype/results/ |
| #63 (L1) | claude/octane-issue-58-l1-lynx-target |
target: 'lynx' accepted (renderer config v5); eligible host-only plans emit {kind:'template', slots, create(env, values)}; template and plan encodings render deep-equal first-screen batches (differential suite packages/octane/tests/lynx-target-templates.test.ts); lynxMainThreadRenderer runs on the new target |
| #64 (L2 spike) | claude/octane-issue-58-l2-kernel-spike |
packages/octane/src/universal-kernel.ts: host-neutral hook cells + queue types + pure helpers, zero drift, zero imports (pinned) |
| #65 (L3 slice 1) | claude/octane-issue-58-l3-direct-first-screen |
applyLynxFirstScreenDirect in host-driver.ts: first screen through direct PAPI writes, adoption capture byte-compatible (differential + fault-injection tests in packages/lynx/tests/first-screen-direct.test.ts); in-product FCP@10k −240 ms (0.865×), floor 979 ms |
All five owner review findings on #63/#64/#65 are fixed and their threads resolved (commits c9190afc, 4924e406, 2fe14465). Test state at stack head: lynx 26 files/344, octane+octane-prod 837/12,418+, typecheck clean.
The living spec is docs/lynx-specialized-target-l0.md — §3 IR/protocol, §5 kernel-extraction seam inventory (in extraction order), §8 landed increments and the accepted gzip trade. Roadmap issues: #60 (L1 breadth), #61 (L2), #62 (L3 remainder). Update the spec's §8 as each slice lands.
1. Non-negotiable working discipline
- Every slice is an assumption-validating vertical slice: differential test proving old-path/new-path equivalence, red-green verified (break it, watch it fail, restore), plus a same-window measurement when the slice claims performance. This is what got the stack through review — keep it.
- Follow
CLAUDE.md+.rulesync/rules/core-engineering.md: AST-only emission (builders, copy-on-write; the deep-frozen-AST and emit-audit suites enforce it), behavioral tests only,pnpm sync+pnpm format:filesbefore every push, changesets on the patch track, provenance footers on commits/PRs,agent-authoredconventions. - Stacked PRs continue: new branch per slice, base = previous branch, draft, honest Validation/Risk sections with real numbers. On review events: fix + reply + resolve (drive-to-green). If the stack merges mid-session, restart per the merged-PR rule (
git checkout -B <branch> origin/main). - Measurement honesty (
benchmarks/lynx-table/README.md): quiet host, fresh page per sample, AB/BA alternation, n≥5, same-window ratios only; absolute ms are host-bound and NOT comparable across sessions/hosts. A cell that can't be driven end-to-end is "not measured".
2. Environment gotchas (each cost real time to discover)
- Playwright browsers: the container ships
/opt/pw-browsers/chromium-1194+chromium_headless_shell-1194, but playwright 1.61 wants revision 1228. Fix (do NOTplaywright install):mkdir -p /opt/pw-browsers/chromium_headless_shell-1228/chrome-headless-shell-linux64 ln -sf /opt/pw-browsers/chromium_headless_shell-1194/chrome-linux/headless_shell \ /opt/pw-browsers/chromium_headless_shell-1228/chrome-headless-shell-linux64/chrome-headless-shell touch /opt/pw-browsers/chromium_headless_shell-1228/INSTALLATION_COMPLETE
- Importing
compile.jsinside the vitestlynxproject fails (the octane plugin tries to transform the compiler itself). Compiler-executing tests live atpackages/octane/tests/top level (octane project), or use the child-process pattern inpackages/lynx/tests/first-screen.test.ts. rspeedy-plugintestsnative-demo("escalates cleanup for a detached descendant") andpacked-consumerfail pre-existing in this container (verified on clean tree) — not yours, don't chase them.stages/run.mjswithOCTANE_LYNX_PROFILE=1temporarily patchespackages/lynx/srcsources viastages/instrument-source.mjs(restored in a finally) — don't run it concurrently with edits.- Useful harnesses beyond the CI gates:
benchmarks/lynx-table/prototype/run-fcp.mjs(FCP A/B, supports--extra id=pathcells +--out-suffix),prototype/smoke.mjs(functional parity per op),web/run-web.mjs --cells octane,octane-direct,vue-vdom,vue-vapor,react(cross-framework wall clock),node benchmarks/bench.mjs --only lynx-table --ratios(deterministic wire gates). packages/lynx/src/config.tsandconfig.runtime.jsare hand-kept mirrors — edit both,config.test.tspins parity.
3. Phase A — L2 to complete (#61). The hardest remaining milestone; take it in order.
Superseded 2026-08-19 from A4 onward — A1–A3 landed (#67–#75); the A4/A5 cut below stalled at the boundary for the reasons recorded in the plan-revision comment, which replaces it with Phase 0–3. Kept for the record.
A1. Typed delta protocol module (new packages/lynx/src/core/delta-protocol.ts): opcodes per spec §3.4 — RUN(templateId, anchorSlot, count, values…), SET(instance, slotIndex, value), REMOVE, MOVE(instance, before) (LIS output), BRANCH(slot, templateId|none, values…), range framing for @for/@try. Flat self-delimiting op sequences, header/type validation only (version, opcode bounds, arity). Round-trip + malformed-input tests. Pure addition, zero risk, no dependency on the stack review. Behavioral oracle: the L0 prototype's applier (benchmarks/lynx-table/prototype/lepus-root.js).
A2. Kernel slice 2 — owner abstraction + injected scheduleOwner: per §5 inventory. This is where drift risk starts: per the #64 review note, the guard must render through a universal root and assert observed behavior, not call helpers standalone. Guard set: universal-scheduling, universal-event-scope, universal-retained-suspense, universal-activity, universal-renderer + full octane/octane-prod.
A3. Kernel slices 3–5: transition-batch seam (globals + scheduleTransition/discardTransitionBatch/__scheduleMicrotask as injected root services), then root services used inside hooks (formatUniversalId, warm-memo cache keyed off an opaque token instead of the root, readBridgeContext), owner claiming last. One PR per slice, same guard discipline. If any slice cannot stay green without behavioral drift, stop and record the fresh-core fallback decision in the spec — that is a legitimate exit, not a failure.
A4. Background delta emission: make the Lynx background driver produce protocol deltas natively. Start at the client-driver.ts boundary: map the existing mount-template-run/prop-patch output onto RUN/SET, kill the updates.classify double diff (planLynxHostPropPatch run-and-discard at client-driver.ts:1471-1477) and the full-props-bag update command. Land it dual-path first: a differential harness proving delta-stream application ≡ command-batch application on the same commits (the deterministic workload.ts chassis in benchmarks/lynx-table/run.mjs drives real commits over a fake PAPI — reuse it). Wire gates (update_storm/select/swap in benchmarks/baselines/ratios.json) must hold by construction.
A5. Main-thread delta applier: consume the slots tables #63 already emits — table dispatch into pre-bound PAPI setters, no prop-bag replanning on either side. Measure update10th/select (L0 targets: 82/44 ms floor vs 146/75 current at 10k) and bg_replay reduction in the stages harness.
Exit gate (from #58 L2): current Lynx + relevant universal suites pass on the new path (ported, not weakened); wire floors hold; validateLynxBackgroundOutboundMessage's recursive walk replaced by header checks for delta traffic.
4. Phase B — L3 remainder (#62)
- Lazy/elided command batch when the direct path succeeds (it's still built today; it remains the product for the list fallback and the returned result — make it demand-built and measure).
captureLynxFirstTreefast exit keyed offstate.hasMainThreadProps(it re-plans prop patches per node today).- First-screen create functions binding the template env straight to PAPI (today: env → records → direct applier; collapse to env → PAPI with the adoption metadata table from the feat(lynx): direct-emission first screen with unchanged adoption capture (issue-58 L3) #65 exploration — the "minimal contract" is documented in that PR's discussion and
host-driver.tscomments). - Re-measure FCP@10k same-window vs the preserved pre-change build each slice (
run-fcp.mjs --extra). Current: 1543 ms, floor 979 ms.
5. Phase C — L4 (lists, worklets, platform surface)
Mostly porting; the L0 analysis confirmed worklets/NodesRef/init-data/ContextProxy "were never the problem". Risk concentrates in native lists: recycling callbacks + slot tables, and revisiting the lists-excluded-from-adoption divergence. The direct first-screen path deliberately declines lists today (applyLynxFirstScreenDirect returns false) — extending it is part of this phase. Exit: lynx-list physical-cell ratio holds; full packages/lynx suite green.
6. Phase D — L5 (parity, size, cutover) — partially blocked in this environment
- Full benchmark sweep vs the vendored references; re-record
results/web.mdand stage decompositions. - Bundle re-audit is a hard gate: the gzip trade accepted in feat(compiler): target 'lynx' — create-function template emission for the Lynx main thread (issue-58 L1) #63 (+10–22% module-level) must be repaid by deleting the plan interpreter, batch pipeline, and recursive validator from the main-thread bundle. Target ≤1.5× the ~51 KB reference median (
benchmarks/lynx-bundle-size,inventory-budgets.json). Note (2026-08-19): perf(compiler): name lynx create-function locals by depth (#86) #95 already eliminated the module-level gzip trade via create-function local naming — re-verify rather than re-pay. - Cutover gate per Roadmap: replace the universal-renderer target for Lynx with a Lynx-specialized compiler and renderer #58: create@10k materially improved with PAPI-stage dominance reduced, no wire-floor regressions → flip
lynxRendererRulesdefault and mark the universal Lynx path deprecated. - Native-engine evidence (macOS Explorer first paint, tap delivery, Android/iOS) cannot be produced in this container. Do everything web-side, then explicitly hand the native checklist to the owner rather than claiming the gate. Do not soften this into "done".
7. Phase E — L6 (cleanup + ABI decision)
Remove Lynx-only universal capabilities/compensation layers (template-program-mount and friends) from octane/universal where @octanejs/three doesn't use them; update docs/universal-renderer-architecture.md + docs/lynx-native-renderer-plan.md; file the follow-up on the universal ABI's remaining scope. Answer spec §9's open question 3 (does three want slot tables) as part of the decision.
8. Definition of done for the session
Phases in order; a phase is done only with its differential evidence + measurements + green suites + a pushed draft PR on the stack. If time runs out mid-phase, land the completed slices and update this issue + the spec §8 with exact state, remaining seams, and any NO-GO findings — the owner reviews everything the next morning.
Activity
Huxpro commentedon Aug 18, 2026
Adversarial audit of the L0–L3 equivalence claims
Ran against stack head
2fe14465f(claude/octane-issue-58-l3-direct-first-screen). Goal was to break the equivalence claims the strategy rests on, not to confirm them.Bottom line: 2 of the 4 claims are false. #63's compile-equivalence and #65's applier-equivalence both have executable counterexamples. #64's zero-drift claim and the deterministic wire gates both survived everything thrown at them.
Red tests on
claude/octane-issue-58-adversarial-audit(f70f46aa3,5d000b30e) — failing on purpose, no fixes, no shipping code touched.Claims × lenses × verdicts
propsSlot→ eligibility rejects; integer-like keys unauthorable; slot table verified correct on 20+ templates via a Proxy-recording env@formain-thread:props / worklet registry--no-isolateFiled
@catch, both renders succeed and paint different text ('outer prop exploded'vs'inner prop exploded'); child subtree renders 0× vs 2×. Reachable with plaindata-*on standard intrinsics.compile-universal.js:1817gates onObject.hasOwn(hostProps, name)); a__proto__prop then poisons[[Prototype]]on one path and is laundered on the other.hostCount1 vs 2, 2- vs 4-command batch.applyLynxFirstScreenDirectpaints trees the staged applier refuses (#textunder a non-text host). Direct: 2 instances. Staged: throws. Also documents thatchildren={...}bypasses the compiler's own text-under-<view>rule.useStatereturns a no-op updater; render-phase updates are dropped, forcing a mismatch repair on every launch.<view bind-tap={h}>compiles clean, the handler is silently destroyed, andSymbol(octane.lynx.first-screen-event)leaks into the wire props.#72, #73 and #77 were verified to reproduce identically on base
6079a6804(via agit worktree) and are explicitly not stack regressions — they don't count against #63/#64/#65.What was attacked and held
Reporting these because a summary listing only hits overstates itself.
setEvent/remove/setAttribute/flush/insertBeforeduring teardown give byte-identicalLynxHostCleanupResult(complete,errors,remainingRoots) and identicalcontainer.disposedon both appliers. The retry contract (disposed:false+ populatederrors) works as documented. Flush obligation is exactly one flush on a mid-walk fault on both.--only lynx-table --ratios: 24/299 applicable guards, 0 breached,selectandswapflat from 1k→10k. Plus 12 adversarial sequences the committed gate never measures — including re-tapping the already-selected row (0 commits, 0 commands, floor is zero and it hits zero) and selecting a row the swap physically moved (227 B vs the 225 B baseline, so moved survivors do not republish handle state).propsSlot, eligibility rejects); integer-like key reordering (unauthorable); the emittedslotstable (verified correct against actualcreate()usage on every emitted template).insertBeforeduring the walk and skipssetEventSET/REMOVE pairs on hidden subtrees) but terminal container state is identical. Assessed not a defect —.rulesync/rules/testing.mdlists exact internal call order as a non-contract, and feat(lynx): direct-emission first screen with unchanged adoption capture (issue-58 L3) #65's claim is about container state.Measurement-validity concern (not a bug, but load-bearing for the roadmap)
lynxTemplateEligibleis all-or-nothing over the whole plan. Onerefanywhere in a module flips it fromtemplates=1 planHostNodes=0totemplates=0 planHostNodes=4— the entire module reverts to the interpreted encoding while rendering an identical tree. Same cliff for akey, achildrenprop, a duplicateclass/classNamepair, or any static event-shaped prop.Correctness is unaffected (both encodings render the same 5 hosts). But
<view ref={r}>is among the most ordinary gestures in the framework, and under main-thread render-only arefvalue is already erased to literalundefinedand deleted by the record path — so the lowering only needed to skip emitting for that binding, not abandon the tree.This bears directly on the L1/L3 FCP numbers in §8: any fixture measured without refs overstates template coverage on real components. Worth re-checking what fraction of a realistic app actually lowers before the L5 cutover gate.
Residual list — what was NOT attacked
No silent caps. Explicitly:
main-thread:/worklet-registry, the real adoption round, and degenerate tree shapes unattacked.--no-isolateprobing, effect-event across retained-Suspense discard, linked-state parked drafts, and the kernel mutation-testing lens all never ran. The zero-drift verdict is therefore weakly evidenced — it rests on one lens plus that lens's base comparison, not on the planned matrix.state.hasMainThreadProps(a sticky flag mutated mid-walk and fed per-node intoapplyProps) makes earlier nodes observefalseand later onestrueneeds a container with a real worklet registry. Every fixture with a real main-thread worklet prop died identically on both appliers before the flag mattered.__AddEvent-then-remove is truly net-zero, and whether direct's incremental attach vs staged's batched attach shifts layout/paint timing, is only answerable on a device — the limit §6 already records.octane-prodproject and dev-diagnostics modes were only touched incidentally; the HMR-compile lens never ran.Both workflows were still running when this was posted; anything material that lands later will be added as a follow-up rather than by editing this comment.
Generated by Claude Code
Huxpro commentedon Aug 18, 2026
Session handoff — 2026-08-18 SG1
Completed Phase A through A3 and the first A4 dual-path slice as six draft stacked PRs on #65; nothing was merged or marked ready:
feat/lynx-delta-protocol(base feat(lynx): direct-emission first screen with unchanged adoption capture (issue-58 L3) #65) — A1 versioned flat RUN/SET/REMOVE/MOVE/BRANCH protocol, malformed/opaque-value coverage.refactor/universal-kernel-owner(base feat(lynx): define typed slot-delta protocol (issue-66 A1) #67) — A2 committed/draft owner contracts + injectedscheduleOwner.refactor/universal-kernel-transitions(base refactor(universal): extract hook owner scheduling seam (issue-66 A2) #68) — A3 transition controller (active/in-flight state, pending listeners, promotion, cross-root settlement/re-home).refactor/universal-kernel-root-services(base refactor(universal): extract transition batch controller (issue-66 A3) #69) — A3 injected ID/warm-token/bridge-context services.refactor/universal-kernel-owner-claiming(base refactor(universal): inject hook root services (issue-66 A3) #74) — A3 lazy owner activation + hook-slot composition. Extraction remains GO; fresh-core fallback not selected.feat/lynx-delta-shadow(base refactor(universal): extract lazy owner claiming seam (issue-66 A3) #75) — A4 profiling-only transactional command→typed-delta shadow and real-workload proof.All six are open drafts, mergeable, provenance declared, with no review comments as of handoff.
Red-green / behavior evidence
Same-window measurements
lynx-table, 1k+10k, two iterations: all 166 measured commits expressible, 0 misses, existing command/render/wire/identity/event controls unchanged. 10k projected delta/current bytes: create 349,778/350,619; update10th 36,755/69,874; select 40/225; swap 27/368; update storm 1,133,250/2,789,296; select storm 1,346/6,956. These are projections only; command wire remains authoritative.Environment / validation caveat
A2 broad octane+octane-prod reached 833/837 files and 12,418 passing tests but was not green because Vite fixture watchers hit SG1 inotify
EMFILE(55,190 repeated watcher errors), causing web3/timeouts and one hydration wait. HMR + deferred hydration passed isolated (50 tests); web3 assertions passed (4 tests) but its dev-server watcher still emitted the same environment error. Relevant universal guards are green. The issue-noted rspeedy-plugin pre-existing failures were not chased. No native-engine evidence was claimed.Exact remaining work
client-driver.updates.classifydouble diff. The feat(lynx): prove typed delta shadow over real commits (issue-66 A4) #78 shadow proves the table workload needs no lossy fallback but intentionally declines cold event/lifecycle/public-instance and non-binding prop mutations.bg_replay).Living spec §8 is updated through #78 with exact measurements and extraction verdict.
Agent-authored session update; owner review requested before any readiness/merge action.
Huxpro commentedon Aug 18, 2026
Adversarial audit of the L0–L3 equivalence claims — REVISED, supersedes my earlier comment
The earlier summary is superseded. It is wrong in three ways: it misattributes half of #71, it lists the HMR lens as truncated when that lens later ran, and it predates #79–#82. Read this one. Ran against stack head
2fe14465f.Bottom line unchanged: 2 of the 4 claims are false. #63's compile-equivalence and #65's applier-equivalence both have executable counterexamples. #64's zero-drift claim holds behaviorally but its evidence does not. The wire gates hold.
Red tests on
claude/octane-issue-58-adversarial-audit(f70f46aa3,5d000b30e) — failing on purpose, no fixes, no shipping code modified.Verdicts
Filed — stack-introduced
env.pbefore children;renderPlanNodematerializes children first and validates after. Consequence is worse than first reported: the two encodings commit different@tryarms (@catchvs@pending), painting the framework's internal diagnostic as user-visible text — identical acrossprod/hmr-vite/hmr-webpack/dev/profile. Also masks the app's own error while its subtree never renders (childRenders=0vs1, souse()/useBatchprefetch never registers), and blames a different element in the native-resource diagnostic.[[Prototype]]survivesfreezeTemplateHostProps, thencloneProps→hasCrossRealmPlainPrototyperejects it. On any page with a native<list>(which forces the staged path),target:'lynx'throws the first screen wheretarget:'universal'paints 3 hosts.OCTANE_COMPILE_ASSERT_LOCpasses because origins exist — they are just the wrong ones.applyLynxFirstScreenDirectpaints trees the staged applier refuses. Two independent mechanisms:#textunder a non-text host, and amain-thread:refshared by a visible and a hidden<Activity>host. The base check is decisive — the direct applier does not exist at6079a6804, so the divergence is new.deactivateEffectEventCellsleaves 77/77 green across all five named suites (independently reproduced); inverting the retained-Suspense shared-cell guard atuniversal-core.ts:8200leaves all 299universal-*tests green while breaking everyuseEffectEventhandler mid-transition.Filed — pre-existing, verified on base
6079a6804, NOT counting against this stackbind*/catch*handler inside<Activity mode="hidden">can never adopt its first screen — main emits event commands for every host (main-renderer.ts:1104), background gates onisVisible(universal-core.ts:10277). Every launch: paint, then full rebuild,identityPreserved: false.main-thread.ts:2211bare-truncates the buffered native-event queue with no diagnostic. The user's first taps vanish silently. Compounds with #81: for that whole class of page, the fast first screen is strictly worse than none.useStatereturns a no-op updater; render-phase updates dropped, forcing a mismatch repair every launch.<view bind-tap={h}>compiles clean, the handler is silently destroyed, andSymbol(octane.lynx.first-screen-event)leaks into wire props.props.childrenprototype read atmain-renderer.ts:802, missing thehasOwnPropguarduniversal-core.ts:3695has. From octanejs#660.Corrections made during the audit
Recorded because they bear on how much to trust the rest:
TEMPLATE_ENV.pand feat(compiler): target 'lynx' — create-function template emission for the Lynx main thread (issue-58 L1) #63. A refuter showed the template path matchesuniversal-core.ts:3695's own-property semantics and the plan path is deviant, from bench(lynx): gate the dual-thread commit wire cost against a changed-rows floor octanejs/octane#660. A third refuter then showed the other half (foreign prototype → thrown first screen) genuinely is feat(compiler): target 'lynx' — create-function template emission for the Lynx main thread (issue-58 L1) #63's. Both corrections are on Custom native elements skip attribute validation, and a prop named __proto__ then diverges between the lynx and universal encodings #71..rulesync/rules/testing.mdlists call order as a non-contract.disposeLynxHostContaineras swallowing teardown faults. Wrong — it reports them throughLynxHostCleanupResult.errors; my probe ignored the return value.What was attacked and held
setEvent/remove/setAttribute/flush/insertBeforeduring teardown give byte-identicalLynxHostCleanupResultandcontainer.disposedon both appliers; exactly one flush on a mid-walk fault on both.select/swapflat 1k→10k. Plus 12 adversarial sequences the committed gate never measures — re-tapping the selected row is 0 commits / 0 commands (floor is zero, hits zero), and selecting a swap-moved row costs 227 B vs the 225 B baseline, so moved survivors do not republish handle state.slotstable (verified against actualcreate()usage on all 20+ emitted templates via a Proxy-recording env).Measurement validity — load-bearing for the roadmap
lynxTemplateEligibleis all-or-nothing over the whole plan. Onerefanywhere flips a module fromtemplates=1 planHostNodes=0totemplates=0 planHostNodes=4— the entire module reverts to the interpreted encoding. Same cliff for akey, achildrenprop, a duplicateclass/className, or any static event-shaped prop. Correctness is unaffected; coverage is not. Any §8 FCP fixture measured without refs overstates template coverage on real components. Worth re-checking what fraction of a realistic app actually lowers before the L5 cutover gate.Residual list — what was NOT attacked
No silent caps.
__proto__family got a full 3-refuter panel (3 not-refuted, 1 refuted-on-attribution). Everything else filed rests on my own independent reproduction, stated in each issue.c2-shapes(degenerate tree shapes);c3-order(suite ordering/seeds/--no-isolate);c3-linkedstate(parked drafts, incl. two components sharing a WeakMap-keyed source). Thegap-mutationandgap-workletlenses were still running at posting time.main-thread:refsurface, but the specific sticky-hasMainThreadPropsordering question (do earlier nodes seefalseand later onestrue?) still needs a registry-backed container.__AddEvent-then-remove is net-zero, and whether incremental vs batched attach shifts layout timing, needs a device. The limit §6 already records.target:'lynx'; the feat(compiler): target 'lynx' — create-function template emission for the Lynx main thread (issue-58 L1) #63 bundle/gzip trade; whetherfirstScreenTreeHasListis itself a correct decline predicate.Generated by Claude Code
Huxpro commentedon Aug 18, 2026
Audit addendum — corrections, two new issues, and a triage ranking
Closing note on the revised summary. Not a third rewrite; this records what changed after it and gives the ranking I would actually work from.
Read this first: what fires on ordinary, type-valid code
The panel repeatedly found my consumer-impact claims stronger than my evidence, always at the reachability boundary. Sorting by that gives a very different priority order than issue-number order:
@trycommits a different arm; app errors masked;use()/useBatchprefetch never registers.data-*on standard intrinsics, all 5 compile modesbind*handler inside a hidden<Activity>makes the first screen unadoptable; full rebuild every launchuseLinkedStatekeystroke loss while any async transition is pending; also hits the DOM runtime, and leavesgetValue()disagreeing with the DOMassertNoMainThreadEventCollision; main-thread handler silently dead, behaviour flips depending on whether the page has a<list>tsrx-tsc#81 + #82 + #83 + #84 are where I would start. Note that three of those four are pre-existing, so they do not count against the stack — but #81/#82 negate what L0–L3 is for, and #83 reaches beyond Lynx entirely.
Corrections since the revised summary
Four of my own conclusions moved. Each is recorded on its issue:
installLynxMainThread+ real background adoption) across five configurations and showed the#text-placement divergence never reaches a consumer — adoption throws the identical error or repairs the node away with a published diagnostic. My claim that it "reaches the Element PAPI on every launch" was the one sentence I never executed, and it is false. CLAIM 2 remains falsified, but on mechanisms 2, 3 and 5 — not the one the issue is titled after. Mechanism 2 has since been panel-confirmed (preExisting=false, attacker's strongest avenue "closed against me twice").tsrx-tsc --noEmit— mandated byCLAUDE.md— rejects every triggering name. All 170 declared event props agree between the two matchers; the desync only fires on names outside the declared prop set, andLynxCustomIntrinsicElementsships empty. Hardening, not a live failure.children) is pre-existing, from bench(lynx): gate the dual-thread commit wire cost against a changed-rows floor octanejs/octane#660, and belongs atmain-renderer.ts:802. Defect B (foreign[[Prototype]]→ thrown first screen) is genuinely this stack's. Panel split 4 not-refuted / 2 refuted; the dispute was ownership and severity, never mechanism.disposeLynxHostContainer"swallowed fault" I briefly reported was my probe ignoring the documentedLynxHostCleanupResult.errorschannel. No defect.Also: the committed red test
packages/lynx/tests/first-screen-applier-acceptance.test.tsmay pin a non-contract. The refuter argues "indistinguishable" is scoped to container state, not acceptance sets, which would make it a.rulesync/rules/testing.mdviolation. Left in place because it documents a real mechanical divergence — your call whether acceptance parity is worth pinning.New since the revised summary
universal-core.tsloaded as a second module, 12 scenarios against both simultaneously).assertNoMainThreadEventCollision.visibleat:4418) is itself wrong.Panel totals
11 verdicts: 8 not refuted, 3 refuted. Every refutation changed a filing. Coverage remains partial — most filed findings rest on my own reproduction, stated in each issue.
Still unrun
c2-shapes(degenerate tree shapes) andc3-order(suite ordering/seeds/--no-isolate) never ran. The completeness critic still has not reported, so the residual lists in this thread remain mine rather than its output. Loop-until-dry never converged. No native-engine evidence is producible here. Untouched entirely: the rspeedy dual-graph build, SSR/hydration interaction withtarget:'lynx', the #63 bundle/gzip trade, and whetherfirstScreenTreeHasListis itself a correct decline predicate.Generated by Claude Code
Huxpro commentedon Aug 18, 2026
CLAIM 3 upgrade — the ordering lens ran, and #64's zero-drift claim is now well evidenced
I twice described CLAIM 3's verdict as the thinnest in this audit, resting on 2 of 5 planned lenses. The
c3-orderlens has since run — 58 vitest invocations, logs retained — and that caveat no longer applies. Correcting it here rather than leaving the understatement standing.The guard suites are order-independent, and symmetric with base
universal-*(16 files, 299 tests),--sequence.shuffleseeds 1,2,3,5,7,11 ×octaneandoctane-prod--no-isolate --no-file-parallelism(one shared module registry), 8 seeds dev + 3 seeds prod--pool=forks, plain and shuffled, both projectsCrucially: base
6079a6804is symmetric at 297/297, and the 2-test delta is exactly the newuniversal-kernel-boundarypin. So the extraction lost no test, renamed none away, and made none order-sensitive.That is a much stronger statement than "two reentrancy findings reproduce on base." Combined with the 8-mutant matrix in #80, CLAIM 3's zero-drift claim is the best-evidenced verdict in this audit — while #80's finding stands unchanged: the guard set is blind in three specific places, and that blindness predates the stack.
A methodological correction that matters for future reviewers
--no-isolateat full-project scale is nondeterministic at a fixed commit. It flips between two disjoint failure clusters — DOM transition tests stuck atisPending='pending', versus compiler tests hitting thevi.mockregistry forcompile.js— driven by transform/timer timing rather than source content. Reproduced on both HEAD and base.The lens's own first measurement in that mode (a 21-vs-16 difference) was noise, and it discarded it rather than reporting it. No
--no-isolatedelta should be read as drift evidence in either direction. Worth knowing before A2/A3, since that mode is the obvious thing to reach for when hunting extraction drift.Also, for the A2 guard runs:
--poolOptions.threads.singleThread=trueno longer exists in vitest 4 (CACError: Unknown option --poolOptions);--no-file-parallelismis the working equivalent.Filed separately
#85 — four suites that pass only in default file order, all pre-existing. One has roadmap consequences:
packages/lynx/tests/main-renderer.test.ts:352asserts main/background listener-ID parity, but the background base comes from a module-scoped counter (universal-core.ts:6602) while the main thread is pinned to a constant (main-renderer.ts:1069) — so it holds only when the background capture is the first root in the module. The multi-root case is unguarded, which matters now that #65 has introduced a second applier.Residual list, updated
c3-orderis no longer truncated. Still unrun:c2-shapes(degenerate tree shapes) and the completeness critic, which has still not reported — so the residual lists in this thread remain mine rather than its output.Generated by Claude Code
Huxpro commentedon Aug 18, 2026
Final corrections — #73 withdrawn, CLAIM 2 narrowed, corrected triage table
Two of my filings did not survive the panel. Correcting the addendum's triage table, which now points at a closed issue.
#73 is withdrawn and closed as not-planned
I filed the Lynx main-thread no-op
useStateupdater as a bug. It is the documented, intended, already-test-pinned contract:packages/lynx/tests/main-renderer.test.ts:404—it('uses initial hook values and never publishes effects, refs, or updates')performs a render-phasesetCount(9)and asserts the pre-convergence value. Green. It sits 58 lines below the oracle I cited, in the samedescribeblock. My claim that no test covers this was simply false.packages/lynx/README.md:98-103states the main renderer "does not publish effects, refs, state ownership, or later updates."README.md:153-154).target:'universal', main istarget:'lynx'plus themain-thread-render-onlycapability.CLAUDE.mdwarns that React instincts are this repo's main failure mode. I filed an intentional divergence as a defect, on agent output I noted at the time I had not re-run. That caveat was the tell.CLAIM 2 is narrower than the addendum states
Both mechanisms #76 was titled around are refuted as stack defects:
#textplacement) — adoption throws the same error or repairs the node away; no consumer outcome changes.main-thread:refvisible + hidden) — the direct applier is correct; the staged path was already broken on base. HEAD ≥ base at every observable point, strictly better in the common path.So: CLAIM 2 as literally worded is false (container state does differ), but #84 is the only regression. Mechanisms 2 and 3 are the direct path fixing pre-existing staged bugs. Anyone acting on this should not "make the direct path match the staged path" — that would propagate staged bugs into a correct applier.
Corrected triage — what fires on ordinary, type-valid code
bind*handler in a hidden<Activity>makes the first screen unadoptable, full rebuild every launch, and the buffered first taps are then silently discarded. Together the fast first screen is worse than none. Pre-existing.useLinkedStatekeystroke loss while any async transition is pending; reaches the DOM runtime, and leavesgetValue()disagreeing with the DOM. Pre-existing.assertNoMainThreadEventCollision; main-thread handler silently dead, behaviour flips on whether the page has a<list>. Stack-introduced — the only CLAIM 2 regression.@trycommits a different arm; app errors masked;use()/useBatchprefetch never registers.data-*on standard intrinsics, all 5 compile modes. Stack-introduced.tsrx-tscScore after adversarial review
13 filed, 1 withdrawn, 12 standing. Seven of my conclusions moved under refutation: one filing withdrawn, two #76 mechanisms refuted, #77 downgraded, #71 re-attributed then split, CLAIM 3 upgraded from "thinnest verdict" to best-evidenced.
Final claim verdicts:
The completeness critic never reported, so every residual list in this thread is mine.
c2-shapesnever ran. Untouched: rspeedy dual-graph build, SSR/hydration undertarget:'lynx', the #63 bundle/gzip trade, and whetherfirstScreenTreeHasListis a correct decline predicate.Generated by Claude Code
Huxpro commentedon Aug 18, 2026
The completeness critic reported — residual list, and it corrects the audit twice
Every earlier residual list in this thread was mine, labelled as such because the critic had not run. It has now, with executed evidence for the whole checklist. Its output is better than mine and supersedes it.
New issues from the critic
gzip 10–22%trade in §8 is not bounded —toolbar-4+19%,toolbar-40+120%,toolbar-120+230%. Both fixtures the doc measured happen to sit inside the quoted band. The doc's stated cause is also wrong: it is the emitter's unique per-node locals (naming.next++) breaking LZ77, not "JSON keys compress better than code" — which suggests a cheap fix.target: 'lynx'at runtime. The lynx project's renderers alias to the background config (target:'universal'), soapplyLynxFirstScreenDirecthas never run against a template-encoded plan — while production ships exactly that pair, verified from the real.lynx.bundlestring table. Same structural holeoctane-prodexists to prevent.lynx-tableuses<view>+ keyed@for, no<list>— so a canonical scrolling-list app receives zero L3 win, making L4 load-bearing rather than L3.It corrected the audit twice
refreverts a whole module" framing was wrong. Eligibility is per-plan (universalPlanDeclarationsAstmaps overstate.plansindependently), and the benchmark app is fully template-encoded (Plan0: TEMPLATE env.h=4,Plan2: TEMPLATE env.h=28). The L0 measurement is not invalidated the way I claimed. The real concern is restated correctly as The §8 FCP numbers are measured on the one shape that clears both eligibility cliffs; a <list> page receives zero L3 win #88.firstScreenTreeHasListis sound, which I had flagged as unexamined.list/list-itemare the only list intrinsics and the staged path keys off exactly those; a stray<list-item>also matches, so it declines consistently. No under-approximation — it is simply whole-tree.Surfaces closed, not gaps
target:'lynx'— genuinely unreachable. All four server spellings throw at the renderer-capability gate before any lynx code runs;renderers.js:221structurally forbidsserver:'render'for non-DOM targets, and theomit-childboundary path cannot reach it either.console.warn/error/login all ofpackages/lynx/src/.octane-prodcompiler output — not a gap. Identical template emission acrosshmr:false/true/'vite'/'webpack',dev,profile,strong,autoMemo,inlineHookMemo. The mode-shaped risk is runtime, which is No vitest project ever executes target: 'lynx' output at runtime — the L1 × L3 pair production ships has zero committed coverage #87.main-renderer.ts:971throws).Residuals that remain open
hmr:'webpack'template hot-replacement. That mode produces materially different output (2106 vs 1418 bytes) and is what the rspeedy dev server uses. Nothing exercises hot-replacing a templatecreatefunction mid-session — and a create function is a closure identity in a way a JSON plan is not.@try/@pendingruntime through the template encoding. Compile side verified (arms lower to separate sub-plans); the runtime side was never exercised with a real suspendinguse()through the direct applier. That is precisely target 'lynx' and target 'universal' render different first screens when a prop value throws #70's neighbourhood, andrenderTryhas its own checkpoint/restore ofACTIVE_FIRST_SCREEN_WARM_PLANSandattempt.nextUniversalIdthatTEMPLATE_ENV.sre-enters from a different stack shape.c2-shapeslens, which the critic ran): universal output is O(n²) in nesting depth and throwsMaximum call stack size exceededbetween depth 400 and 700, where lynx is linear and survives —depth=400: universal 1,157,662 bytes vs lynx 34,488. Pre-existing, and L1 strictly improves it. Its relevance here: above that ceiling the two encodings do not both exist, so compile equivalence is not merely broken by target 'lynx' and target 'universal' render different first screens when a prop value throws #70 — it is undefined on part of the input space, and the committed red test cannot be written for those shapes.build.test.tsruns in 9.82 s and asserts module membership, DOM-freeness, and worklets — nothing about the template encoding. An eligibility regression reverting every plan leaves the repo green while production silently loses L1.The critic's risk ranking of my own standing issues
Asked which filings are most likely wrong on the axis the panel kept catching, it ranked #76 highest — its impact section still asserts a tree "reaches the Element PAPI on every launch" when the panel already refuted that scenario, and it now carries two stacked reachability hops. I have posted corrections on #76 but its title and body still read as filed; treat the corrections as authoritative over the body, and see the settling probe named there.
Generated by Claude Code
Huxpro commentedon Aug 18, 2026
Closing note — reachability audit complete, final verified triage
After four findings were withdrawn on reachability grounds, I turned the same attack on my own surviving high-priority claims. All three results are in, plus the
c2-shapeslens. This is the last update.Reachability results
.tsrx,tsrx-tscEXIT=0 with the shipped demo's config, stack-introduced with a provenance discriminator. Worse than filed: the page is destroyed at the background handshake, and adoption never runs to repair it.inputis discrete → urgent path), test-pinned atlinked-state.test.ts:680/:712, and polarity inverted — the "correct" parked path produced cross-record corruption in the end-to-end app.New from the
c2-shapeslens, which I had listed as never-runapplyLynxFirstScreenDirectrecurses per host level; base paints depths 4000/4200 that HEAD refuses withRangeError. The graver half:main-thread.ts:1906falls back to staged only on afalsereturn, so a throw retires the first screen instead of repainting through the path that would have succeeded.<Activity>failstsrx-tscwithTS2604everywhere, including committed fixtures in published packages. Cause:Activityis aunique symboland the LynxJSXnamespace declares noElementType. It survives because every<Activity>use in the repo sits intests/_fixtures/, outside the typecheck gate.Sequencing note: #91 currently masks #81. Fixing the typing gap without also fixing #81 converts a feature that "doesn't typecheck" into one that typechecks and then discards the whole first screen on every launch.
Final verdicts
What I would act on, in order
main-thread:bindtapalone, the shipped swiper shape) needs one probe to settle and may matter more.Calibration
18 filed, 4 withdrawn. Every withdrawal was a real, reproducible mechanism that failed on reachability, declared intent, or inverted polarity — and in two cases my proposed fix would have caused harm (#82 would have routed a user's tap to a handler they never touched). That ratio is the honest calibration on everything above, and it is why the last thing this audit did was attack itself rather than hunt further.
Residuals unchanged from the critic's list:
hmr:'webpack'template hot-replacement,@try/@pendingruntime through the template encoding, the universal-target compile ceiling, no encoding assertion in the rspeedy build test, and no field measurement of the eligibility rate.Generated by Claude Code
Huxpro commentedon Aug 18, 2026
Correction to the headline verdict — CLAIM 1 is falsified far more narrowly than I reported
Late refuters took apart #70, which I had been presenting as the load-bearing CLAIM 1 evidence and ranking first in the triage. Two things I said are wrong, and one is in a committed test, so this supersedes the CLAIM 1 row in every earlier comment on this issue.
My committed red-test fixture is not "pure consumer code"
packages/octane/tests/lynx-target-template-equivalence.test.tsbuilds its throwing values as{ get $$kind() { throw … } }.$$kindis the propertyisLynxNativeResourcereads (packages/lynx/src/resource.ts:22), so the throw fires inside the framework's own validation predicate — the object impersonates the internal resource brand. I described it in the commit message and on #70 as ordinary consumer objects. An app does not define$$kind.No app-authored throw diverges, and the batch is identical for pure programs
Executed controls:
data-bad={props.f()}) → MATCH. Slot values evaluate up-front in identical source order on both encodings.@catchpainting a constant instead oferror.message→batch equal: true, byte-identical including ids.hostCount,logicalCount, and the entire host batch equal.So the divergence requires the app to have already committed two simultaneous violations of the background-only-resource rule at different depths, and it surfaces only because the app renders the framework's diagnostic string. The
childRenderssub-case is measured through an impure render, whichtesting.mdexcludes as an oracle.Both orderings already ship inside
target: 'lynx'Adding an unrelated
refflips a plan to the interpreted encoding, and that build matchesuniversalexactly — documented behaviour since L1. Pinning the ordering would freezelynxTemplateEligibleagainst an obvious future slice.Revised CLAIM 1 verdict
Still literally false — but only just. Two counterexamples survive, both requiring the app to violate a documented rule first:
@tryarm flip (realcreateLynxNativeResource+ a real suspendinguse()): both renders succeed and commit different arms,@catchvs@pending, with differentcreatecommands, identically across all five compile modes. This is a genuine batch divergence on a renderable program.<list>,target: 'lynx'throws the first screen whereuniversalpaints — requiring an app-declared__proto__attribute on a custom element.Everything else I filed under CLAIM 1 collapses to parity.
Corrected triage
#70 moves from first to sixth. Its committed red test should be re-cut against the arm-flip fixture with a real native resource, or dropped.
Running calibration
18 filed, 4 withdrawn, 1 substantially downgraded. The pattern has not varied: a real, reproducible mechanism, and a severity claim that outran what an ordinary program can reach. It caught my top-ranked finding twice — #83 withdrawn, #70 downgraded — which is the strongest argument for weighting #84 and #90 above anything I ranked highly on first pass.
Generated by Claude Code
Huxpro commentedon Aug 19, 2026
Session wrap-up — three slices on top of #78, and a measurement correction that changes how A4/A5 should be sized
Picked up at the stack head
feat/lynx-delta-shadow(#78). A1–A3 and the A4shadow were already landed, so this session continued from there. Nothing was
merged; everything is a draft stacked PR.
Stack now
#59 → #63 → #64 → #65 → #67 → #68 → #69 → #74 → #75 → #78 → #92 → #93 → #94perf/lynx-host-prop-classifyfix/lynx-first-screen-depthfix/lynx-first-screen-event-collisionEvery slice: differential test, red-green verified by applying each break and
watching it fail, same-window measurement, spec §8 updated.
The measurement correction — please read before sizing A4/A5
The
lynx-tablein-process runner's per-stage millisecond fields are not aproduction wire proxy, in either direction.
dispatchMsis the interval aroundcontext.dispatchEvent(transport.ts:336-338), and the harnessContextProxydelivers synchronously — so that interval contains the entire main-thread
receive pipeline plus the harness's own per-message
JSON.stringifybytecounter (
workload.ts:94). At 10k it reads ~750 ms for the update storm and~950 ms for create. Neither is serialization cost.
I nearly used that 750 ms to justify going straight at the delta wire cutover.
README.mdalready draws the right line — wall clock belongs to the browserharness, this runner owns deterministic counts — and the stage fields should not
be quoted as evidence for or against A4/A5.
Related:
updates.classifyis inside none of those stages. It runs duringcommit planning, before dispatch. Measuring it needed a seam A/B over inputs
captured from a real run, which is how #92 got its number.
Why the A4/A5 cutover is still open, and what it actually needs
A4-authoritative and A5 are one unit, not two slices. The full-props-bag
updatecommand cannot leave the wire until the main thread can applySETdeltas, and the main thread cannot apply them until the wire carries them. The
shadow in #78 already proves the encoding is lossless over the real workload
(166/166 commits, 0 misses), so what remains is genuinely the ABI change:
capability negotiation like the existing
templateRuns: 1gate;RUNcarrying its program on first use so both threads agree ontemplateId;valueIndex → (nodeIndex, prop route)— bound to PAPI setters, which is what finally killsthe
cloneProps+planLynxHostPropPatchreplanning athost-driver.ts:4423-4441;validateLynxBackgroundOutboundMessage'srecursive walk with header checks for delta traffic.
I did not start it rather than land it half-done. The honest target for it is
the browser update10th/select numbers (§3 A5: 146/75 ms now, 82/44 ms floor),
which I did not measure this session — the FCP harness is what I got running, and
there is no equivalent update-path browser cell yet. Building that cell is
probably the right first move next session, because right now A5's headline
target has no instrument in this container.
Environment gotchas to add to §2
lynx-tablerunner must callprocess.exit(). The app opens aMessageChannelfor its storm ticks, so a runner that merely finishesrunTablenever exits —run.mjsdocuments this at its tail. Without it theresult is already computed but buffered behind a pipe, and it reads as a build
hang. Cost me ~25 minutes.
NODE_ENV=productionbefore importing thebuilt workload;
run.mjssets it at module top.--out-suffixneeds=for a value starting with a dash:--out-suffix=-l3, not--out-suffix -l3(parseArgsrejects it).scripts/build-app.mjs(~2 s),prototype/build.mjs --rows 10000(needsapp/dist/main.web.bundle, i.e.a plain
build-app.mjsrun first), thenprototype/run-fcp.mjs --extra id=path. It launches full/opt/pw-browsers/chromium, so the §2 note-1headless-shell symlink is not needed for it.
packages/drei/tests/browser/upstream-e2e.browser.test.tsfails fornetwork reasons — it routes
raw.githack.com→raw.githubusercontent.comand the fetch cannot complete. Add it to the pre-existing list.
Full-suite state at #92
pnpm test: 20,961 passed, 5 failed. All five were re-run on the base commitc3baf805aand produced the identical five failures — established, not assumed.Beyond drei and the already-known
native-democase, the other three arerspeedy-plugin-octane/tests/browser/web-host.test.ts,octane/tests/browser/suspense-hydration/…, anddropzone/tests/probes/hydration.test.ts— all browser projects, and the last twotouch the DOM renderer only.
Two findings worth carrying, both from trying to break my own work
RangeErrortovisit.The first frame to blow is
firstScreenTreeHasList, which runs earlier on thesame tree and is cheaper per frame. Fixing only the applier leaves the ceiling
in place; fix(lynx): walk the direct first screen with an explicit stack (#90) #93 shows both halves are separately load-bearing.
event-journal, and physical-tree assertions all compare finished state, so a
top-down attach — publishing empty nodes into the live page and filling them
afterwards — builds the identical tree and passes every one of them. I found
this by deliberately reordering the attach and watching the suite stay green.
fix(lynx): walk the direct first screen with an explicit stack (#90) #93 pins the walk's own properties directly.
On #90's second half, which I did not take
Extending
main-thread.ts:1906so a throw also falls back to staged is not theone-line change the issue suggests. The direct applier mutates as it walks, so a
mid-walk throw leaves partially-painted PAPI state, marks the container faulted,
and invalidates main-thread lifetimes; replaying the staged path onto that
container would paint on top of the partial tree. A real fallback needs the
applier to be transactional. #94's pre-walk is one step toward that (refuse
before mutating) but does not get there — PAPI faults mid-walk remain
unrecoverable. I would rather leave it correct-and-open than ship an unsafe
retry.
Still untouched from the audit's triage
#81 + #91 (in that order — #91 masks #81), #86–#89, #80, #85. §8's stated cause
for the gzip trade is the one #86 says is wrong ("repeated JSON keys compress
better than code" vs the emitter's unique per-node locals breaking LZ77); I left
that line alone rather than rewrite it on #86's word without measuring.
Generated by Claude Code
Huxpro commentedon Aug 19, 2026
Correction to the wrap-up — A5's instrument already exists, and here is the baseline
One claim in my previous comment is wrong, and it is the one that would have cost the next session the most time.
I wrote that A5's headline target "has no instrument in this container" and
suggested building an update-path browser cell first.
web/run-web.mjsalready measures it —
web/run-web.mjs:206-231drivesupdate10th,select,updateStorm, andselectStormalongsidecreate, through the samebyte-identical page driver as the reference cells. I had read §2's one-line
description of it as a create-only cross-framework cell and did not open it.
So I ran it, and A5 has a baseline on this host:
Host: 4× Xeon @ 2.10GHz, 1-minute load 0.29 at start, fresh page per rep.
Two things to note before anyone compares these to §3 A5's "146/75 ms current":
session; absolute milliseconds are host-bound, per
README.md. 175/83 hereand 146/75 there are the same measurement on different machines, not a
regression. What transfers is the shape:
selectat 10k costs about half ofupdate10th, and both are far above the L0 floors (82/44) that the directpath is supposed to reach.
(
reference/{react,vapor-ifr,vdom-ifr-et}/main.web.bundle), so a cutovermeasurement can carry the portable vue-vdom ratios rather than bare
milliseconds. I ran octane-only to keep the window short; a real A5 slice
should run the full cell set.
benchmarks/lynx-table/results/is gitignored, so this run committed nothing andclobbered nothing — the numbers above are the record.
Net effect on the plan: the "build an instrument first" step I proposed is
not needed. An A5 slice can go straight at the main-thread slot dispatch table
and measure
update10th/selectagainst this baseline in the same window.Generated by Claude Code
Huxpro commentedon Aug 19, 2026
Final state — four slices, and #86's gzip trade is gone
Adds #95 to the wrap-up. Stack head is now
perf/lynx-template-local-naming. Nothing merged.… → #78 → #92 → #93 → #94 → #95#95 — the L5 bundle gate no longer has a trade to repay
I went looking to verify #86 before acting on it, and it holds, with the
mechanism it names. §8 recorded the L1 trade as "gzip 10–22% larger because
repeated JSON keys compress better than code". Both halves are wrong:
Raw output is smaller at every width, so nothing about the encoding is verbose
— the penalty is purely a compression effect, and it grows with node count
rather than sitting in a band. The two fixtures §8 measured both happened to sit
at the shallow end, which is why it read as bounded.
The cause is the emitter naming every host local from a per-node counter, so
each repeated subtree differs from the last by its identifier's bytes — exactly
what LZ77 matches on. A host local is live only from its creation until the
env.athat appends it, and that window nests with tree depth, so siblings canshare a name. After naming locals by depth: +4.8% / +1.8% / −2.9%, and raw
improves to −15.0% at 120 nodes.
This matters beyond the number. A trade that scales with template size is not
one the L5 re-audit could have repaid by deleting the interpreter, so §8's
"accepted as an L1 trade, re-audited at L5" was resting on an assumption that
was never true. The doc is corrected in #95 rather than quietly rewritten.
Deterministic, so it is gated rather than merely measured:
lynx-target-template-size.test.tspins the structural property (a 4-button anda 120-button toolbar are both three levels deep, so their create functions must
use the same identifiers) and a ≤1.10× gzip ratio across the ladder. Reverting
to the per-node counter gives 241 distinct locals instead of 4 and a 1.152×
ratio. FCP@10k unchanged (0.988×, overlapping ranges);
lynx-table's own bundleshrinks 273 B / 367 B gzipped, small because it has one shallow row template.
Session totals
Four slices, each with a differential, red-green verified by applying every
break and watching it fail, and a same-window measurement. Every performance
claim in these four PRs is a no-claim or a no-regression except one — the
0.224× classifier seam in #92 and the gzip ladder here are the only two results
whose ranges actually separate. That is the honest yield; the rest of the value
is correctness (#93, #94) and a corrected map of where the remaining cost is.
Full suite at the head: 20,970 passed, 4 failed, all four among the five
container failures established on #92 by re-running them at base
c3baf805a.The fifth (
dropzonehydration probe) passed this time — flaky here rather thanconsistently red.
What is still open, unchanged
A4-authoritative + A5 remain one unit and are untouched; §3's exit gate follows
them. The audit triage still has #81 + #91 (in that order), #87–#89, #80, #85.
#90's throw-side fallback stays open for the reason in #93 — it needs a
transactional direct applier, and #94's pre-walk is only the first step toward
that.
Generated by Claude Code
Huxpro commentedon Aug 19, 2026
Session close — six slices, and #81 is fixed with an end-to-end reproduction
Adds #96 and #97 to the running record. Nothing merged.
… → #78 → #92 → #93 → #94 → #95 → #96 → #97updates.classifydouble diff#97 is the one to look at first
#81 turned out to be exactly as filed, and it is the most consequential thing
found this session. A
bind*handler anywhere inside a hidden<Activity>madethe main and background first-screen batches disagree by one
eventcommand, sothat page's first screen could never be adopted — repaint from scratch on
every launch, native identity discarded, buffered taps dropped. For that class
of page the synchronous first screen was worse than not having one.
The fix is to walk with the inherited-visibility rule the host driver already
applies. Notably
applyLynxFirstScreenDirectwas already using it wheninstalling events — the batch was the half disagreeing with both the applier
and the background.
Reproduced from the public API, not asserted from the inside: the
retained-integration adoption round now carries a handler on its hidden
Activity, and without the gate it reports #81's own diagnostic —
first-screen mismatch at snapshot.nodes[13].events: the event binding count differs— deterministically, 3/3 runs each way.Per the audit's sequencing warning, landing #81 before #91 is the safe order.
#91 is still open and I did not take it: it is orthogonal to this stack
(a
unique symbolwith no JSX call signature), and I verified it reproduces —TS2604onpackages/octane/tests/_fixtures/activity.tsrxand on thebase-uifixture in a published package.#96 corrects #87's suggested remedy
#87 proposes a
lynx-targetvitest project overpackages/lynx/tests/**withthe main-thread renderers. That does not work:
lynxMainThreadRenderercarriesmain-thread-render-only, so recompiling the background suites under it wouldfail them by design rather than find bugs. The uncovered thing is the
composition — a
target: 'lynx'component reachinghost-driver.ts— and atest is the right size for it.
Its scope is stated honestly in the PR, because a differential is easy to
over-read: it catches divergence between cells (skipping native event
installation in the direct applier turns it red) and not a regression that
moves all four cells together (dropping the class patch in the shared
applyPropsdoes not). Measured, not assumed.Two things I got wrong and corrected mid-session
Recording them because the calibration matters more than the tally.
dispatchMsas wire cost and nearly sized A4/A5 against~750 ms that does not exist. It is a synchronous
ContextProxyplus theharness's own
JSON.stringify.—
web/run-web.mjs:206-231— and the baseline is update10th 175 ms,select 83 ms at 10k.
Where Phase A actually stands
A4-authoritative + A5 remain one unit and are untouched: the full-props-bag
updatecannot leave the wire until the main thread appliesSETdeltas, andthe reverse. #78's shadow already proves the encoding is lossless over the real
workload, so what remains is the ABI change and its capability negotiation,
then §3's exit gate. I did not start it rather than land it half-done, and that
judgement has not changed.
Of everything in these six PRs, exactly two results have ranges that separate:
the 0.224× classifier seam (#92) and the gzip ladder (#95). Everything else is a
no-regression or a correctness fix. That is the honest yield.
Generated by Claude Code
5 remaining items
Huxpro commentedon Aug 20, 2026
Phase 3 execution record — the flag it was written to gate does not exist
PR #102 (draft), head
88e9db5f0. Same PR as Phase 2: this is one attributionslice, and splitting it would have produced a PR whose diff is three lines of
counter.
Phase 3's literal subject is void, and that is the first thing to report
The revision specifies Phase 3 as "
web/run-web.mjs… same-window flag on/off;then wire into
benchmarks/baselines/ratios.json". That gates Phase 2'sflagged delta path. Phase 2's decision gate re-aimed away from that path — per
the revision's own instruction that the gate's output outranks the plan — so
there is no flag to toggle and no delta path to measure on and off.
Recording that rather than inventing a subject for it. What Phase 3 can
deliver against the actual Phase 2 outcome is the thing a gate needs: a
deterministic quantity that tracks the segment Phase 2 named.
None of the 24 committed
lynx-tablegates can see the drainThis is structural, not an oversight. Every one of them — commands, bytes, item
renders, handle deltas, commits — is measured downstream of the reconciler,
and every one is already at its floor.
select@10kpasses all of them whilespending 73 ms in the drain. That is precisely why Phases 0 and 2 had to be
measured by hand.
The counter that does see it
reconcileChildrenis the reconciler's per-child entry. The number of childblueprints it visits is fixed for a given app and interaction; counted under the
same replay-window gate as the drain timer, so first-screen reconciliation stays
out of it. Zero spread across five samples in every cell, at both scales.
Two deterministic counts for the same interaction, disagreeing by three orders of
magnitude. Row renders track the change; blueprints track the list, exactly:
selectisrows + 42at both scales,update10thisrows + changed + 41.selectholds its change fixed (1 render, 1 command, 289 B at both scales), sothe entire movement is list size, and its drain follows — 12.4 ms at 1k, 73.2 ms
at 10k.
The semantic floor is the
changed-rows-modelthe wire gates already use:1plus the app's fixed chrome for
select. The standing debt is a factor ofroughly 235 at 10k, and unlike a share of a wall clock it can be asserted.
This is the number the scoped-commit slice has to move.
Stage shares re-confirmed on this run:
bg_prepare48.3% / 34.1% / 9.2%(select / update10th / updateStorm at 10k),
bg_replay_other0.3–1.1 ms.Why it is not in
ratios.jsonyetA real constraint rather than an omission. That gate runs
workload.tsin-process against uninstrumented sources, so it can only read counters that
exist permanently in the shipped packages behind a build flag — the arrangement
packages/lynx/src/core/profiling.tsalready documents for the wire counters.The equivalent counter for the reconciler belongs in
universal-core.ts.I did not land it, and the reason is a judgement worth stating: a permanent core
counter landed ahead of the change it exists to gate would pin today's cost
as though it were the contract. It belongs as the first commit of the
scoped-commit slice, where the gate can be committed green against the improved
number instead of green against the defect.
A hazard the restore test caught
Instrumenting
universal-core.tsfrom two separateupdate()calls made thesecond call record the already-instrumented text as the pristine original, so
restore would have left a framework source patched and poisoned every later
build — the same failure mode as the invalidated
pnpm testearlier in thissession. The two patches are now one transform, and
update()throws if a fileis claimed twice.
Where Phases 0–3 leave the plan
finding.
full-root drain, mechanism located in source.
gate deferred to the slice that changes it, with the reason.
Phases 0–3 are complete and none of them changed runtime behavior. The next
unit is a design deliverable, not an increment: a sub-tree ACK/rollback protocol
that lets a transported root commit a scoped attempt. It is large enough to want
review before implementation, which is why I am stopping the phase sequence here
rather than starting it unreviewed overnight, and it is what makes the v2 delta
protocol's instance-addressed pairs load-bearing after all.
Body Phases B–E are untouched.
Validation state
pnpm typecheckexit 0; stage tests 17/17; both measurement runsreportable: trueon a quiet host.pnpm testis starting now against thefinal diff and its result goes on #102.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Direction resolved — the pending scoped-commit design is superseded by #103
The "sub-tree ACK/rollback protocol" question Phase 2 left for review is resolved at the direction level in #103: the Lynx specialized background core is
runtime.ts's Block model ported to a wire host (per-block eager v2-op emission, no whole-tree version to ACK), with the universal-core scoped-commit retrofit recorded as fallback only. Evidence: the Phase 0–3 attribution here,runtime.ts's no-vdom Block anatomy, and theHuxpro/vue-lynxreference implementation (ShadowElement + eager flat ops + element templates + adoption-by-allocator-determinism).Execution continues on #103 (U0 ceiling measurement → U1 core design doc → U2 first vertical slice). Phases B–E of this issue's body remain valid and queue behind it.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase B execution record — bullets 1 and 2 landed
Draft PR #108 (
perf/lynx-first-screen-batch, basetest/lynx-u0-block-counts), two commits plus the spec §8 entry.§4 bullet 1 — demand-built command batch
The direct applier needed the node tree and the background listeners; it read the batch only for its
eventcommands. SorenderLynxFirstScreennow returns anenvelope(renderer, version, the listener bindings) andapplyLynxFirstScreenDirecttakes that instead.batchbecame a cached lazy property built from the same bindings — the staged path, the native-list fallback, and anything reading the batch as a value are unchanged.At 10,000 fixture rows the direct path was building 160,094 frozen command objects and reading 20,012 of them. It now builds zero. The
eventcommands are re-projected from the envelope's bindings rather than assigned a second time, so the two paths' listener ids cannot drift.packages/lynx/package.jsondoes not export./core/*, so the signature change is package-internal.§4 bullet 2 — capture fast exit
Widened from the single
state.hasMainThreadPropsbullet to the four per-record allocations the capture actually made: the re-planned prop patch (now guarded by the sticky flag, plus the same unscoped-#textshortcutcreatealready takes), the spread-and-sorted empty event table, the copied-and-frozen empty child list, and the per-recordSet/Mapcycle-tracking pair.Measurement
Alternated before/after/before/after over three rounds, 10,000 rows, n=30 per side, each phase timed on a collected heap:
Two findings worth recording because both nearly produced a wrong conclusion:
result.batchat the end of every rep. On the post-change build that materializes the batch and leaves its garbage for the next rep's apply phase — a property of the harness, not the change. Fixed; the timed loop never touchesbatch.Deterministic half, no statistics needed: the batch is unchanged at 160,094 commands, byte-identical in shape (asserted), and the direct path builds none of them.
Red–green
Six deliberate breaks, all red and restored: batch builder minting fresh listener ids (4 tests); visibility gate dropped (2); batch builder mutating the unfrozen bindings (2, incl. the new test); empty-children fast path inverted (7); events never collected (5); main-thread patch guard forced vacuously false (1, via the ref assertion).
One new behavioral test pins what is genuinely new — paints the same first screen whether or not the command batch was materialized.
Honest gaps
missing main-thread event/retains main-thread eventassertions incaptureLynxFirstTreehave no oracle: deleting that loop leaves the suite green. Verified pre-existing — the same deletion on the unmodified capture code is also green. My guard sits in front of them and is covered (forcing it false goes red via the ref assertion), but a scene exercising the two event assertions is owed, in its own change.clear()cannot be red–greened and shouldn't be: both clones are deep-frozen, so cross-record aliasing is unobservable; it bounds memory rather than correcting semantics.Remaining in Phase B
prototype/run-fcp.mjs. Owed. NeedsBENCH_AUTOROWS=10000builds and a quiet host;run-fcp.mjsrefuses a busy one, and this container is currently running the full suite.pnpm testresults for the stack below this PR are posted on #105/#106/#107; nolynxfailures, and every failure A/B'd against the merge-base.Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase B §4 bullet 3 — finding: this one belongs to #103, not here
Bullet 3 asks for "first-screen create functions binding the template env
straight to PAPI (today: env → records → direct applier; collapse to env → PAPI
with the adoption metadata table)". I went to implement it and stopped at the
design, because on the universal first-screen path the collapse either does
not remove work or does not preserve behaviour. Four things, all checkable in
the current source:
1. The container does not exist while the create functions run.
renderFirstScreenNow(main-thread.ts) orders it:renderLynxFirstScreen,then
createLynxHostContainer, thenapplyLynxFirstScreenDirect. A createfunction that emits PAPI needs the container during render, so the container
would have to be constructed before the component tree has run at all.
2. Render is speculative, and today it rolls back for free.
renderTryrenders the body, and on suspension or a thrown error discards the body
entirely and renders
pending/catchinstead — rolling back the speculativeuseIdallocations explicitly (main-renderer.ts,renderTry). Records makethat rollback free: the abandoned subtree is simply not returned. Direct
emission would have to tear down every element the abandoned body had already
created, and get that right under nested
@try.3. The decline must happen before the first PAPI call.
applyLynxFirstScreenDirectreturns false for trees containing a native<list>so the staged path can paint them; refusing after the walk has begunwould leave a half-painted page. List-ness is by host type and is only known
once the whole tree has materialised, dynamic component output included. Emit
as you go and the options are create-then-discard — a real regression for
exactly the pages that take the staged path today — or a static guarantee that
no template and no slot can yield a list, which the plan encoding does not give.
4. Templates are only part of the tree. Only template subtrees go through
create(env, values). Components, ranges,@if/@for/@switch, dynamicslots, and text from
materializebuild records throughrenderPlanNode. Afused env yields a hybrid — PAPI nodes for the template parts, records for the
rest — and the applier has to walk both. That is more machinery, not less.
And the premise is already half-true: the "adoption metadata table" exists.
applyLynxFirstScreenDirectbuildsstate.recordsas it walks. Fusing moveswhen that table is written, not whether it is.
So the version of bullet 3 that actually removes work — one pass producing PAPI
nodes and the adoption table together, with no intermediate record tree — needs
the whole render path to emit directly, with subtree teardown for speculative
renders and a static list guarantee. That is the specialized core in #103, not
an increment on the universal path. Recommend retargeting bullet 3 to #103 and
marking it superseded here.
What I did instead
The part of bullet 3's motivation that was reachable without the
re-architecture: make the intermediate records cheap rather than absent. Two
stacked draft PRs, both measured at 10k rows with GC-isolated phases:
(160,094 commands → 0 built;
batchbecomes a lazily-cached property for thestaged path), plus four per-record allocations removed from first-tree
capture. Direct-path total −21.2% min / −23.1% median.
was dropping every host's props bag into V8 dictionary mode for the rest of
its life;
#textrecords (3 of every 7 hosts in the fixture) get a directconstructor and hosts that bind nothing share one empty event map. Render
phase −42.9% min / −28.5% median; direct-path total a further −7.9% min
/ −6.2% median on top of perf(lynx): take the first screen off the command batch #108.
Combined, the direct first screen at 10k rows goes from ~966 ms to ~877 ms
median across the three timed phases, with the record tree and both consumers
semantically unchanged.
Still owed on Phase B: the sanctioned FCP@10k A/B through
benchmarks/lynx-table/prototype/run-fcp.mjs, which needs a quiet host —run-fcp.mjsrefuses to run when load exceeds half the CPU count.Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase B closed — §4 bullet 4 measured, and what Phase C actually is
§4 bullet 4 — FCP@10k, sanctioned harness
Done. The app built at
781e4fca3(the stack base) and at the Phase B head,driven through
prototype/run-fcp.mjsin one window, cells alternating AB/BA,fresh page per sample. 4× Xeon @ 2.80 GHz, load 0.49 at start, n=30 per
cell. Record committed at
prototype/results/fcp-10000-phase-b.{json,md}.octane-baseline— stack baseoctane— Phase B headoctane-direct— L0 floorPaired (cells alternate inside one window, so each rep is a matched pair):
−158.5 ms mean, sd 175.8, t(29) = −4.94, 95% CI [−224.2, −92.9],
head faster in 22 of 30, median ratio 0.947×. That is ~12.6% of the
distance from the base to the floor.
n=15 said "cannot tell" and I am reporting that too: −113.6 ms with a
261.8 ms paired spread, t = −1.68, head faster in 10 of 15, ranges overlapping
end to end. §1 sets n≥5 as the floor; at this boundary n=15 was still not
enough to separate a 150 ms effect from page-load noise. The n=15 table would
have read as a clean −4% win and would not have been one.
Also worth recording for §1's "not comparable across sessions" rule: the
direct/octane ratio reproduces at 0.590× here against 0.575× in the
record #59 committed on a different host, while absolute ms differ by ~1.7×.
The ratio travels; the milliseconds do not.
Phase B is complete: bullet 1 and 2 in #108, the reachable part of bullet 3
in #109, bullet 3 proper retargeted to #103 per the finding above, bullet 4
here. Stack: #107 → #108 → #109, all draft, none merged.
pnpm testat the stack tip: 2182/2196 files, 20,954 tests passing. Nopackages/lynxorpackages/octanefailure. All 14 failures are timeouts orbrowser/process flakes on a loaded host; of the failing packages exactly one
depends on
@octanejs/lynx(rspeedy-plugin-octane, whosenative-demo§2.3already records as pre-existing here), and its assertion is about killing a
detached process tree.
Phase C — the ordering in §5 is not the order the code allows
§5 names two list items: extending the direct first-screen path to lists, and
"revisiting the lists-excluded-from-adoption divergence". Reading the source,
they are strictly ordered, and the second gates the first:
captureLynxFirstTreerefuses every list tree —state.lists.size !== 0,and
record.type === 'list'. So a native-<list>first screen is alwaysdeclined and torn down, however it was painted. Extending
applyLynxFirstScreenDirectto lists therefore buys nothing on its own:painting faster still ends in the same teardown.
And the reason the divergence is not a small fix is structural.
physicalChildrenreturns[]for alist, so the apply walk never descendsinto cells and every
list-itemrecord keepsnode === null— which is exactlywhat capture throws on (
first-tree host N must own an attached physical node). Cells are materialized on demand bycomponentAtIndexand theiridentity is not stable across recycling. Adopting a list means defining adoption
for a host whose children exist as descriptors rather than nodes, and handing
the recycling contract across the thread boundary. That is a design question,
and §5 leaves "keep the divergence" open as an answer.
So Phase C is C1 → C2 → C3, and I am starting with C1, which the source
itself asks for at
main-thread.ts:1919:It no longer does. #108 put the list pre-walk on the record tree
(
firstScreenTreeHasList, run before the applier touches PAPI), so the samequestion can be asked one step earlier — against
result.nodes, beforecreateLynxHostContainerexists. Today a list page builds the full commandbatch, prepares it, creates every element, fails capture, and disposes all of
it. C1 removes 100% of that.
Two details that decide whether C1 is correct rather than merely faster:
firstScreenTreeHasList. That one is true forlist-itemas well, which is right for its own job but would silently swallowtwo diagnostics the staged path throws —
nested <list> hosts are not supported by the initial recycling contract.and<list-item> N must be placed directly under a <list>.. C1's predicate islist-only andconditional on well-formed topology: a malformed tree falls through to the
existing path so both errors still fire from where they fire today. The
result is a change with no observable difference except that a discarded tree
is never built.
LynxFirstScreenDirectNode.kindis'host' | 'range', and a@forrange is not a record — the staged checkreads
record.parent, i.e. the nearest host ancestor.native-list.lynx.tsrxis
<list>→@forrange →<list-item>, so a pre-walk using the immediateparent would call the fixture malformed and decline nothing.
C2 gets a design comment before any code.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase C opener (C1) — decline an unadoptable first screen before painting it
Draft PR: #110 (
perf/lynx-decline-unadoptable-first-screen, based on #109).C3 is not independent of C2
§5 lists C1 → C2 → C3 and reads C3 (extending direct emission to lists) as an
item that can be taken on its own. It cannot:
captureLynxFirstTreerefusesevery root holding a
<list>, whatever painted it, so extending the directapplier to lists buys nothing until adoption can carry a list. The sequence is
right; the independence is not. C3 is blocked behind C2, and C2 is also the item
that makes C1 unnecessary rather than merely cheap. C1 is still worth taking
first — it is small, and a strict improvement that C2 later subsumes.
What landed
A
<list>page rendered, built a full command batch, took a host container,staged and applied it, planned the native list, was refused by capture, and was
torn all the way back out — for a verdict that never depended on any of it.
firstScreenTreeIsUnadoptableasks the question against the record treeinstead, before the container exists.
I originally framed this as "skip work whose outcome is known", which is the
framing that makes it dangerous: a cheap pre-check that guesses would swallow
the diagnostics the staged path raises. Reframing it as "run the list
validation early and decline only when it passes" removes that risk
structurally — it calls
createLynxListItemDescriptorandplanLynxListUpdatefrom
core/list.tsover the same nodes and treats a throw as "not a decline".Eight of the nine list diagnostics are covered that way (five from the
descriptor, one from the plan, two placement rules the prepare walk owns and
this walk tracks alongside). The ninth is a host with no list PAPI: without
__CreateLista<list>cannot be built at all, and that report is owed to theapplication, so the whole pre-check is gated on
papi.list !== undefined.Measurement
Real
installLynxMainThreadfirst-screen path, 1,000 native rows (4,002 logicalhosts). Arms by stashing the change; 21 samples per pass after 3 warmups, each
in a fresh environment. PAPI traffic counted by wrapping every function-valued
__*global and asserted identical across all 21 samples of a pass. A fixturediffering only in element types is the regression control.
Medians of four before-passes and three after-passes; the list distributions are
disjoint (slowest after 12.0 ms, fastest before 30.8 ms).
Only 18 PAPI calls before, because an unscrolled native list creates no cells —
the platform materializes rows through the recycling callbacks. So the ~33 ms
removed is Octane's own work behind those calls, not host traffic.
The control resolves nothing end to end — its between-arm spread is the size of
its within-arm spread — so the walk was timed directly instead: 0.063 ms
median (p95 0.117 ms) on the list-free tree, 0.06% of that page's first screen.
0.501 ms on the list tree, where it runs the real validators over 1,000
descriptors.
Two things I got wrong, both caught by red/green
The placement break came back green. The stray-
<list-item>fixture had nowell-formed
<list>in it, so the predicate declined to claim that tree whetheror not the guard existed. The fixture now holds a valid list beside the stray
row.
Every fixture nested rows directly under the
<list>, which no.tsrxproduces. I stopped assuming and compiled
tests/_fixtures/native-list.lynx.tsrxwithlynxMainThreadRenderer. The reallowering is not a
hostplan node at all:with the rows in that single child hole as
__octaneUniversalFor(...). Rendered,the record tree is:
Two things the fixtures never covered. A template-created
<list>still recordsas an ordinary
listhost — the property the whole pre-check rests on. And itsrows are one range per row away, not its own children, so a reader stopping
at the immediate children would validate an empty list, decline, and swallow
every row defect while still passing a decline test. Both realistic fixtures
(keyed-loop and template-lowered) therefore carry a decline test and a
duplicate-
item-keytest; making ranges opaque turns both duplicate tests redand leaves both decline tests green.
Same pass made both walks iterative: a range chain is a chain of nested
directives, and per #90 nothing in the first-screen pipeline may cap a depth the
renderer accepted.
Red/green
truefalse<list>guard<list-item>placement guardlist.tsvalidatorspapi.listgateThe first six ran against the 17-test file, before the realistic fixtures
existed;
predicate always falsere-run against the final 21-test file fails 13.A
format:checkfailure the stack was carryingWorth flagging because it affects four branches, not just this one.
pnpm format:checkfails on three committed benchmark result JSONs(
stages/results/live-1000.json,live-10000.json,prototype/results/u0-block-core-counts.json). All three are formatted correctlyon
new-lynx; the unformatted copies arrived with the stack — the first two via888d9034f/88e9db5f0on #102, the third new in781e4fca3on #107.I repaired them forward on this tip rather than at the source, since #102 and
#107 are published and under review and fixing in place would rewrite history
four and two branches deep. Whitespace only, verified by reparsing each file to a
byte-identical JSON value. If you would rather it land on the owning branches,
say so and I will move it.
Related audit item
The audit addendum
lists "whether
firstScreenTreeHasListis itself a correct decline predicate" asuntouched. That is still true and is a different function — the direct applier's
own list check. This slice adds a second decline predicate rather than
validating the first; the new one has seven diagnostic-preservation tests,
firstScreenTreeHasListstill has none.One part of that I did answer while here.
firstScreenTreeHasListreads the samerecord tree, so I checked whether the range problem above reaches it: it does not.
It descends into every node's children regardless of kind and matches any
hostof type
listorlist-itemanywhere, so it is range-agnostic by construction.The difference is what each predicate needs — existence, which survives blind
descent, versus host parentage, which does not, and which is why the new one has
to make ranges transparent deliberately. That closes the range question for
firstScreenTreeHasList; it does not close the audit's broader item, and itstill has no diagnostic-preservation tests of its own.
Validation
pnpm format:check— clean repo-wide, after the repair above.pnpm typecheck— clean.pnpm test— did not complete in this container. The full run was killed ata 60-minute cap. I ran the projects this change can reach explicitly instead:
--project lynx— 32 files, 434 passed.--project octane --project octane-prod— 841 files, 12,436 passed,4 skipped, 0 failed; 2 files errored.
packages/lynx/tests/first-screen.test.tsalone — 21 passed.The 2 errored files are
react-hosted/web3-island.test.ts, once per project,failing
Hook timed out in 10000mswhile building therainbowkithydrationfixture — no assertion fails, the setup hook times out and its 2 tests are
skipped. I first called it a regression and was wrong: I had one base pass
and one head failure, but both sat on the boundary (10.25 s and 10.02 s against
a 10,000 ms cap) and both failures followed heavy load. Three consecutive
standalone runs on this head pass. It is a threshold flake, and nothing in this
diff is reachable from that file — the change is confined to
packages/lynx/src, which theoctaneproject does not import.node benchmarks/bench.mjs --quick --ratios lynx-list— PASS, 0.012x eager(12 physical cells for 1,000 logical items, 988 reuses, 0 after teardown). This
is the exit gate §5 names for Phase C. C1 does not touch the list runtime, so
it is a no-regression check here rather than the phase's evidence.
Per §2.3 the
rspeedy-pluginnative-demoandpacked-consumerfailures remainpre-existing in this container and were not chased.
Next
C2 design comment (teaching adoption to carry lists), then Phases D–E. Nothing
is merged; every PR in the stack remains a draft.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase C — C2 design: teach adoption to carry native lists
§5 names "revisiting the lists-excluded-from-adoption divergence" as where Phase
C's risk concentrates. This is that design. No code yet; C1 (#110) is the only
thing landed.
What the divergence actually costs
It is not "lists cannot be adopted". It is that a page containing a native
<list>gets no synchronous first screen at all.captureLynxFirstTreereturns
nullfor such a root,renderFirstScreenNowretires the paint asskipped, and the page stays empty until the background's first commit landsand paints it from scratch. C1 made that verdict cheap; it did not change it.
So the feature is absent exactly on the page Lynx exists to render. Everything
below is aimed at that, not at shaving the list path.
What a list's first screen actually is
Measured, not assumed — a probe over the staged path with a five-row list, using
the public
getLynxListDiagnosticsandisLynxHostAttached:The
<list>host is the only attached node in the entire subtree. Every rowand every descendant of a row is a live record with
node === null; the platformmaterializes them later through
componentAtIndex. Driving one cell in(
enterListItemAtIndex(0)) flips exactly row 0 to attached and movesphysicalCells/createdCells/enterCountto 1.That is the shape adoption has to carry: a partially materialized tree —
every logical record present, only some owning a physical node.
The four things that block it today
captureLynxFirstTreereturnsnullonstate.lists.size !== 0(
host-driver.ts:3302) and onrecord.type === 'list'. Without those itthrows at the first unmaterialized row (
:3313):first-tree host N must own an attached physical node.state.ownedNodes.size === state.records.size(
:3427) — physical count equals logical count. A partially materialized treebreaks it by construction.
compareFirstTreerefusessourceState.lists.size !== 0 || listUpdates.length !== 0(:3517).transferFirstTreerequiressourceRecord.nodenon-null for every targetrecord (
:3643), and knows nothing aboutstate.lists.The design
The key structural fact:
LynxNativeListState—cellsBySign,attachedByItem,retainedByItem,recyclePools, the three callbacks, thecounters — is main-local and never crosses the wire. Adoption is a
main-thread operation (
prepareLynxHostBatch(target, batch, { firstTree })), andthe background only ever tests
message.firstTree !== undefinedas a flag(
transport.ts:758); it never reads a node. So the list bookkeeping does notneed a serialized representation. It needs to be moved, by reference, from
one container to the other.
That collapses most of the apparent difficulty.
1. A snapshot node may be logical-only.
nativeId: numberbecomesnativeId: number | null.nullstates: this recordexists, the background must agree on its type, props, parent, child order and
visibility, and no physical node was painted for it. Capture permits
nullonlyfor a record inside a
<list>— anywhere else a missing node stays the fault itis today.
Everything else about the node snapshot is unchanged, and a
<list>is anordinary node whose
childrenare its logical rows (snapshot.childrenalreadycomes from
record.children, not fromphysicalChildren, so this needs nochange).
2. Capture emits the list instead of declining.
nativeId: nullwhererecord.nodeisnull, and with a real
nativeIdwhere a cell is currently attached — attachedcells are ordinary owned nodes, so they snapshot exactly as they do today.
ownedNodes.size === (records with a node).LynxFirstTreeState, which already carriesmain-local
eventsByTokenbeside the clone-safe snapshot), one entry perlist: its
itemsand a capture-time epochenterCount + leaveCount + createdCells + reusedCells.3.
compareFirstTreecompares the list instead of refusing it.listin the background's records.listUpdatesmust contain exactly one entry per captured list, matchinghostId, withsameListItems(captured.items, update.next). Anything else →repair. This is what proves the
update-list-infoattribute already on theadopted node is the one the background would have written.
nativeId, native-event and main-thread-refassertions — there is no node to assert about — and keep type, props, parent,
children and visibility.
componentAtIndex/enqueueComponenttraffic between capture and adoption moves it, and the treerepairs rather than adopting a stale picture. One integer instead of a race to
reason about.
4.
transferFirstTreecarries the list state.null node.
LynxNativeListStatefromsourceState.liststotargetState.listsand settargetState.hasNativeListTopology.listPAPI.updateCallbacks.That last point is the one real refactor.
componentAtIndex,enqueueComponentandcomponentAtIndexesare closures created insidecreateNativeListNode(:2403) over the sourcestate,containerandlistState; moving the state does not move what they write to. They needextracting into a
bindNativeListCallbacks(state, container, listState)thatboth
createNativeListNodeand adoption call — a pure extraction, withlist-recycling.test.tsas the guard. TheupdateCallbacksseam itself is notnew:
applyListUpdate(:2576) anddisposeNativeListState(:2078) bothalready retarget a live list's callbacks.
Re-entrancy. A native callback cannot interleave with the transfer:
transferFirstTreemakes no PAPI call, so nothing yields to the platform betweenthe first record moving and the callbacks being reinstalled. That is a real
invariant with a real way to break it — adding any
flush,setAttributeorinsertBeforeto the transfer path would open the window — so it belongs in acomment on the function, not just in this design.
What this deliberately does not do
componentAtIndexsemantics, cell signs, or theupdate-list-infoprotocol. Thelynx-listphysical-cell ratio gate isuntouched by construction: this changes who owns the list state, never how
cells are created or reused.
is a separate cost and only becomes reachable once capture stops declining —
which is what C2 delivers.
applyLynxFirstScreenDirect's ownfirstScreenTreeHasListbail stays in place through C2 and is C3's subject.Protocol impact
assertFirstTreeSnapshot(protocol.ts:1477) is strict:exactKeyson thesnapshot and on every node,
format !== 1fails, andpositiveInteger(nativeId)rejects
null. So C2 bumps the snapshot toformat: 2and relaxesnativeIdtoa nullable positive integer. Nothing else changes on the wire — the per-list
block stays main-local, per the structural fact above.
A
format: 2snapshot reaching an older peer fails validation and the reply isrejected, which lands on "no adoption" rather than on a corrupt tree. That is the
right failure, and it is the same shape as the existing
templateProgramcapability negotiation at
transport.ts:762.Test plan
and through a cold background commit must produce identical final container
state — records, props, events, attachment, and
getLynxListDiagnostics.to
enterListItemAtIndexafterwards and recycles normally. This is theassertion that catches a callback trio still bound to the dead source.
a second list appears only in the background;
componentAtIndexfires betweencapture and adopt (epoch moved). Each must repair, not fault, and must leave a
usable tree.
capture and in transfer.
node benchmarks/bench.mjs --only lynx-table --ratiosand thelynx-listphysical-cell ratio, which is §5's stated exit for this phase, plusthe full
packages/lynxsuite.What to measure, and the honest prediction
The C1-shaped measurement (PAPI calls + first-screen wall clock, arms by
stashing) is the wrong instrument here. Adoption removes work from the
background's first commit, and for a list page that commit creates one list
element and N row records with no elements — so the PAPI delta will be small,
and quoting it would oversell the change.
The number that matters is time-to-first-paint for a list page, which today is
"after background boot" and after C2 is "at main-thread paint". That has to be
measured as first-paint timing on the native-list fixture, with the
before-arm being the current no-first-screen behaviour. I will state it that way
rather than produce a PAPI count that flatters the change.
Risks
it can repair a tree that was actually still fine. That direction is safe and
the case is rare; the reverse would not be.
ownership assertion relaxed in (2) is a real guard — it has caught untracked
nodes — and weakening it to "records with a node" must not weaken it for
non-list trees. It should be expressed as an exact count of the logical-only
records the walk itself emitted, not as an inequality.
verifiable in this container (per §6, native evidence cannot be produced
here). The design does not depend on the answer — attached cells snapshot as
ordinary nodes and the list state moves wholesale either way — but the shape
of a real device's first capture is unverified, so the differential test has to
cover both
physicalCells === 0andphysicalCells > 0, which it does above.list-itemrecords' props are compared, but the descriptors derived fromthem by
createLynxListItemDescriptorare what the platform actually consults.sameListItemson the prepared update is what ties the two together; if thatcheck were dropped the page could adopt a list whose native metadata disagrees
with its records.
Slicing
bindNativeListCallbacks, no behaviour change. Guarded bythe existing recycling suite.
nativeId,format: 2, capture emits logical-only nodesand the journal's list block; capture still declines at the end. Nothing
adopts yet; the snapshot is just richer, and its validator is red/green'd.
compareFirstTreeandtransferFirstTree, with the repair tests.This is the slice that flips the behaviour, and the one that carries the
first-paint measurement.
Order matters: 1 and 2 are independently reviewable and cannot regress anything,
which leaves 3 as the only slice where a review finding is expensive.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
C2 design correction: no protocol change, and C2b/C2c are one slice
Two things in the C2 design are wrong. Both surfaced while starting the implementation, and one of them would have shipped a boot failure.
1. The
format: 2bump is unsafe, and unnecessary.I claimed a
format: 2snapshot reaching an older peer "fails validation and the reply is rejected, which lands on no adoption rather than on a corrupt tree." That is not what happens.validateLynxBackgroundInboundMessageruns unconditionally on the receive side (transport.ts:1332, not dev-gated), and a malformed inbound message goes torejectExpectedMalformed— the ready deferred never resolves and the background root never boots. For an old-background/new-main pair that turns today's "list pages don't adopt" into "list pages don't start".It is also unnecessary. The design's own key fact already rules it out: the background never reads a node, only
message.firstTree !== undefined. So logical-only rows have no reason to be on the wire at all. They belong in the journal —LynxFirstTreeState, main-local, never serialized, which already exists to hold exactly this kind of state beside the clone-safe snapshot.Revised:
snapshot.nodeskeeps its current meaning and its current shape — every node that owns a physical node,nativeIdnon-null,format: 1. The journal gains the logical-only records and the per-list block.compareFirstTreeruns main-side and reads both; itssnapshot.nodes.length !== finalIds.sizecheck becomes a count over snapshot plus journal.assertFirstTreeSnapshotis untouched.No protocol change, no format bump, no skew risk. Strictly better than what I posted.
2. C2b and C2c cannot be separate PRs.
I sliced them as "capture emits the richer snapshot but still declines" then "adoption consumes it". The first is not shippable either way: if capture keeps declining, the new code is unreachable; if it stops declining before adoption can consume the result, a list page paints, hands over a first tree adoption cannot match, and repairs — paint, tear down, repaint, which is worse than today's no-paint. C1 exists precisely to avoid that shape.
The capture change and the adopt change are one atomic behavioural change. With the protocol slice gone, C2 is now two PRs, not three:
bindNativeListCallbacks. Landed, refactor(lynx): bind the native list callbacks through one definition #111.Everything else in the design stands: the epoch check, the wholesale transfer of
LynxNativeListState, the callback rebind throughupdateCallbacks, the relaxed ownership assertion, the test plan, and thelynx-listratio as the phase's exit gate.Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase C — C2 landed: a painted native
<list>is adoptedDraft PR: #112 (
feat/lynx-adopt-native-list, based on #111).Design: comment and its correction, both already posted.
What the design got right, and what it got wrong
Right: the whole thing rests on a measurement rather than an assumption. At
first screen a native list has no cells. A 1,000-row feed paints one node — the
<list>— and every row is a live record withnode === null. So transfer movesone node, and
LynxNativeListState(cells by sign, pools, retained items, thethree callbacks) is main-local and never crosses the wire, which means adoption
can move it by reference rather than serialize it. Only the callbacks are
rebound, because they close over the container adoption empties.
Wrong, and corrected publicly before implementing:
format: 2would have bricked older peers.validateLynxBackgroundInboundMessageruns unconditionally on receive and
assertFirstTreeSnapshotfails aformat !== 1, so a background peer would reject the wholemain-readyreplyand never boot — to describe rows no peer reads. The snapshot keeps
format: 1;rows live in the main-local journal.
paint→repair→repaint regression.
A third error only implementation found:
listUpdates.length !== journal.lists.sizelooked like the obvious agreement check and is wrong, because a rowless list
produces no prepared update at all. Predicted while writing the empty-feed case,
confirmed by watching
adopts a native list that has no rows at allfail, fixedby deleting the count equality.
Measurement — the phase's own obligation, for the slice that flips behavior
Real first-screen path against compiled lowering (template-created shell,
<list>,rows via keyed
@for), background stood in for by a second render dispatched overthe real ContextProxy. Every head sample asserted to have actually adopted.
I expected the compare walk to explain the extra total work. It does not: paint
43.2 ms,
compareFirstTree11.1 ms,transferFirstTree0.8 ms, and the commit'sremaining 59.0 ms is the same
prepareLynxHostBatchrecord walk the declining armalso pays — adoption skips the mutation, not the preparation. Adoption's host
traffic is constant, not per-row (21 vs 12 at both sizes).
Both numbers understate the case: the harness dispatches the background commit
immediately, charging the declining arm 3.6 ms for what is really a bundle load
and a cold render on another thread.
C1 is deleted by this slice
firstScreenTreeIsUnadoptablecannot predict cell materialization, which is nowthe only thing capture declines. Left in place it would decline exactly the pages
that gained a first screen. Its changeset is amended to say so in the same
release; its measurement stands as the record of what build-and-discard cost.
Two checks came back green under red/green, and are declared rather than kept quietly
sameListItemscheckThe items check cannot fail alone: every descriptor field comes from a row's id,
its position, and four props, all compared more strictly by the node walk. It
states the
update-list-infoagreement where adoption relies on it. The contractis still guarded — the differing-rows repair test passes through the props
comparison.
The ownership equality is unreachable from any test, and that is not new: I
disabled it entirely on the parent commit, in its original un-relaxed form, and
all 434 lynx tests still passed. My own design comment set the bar here — "must
not weaken it for non-list trees… expressed as an exact count of the logical-only
records the walk itself emitted, not as an inequality" — and that bar is met by
construction; what is missing is test reachability that the assertion never had.
One thing the measurement opens for C3
The compare walk spends 11.1 ms proving agreement over 4,000 records that own
nothing physical. The load-bearing contract for a list page is narrower: the
painted nodes agree, and the list's items agree. An unpainted row's descendants
materialize later from the background's records, so a difference there has no
physical consequence. Narrowing the walk is the same change that would make the
items check load-bearing — the two green rows above and the 11.1 ms have one
cause. Not taken here.
Validation
pnpm format:checkclean,pnpm typecheckclean.--project lynx— 437 passed (parent 434);first-screen.test.ts24 passed.node benchmarks/bench.mjs --quick --ratios lynx-list— PASS, 0.012x eager(12 physical cells / 1,000 logical, 988 reuses, 0 after teardown). This is §5's
Phase C exit gate.
pnpm testnot run to completion in this container (60-minute cap); reachableprojects run explicitly. §2.3
rspeedy-pluginfailures remain pre-existing andunchased.
Next
C3 (extending direct first-screen emission to lists), which this unblocks — it was
never independent of C2, since capture refused every list tree whatever painted
it. Then Phases D–E. Nothing is merged; every PR in the stack is a draft.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase C — C3 execution record: direct first-screen emission builds native lists
Draft PR #113, on
feat/lynx-adopt-native-list(#112). This closes Phase C.What it does
The direct applier writes the rendered record tree straight to the Element PAPI —
no command batch, no prepared operation list, no cloned record maps — and refused
any tree containing a
<list>. That refusal was correct while such a page couldnot be adopted anyway (painting a page the background will re-render is worse
than not painting it). C2 (#112) made it adoptable, so the refusal became the
remaining cost on exactly the pages a fast first screen exists for.
A
<list>breaks the applier's shape twice: its element comes from__CreateListwith the recycling callbacks passed at creation, not from__CreateElement; and its rows are not attached to it, so the walk records everyrow and row-descendant without creating anything — the same
createoperationsthe staged path skips.
Creation order was the design constraint. The list's element is created on
the way down, so its unique ID lands in the same order the staged path assigns
it; a list whose element were created after its subtree would hand a later
sibling the lower ID, and element identity would depend on which applier painted
the page. Only the row metadata waits for the way back up, because it is read
off records the walk has not created yet.
createNativeListNodesplit intobeginNativeListNode+publishNativeListItemsfor that, and the staged pathcalls the composition unchanged. The differential fixture carries a
<text>sibling after the list precisely to hold this — remove the sibling and the
ordering bug is invisible.
It asks before it paints. Emitting as it walks means it cannot discover a
malformed list partway and back out; that leaves a half-painted page, the one
state the staged path never produces. So a pre-walk runs the real validators
(
createLynxListItemDescriptor,planLynxListUpdate) plus the two placementrules the prepare walk owns, and hands anything it cannot vouch for back with
nothing created. Ranges are transparent in it, for the same reason as in C1's
predicate: an authored list takes its rows through a keyed
@for, so they arenot its own children, and a reader stopping at the immediate children would
validate an empty list and fault at publish.
Two trees still fall back, both deliberately: a host offering no
__CreateList(that page is owed the diagnostic), and a list topology the pre-walk will not
vouch for.
Measurement
Same harness and fixture as C2. 21 samples per pass after 3 warmups, each in a
fresh environment; every sample of both arms asserted to have adopted.
Each cell is a median of 21 samples. The 1,000-row rows take the middle of three
passes (paint: staged 42.5 / 40.9 / 45.7, direct 28.5 / 29.5 / 31.4), so the
distributions are disjoint. The 50-row page ran two passes each, so both are
given rather than averaged.
Element PAPI traffic is identical in both arms at both sizes — 21 calls. What
this removes is Octane's own staging, not one host call.
Phase C, end to end, on the same 1,000-row page
A 2.4× improvement in when a 1,000-row native-list page appears, and each
figure is a lower bound: the harness hands the background's commit over
immediately, where a real page pays a bundle load and a cold render on another
thread first.
C1's predicate itself was removed by C2 — a page holding a list is painted and
adopted now, so a predicate that declined every such tree would decline exactly
the pages that gained a first screen. What it measured stands as the cost of
building a first screen and discarding it.
Red/green (
--project lynx, 440 tests)hasNativeListTopologynever settruefalseThe unguarded line, stated rather than papered over.
state.hasNativeListTopology = truehas no test that fails without it, and isunobservable on a direct-painted container by construction: the only caller of
applyLynxFirstScreenDirectismain-thread.ts:1907, on the first-screen sourcecontainer, and the staged
prepareLynxHostBatch(source, …)only runs when thedirect applier returned
false. A container is therefore never bothdirect-painted and batch-prepared, so the flag's consumers — the compact-run and
lazy-public-instance fast paths — never read it on a container this path built.
It is set anyway, because the flag describes the container's topology rather than
the applier that produced it. No test was added: the only one that could fail
would have to assert an internal
LynxHostStatefield, which.rulesync/rules/testing.mdforbids, and it would protect the current routingrather than the behavior.
Validation
pnpm format:check✅,pnpm typecheck✅,vitest run --project lynx→ 440passed ✅,
bench.mjs --quick --ratios lynx-list→ PASS (allocation ratio 0.012xeager, unchanged) ✅,
pnpm sync→ no generated changes ✅. Fullpnpm testisrunning against this head; the result goes on #113 as a comment either way.
Follow-up the phase surfaced, not taken here
compareFirstTreewalks all 4,002 records on the 1,000-row page to compare 2physical nodes — 11.1 ms in C2's instrumentation. Narrowing that walk to the
records that own something physical is the same change that would make the list
items check load-bearing, and it is the natural next increment.
Next: #66 body Phases D–E.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase D — D1 execution record: the L5 bundle re-audit
Draft PR #114, on #113. Documentation only — no source touched.
§6 calls this a hard gate and records that #95 already repaid #63's module-level
trade, so the instruction was re-verify rather than re-pay. It does not come
back clean, so here is all of it.
Protocol
Two arms, same host, same session, deterministic bytes — exact, and independent
of host quiet:
origin/new-lynx5d61724against the stack tip566700e, plusfive cut points between. The inventory arm used the harness's own
OCTANE_INVENTORY_CALIBRATE=1escape hatch so the full metric set is collectedinstead of aborting on the first breach. No budget was edited to obtain any
number.
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-lynxBefore a single commit of this stack. They were calibrated on upstream
ffadd397.bench.mjs --ratios lynx-bundle-sizefails on the base and the head, first atpreview main gzipboth times. A gate red on its own base cannot report aregression. I did not re-freeze: doing that from the branch that grew the
number would launder the growth into the baseline. It is an owner call, and the
table is what it needs.
3. The stack costs +1,721 B main gzip, and the ladder says exactly where
new-lynx5d61724af33496fbccb045ac4c9b6e52ff8f34bea7566700eTwo things fall out of that shape.
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. That is a real result for #103.
Every byte of main-thread growth is first-screen work: +2.17%, bought against
a 1,000-row native-list page appearing 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 ❌
App.lynx.tsrxpreview main gzipApp.lynx.tsrxIFR main gzipThe verdict depends on which fixture answers the gate, and #58 does not say.
On the
lynx-bundle-sizefixture — whose budgets are the checked gate — 1.585×,missed, from 1.552× on the base. On the rows-0 app, 1.187×, met with room. They
disagree because they are different applications, not because either is wrong.
Closing it needs what #58's L5 bullet names — deleting the plan interpreter, the
batch pipeline, and the recursive validator from the main bundle — and none of
the three is deletable yet: the staged path is still the fallback the direct
applier hands trees back to, and
validateLynxBackgroundInboundMessagestillruns on every inbound message.
One caveat on the denominator: the 51,228 B median is a carried constant, not a
reproducible measurement. Only the three references'
.web.bundlefixtures arevendored; the median was taken over five Lynx-mode configs and nothing here
rebuilds them. If ≤1.5× is to remain a gate, that needs fixing or restating.
Recommendations for the owner
inventory-budgets.jsonandNO_WORKLET_BUDGETdeliberately on achosen tree, once the stack's disposition is decided — otherwise the gate
cannot report the next regression.
2.4× first paint on native-list pages.
target against something this repository can measure.
Next: D2 (full cross-framework web sweep vs the vendored references) is running
now; D3 is the cutover-gate verdict plus the native-evidence handoff.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase D execution record — D1 ✅ D2 ✅ D3 ✅ (verdict: NO-GO)
Phase D is complete. Two draft PRs: #114 (D1, bundle re-audit) and #115 (D2+D3, parity sweep and cutover-gate verdict), stacked on the Phase C tip
566700e.The verdict
#58's L5 cutover asks to flip
lynxRendererRulesand deprecate the universal Lynx path, gated on three clauses. One of three passes.The 1,201 ms figure is not comparable — different host, and taken at the pre-correction background boundary — so the clause was judged against a same-window base arm instead. Control create is 1,825.5 ms on
new-lynxagainst 1,901.8 ms on the stack tip; PAPI-stage dominance is 77.2% → 77.4%. Neither moved.The mismatch is the finding
#58's L5 gate is written about the create path. Phases B–C were executed against the first-screen path. On this app those are different code paths — create is a button-driven background render through the staged batch, the first screen is the direct applier — and the measurement shows work on one did not move the other.
Where B–C were aimed, they landed:
5d61724566700eplan_interpretationThat FCP row also leaves #58's L3 exit gate open: it wanted plan interpretation eliminated, not reduced. At 77.9 ms / 3.2% it is neither gone nor negligible — the direct applier bypasses the interpreter for trees it accepts, and the interpreter still ships and still runs.
The planning consequence: the create clause will not be closed by more first-screen work. PAPI creation plus other host apply is 77% of create and has been at every measurement since
live-report.md. It needs a milestone that owns host materialization.Two things I did not paper over
A small unexplained excess on the mutation cells.
selectStorm@10klooked like a +34% regression in the single-pass sweep. Six alternating AB/BA passes settle it at 0.997 head/base — window noise — but the same six passes leave create at 1.032, update10th at 1.042, and updateStorm at 1.076, consistent in both orderings and corroborated independently by the stage arm's +4.2%. Two same-window protocols agreeing on direction is more than noise and less than a demonstrated regression. Mechanism unidentified; the hypothesis I'd test first is that #109's record-shape change sits on a path shared with the staged update route, so the mutation cells pay for a first-screen optimization they never use. Written down as a hypothesis, in the report, so the next session starts from the number.A defect in this stack's own Phase 1 work, reported on #101: from
2dc0768e4onward the profiling delta shadow misses 100% oflynx-table's commits — 0 commits, 0 ops, 0 bytes in every cell, where v1 measured 0 misses and real byte counts.siteOfrequires a mount's parent to be a host registered by an earliermount-template-run, which is never true at an app root. Everymount-template-runfixture indelta-shadow.test.tspassesparent: null, which short-circuits before the lookup, so the suite passes 5/5 while the facility measures nothing. Profiling-only, no doc or PR body cites those counters, and I left the repair to you rather than re-opening a reviewed design and rebasing ten descendants.Measurement discipline
Both stage arms driven end to end in one window on one host, n=5, fresh page per sample, AB/BA, quiet-host preflight passed on both. The report has an explicit "what is comparable and what is not" section, because the stack changes the harness as well as the runtime: the background stage split and the added cells are not comparable across arms, while the outer wall-clock endpoints and the PAPI/apply timers are verified untouched. Drift is bounded by an invariant rather than asserted — the vendored
vue-vdombundle is byte-identical in both windows and moved 3.4% on create@10k, so deltas under that are reported as unresolved.Full reports:
stack-66-cutover-gate.mdandstack-66-reaudit.md.Moving to Phase E (L6: retiring the Lynx-only universal capabilities, and §9 open question 3).
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Phase E execution record ✅ — and the L6 dependency is wrong in the plan
Phase E is complete as #116 (draft, stacked on #115), with the follow-up filed as #117. That closes Phases B–E; the whole of this issue's body is now executed.
The decision: nothing is removed, and Phase D's NO-GO is not the reason
§7 asks to remove the Lynx-only universal capabilities "where
@octanejs/threedoesn't use them". I inventoried that surface first, and the inventory changes the answer:template-program-mount,class-name-alias,thread-functions,main-thread-render-onlylocal-host-callback,portalvisibilitytemplateMount,collapsedTemplateMount,templateProgramMount,templateProgramRuns,stableStaticHostProps,lazyPublicInstanceslocalHostCallbacks,compilerLeafPropstext,visibilitymount-template-run+ coalescingThe specialized target never replaced the descriptor ABI.
lynxMainThreadRendereristarget: 'lynx', but it lowers only eligible host-only templates into create functions and otherwise keeps the descriptor ABI — its own config comment says so — and the background half of the same path islynxBackgroundRendererattarget: 'universal', the renderer that declarestemplate-program-mount. Both halves of the shipping Lynx path run throughoctane/universal.So the removal is not downstream of the L5 cutover, as #58 and §7 have it. It is downstream of a background core that stops speaking the descriptor ABI at all — #103's Block-over-wire core, behind a per-root flag today. The two are independent: resolving the cutover would not make the deletion safe, and making the block core the default would, whatever the cutover said. Deleting on the stated trigger would have broken the shipping path.
Filed as #117 with the corrected precondition and the deletion checklist, including the point that the removal is the one remaining lever on #58's ≤1.5× gzip target.
§9's carried open question, answered: Three does not want slot tables
Three declares none of the template capabilities and its driver has no
mount-template-runarm. It has no boundary to amortize a collapse across — the driver runs in the host's own realm, and the package's only transport reference is a guard refusing one portal case. And the headroom settles it,node benchmarks/bench.mjs --only three-renderer --ratiosat n=20:mount_1kreconstruct_dispose_1kreorder_1kunmount_tree_1k53% of the biggest creation cell is Three's own object construction — an irreducible host floor. The entire declarative overhead above it is 3.6 ms per 1,000 objects, and slot tables reach only the descriptor share of that, never component and hook execution. Octane already leads r3f on seven of the suite's eight operations. Against a mechanism that costs Lynx +1,721 B main-thread gzip plus a compiler backend and a second driver path, Three should not take it.
One honest note from that run:
three-renderer reconstruct_component_dispose_1kbreached its ratio guard at 1.07× (maxRatio 1). Not from this stack —packages/three,packages/octane/src/universal-core.ts, andbenchmarks/threeare byte-identical betweenorigin/new-lynxand this head — and below the measurement's own resolution here, where the two scores carry 14.7% and 11.9% RME. It needs a quiet-host same-window check before it means anything.Where the whole stack stands
Fourteen draft PRs on
new-lynx, none merged: #100–#102 (Phase 0–1), #104–#109 (#103 block core, Phase B), #110–#113 (Phase C), #114–#116 (Phase D–E). Plus #117 filed, and the delta-shadow defect reported on #101.Three findings I'd want read before the next session picks this up:
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Correction: the mutation-cell hypothesis I posted is wrong
Two comments up I named #109's record-shape change as the hypothesis to test first for the few-percent excess on create, update10th, and updateStorm. I then went and read the stack's source diff, and it disproves that. Retracting it here so it doesn't become the next session's starting point — #115's report and PR body are corrected, and its second commit carries the file-by-file table.
The stack edits nine source files, and none of them is on the mutation path after adoption:
core/block-core.ts,core/block-root.tscore/delta-protocol.ts,core/delta-shadow.tsLYNX_PROFILEmain-renderer.ts,core/first-screen.tsmain-thread.tscore/host-driver.tsapplyLynxFirstScreenDirect,captureLynxFirstTree,compareFirstTree,transferFirstTree, the native-list constructors, or the once-per-rootfirstTreeAction === 'adopt'branch ofprepareLynxHostBatchcompiler/compile-universal.js'c'→'r';slotsis read only bymain-renderer.ts, which validates and copies it and branches on neither valuehost-driver.tswas the one that needed checking rather than assuming — it holds both the first-screen path and the staged one, and it does have a hunk insideprepareLynxHostBatch. That hunk is in thefirstTreeAction === 'adopt'branch, which runs once per root, not per mutation.What remains. A logic regression on the mutation path is ruled out. Two candidates are left, and I claim neither:
The first is directly testable: pad the base bundle with dead bytes to the head's size and re-run the AB/BA sweep. That is the experiment to start from, not #109.
The measurement itself is unchanged — create 1.032, update10th 1.042, updateStorm 1.076 head/base, consistent in both orderings. Only my explanation of it was wrong.
Generated by Claude Code
Merge pull request #115 from Huxpro/docs/lynx-l5-cutover-gate