Repository navigation
Description
Direction decision + execution plan for the #58 L2 body, superseding the "sub-tree ACK/rollback protocol inside universal-core" design question that Phase 2 left pending on #66. Owner-endorsed direction; the measurements below are the evidence base. Everything lands as draft stacked PRs on new-lynx; execution records go on THIS issue.
1. Where the cost is (established, #66 Phases 0–3)
- The A4/A5 wire cutover is NO-GO for update latency:
mt_prepare+ wire is 0.1–4.6% of the update-path wall. (Execution plan (#58): complete L2, then drive L4→L6 — full context handoff #66 Phase 0, PR test(bench): Phase 0 update-path attribution — delta candidate is NO-GO #100.) - The owner is the background full-root drain:
bg_prepare(render + reconcile + batch construction) is 43.3% ofselect@10k(64.2 ms for a 1-row, 289 B change), 36.0% ofupdate10th. Mechanism located in source:prepareOwnedUpdate— the O(change) scoped path — returnsnullunconditionally whenthis.transport !== null(universal-core), because commits are ACKed against a whole-tree version. Every Lynx background update therefore walks the full root. (Execution plan (#58): complete L2, then drive L4→L6 — full context handoff #66 Phase 2, PR test(bench): the update path's owner is the background drain #102.) - The assertable debt:
reconcileChildrenvisits 10,042 blueprints for a 1-row change at 10k (semantic floor ≈ 43) — ~235×, deterministic, zero spread. (Execution plan (#58): complete L2, then drive L4→L6 — full context handoff #66 Phase 3.) - Renders are NOT the cost: auto-memo already keeps row-body renders change-proportional (1 render for
select). The cost is the walk that decides not to render, plus whole-tree batch construction.
2. What Octane actually is on the DOM (evidence, not framing)
packages/octane/src/runtime.ts has no virtual DOM. Block (runtime.ts:586) holds parentNode: Node, startMarker/endMarker (real marker nodes delimiting a live region), deoptNode; keyed lists are doubly-linked Blocks moved by LIS directly in the DOM. A component update re-runs one block's body against live DOM through compiled bindings — no retained tree, no diff. The single vdom-shaped corner is the de-opt path (ElementDescriptor, patchDeoptProps, reconcileDeoptChildren): a region-local descriptor diff for shapes the compiler cannot prove.
So Octane is Vapor/Solid-family in representation (compiled-away, direct mutation, marker-delimited blocks) with React's re-render-driven update granularity instead of signals. The LogicalRecord/blueprint/whole-tree-commit layer exists only in universal-core — it is the universal abstraction's cost, not the model's.
3. The reference implementation: vue-lynx
Read against Huxpro/vue-lynx main (vdom mode) and the vapor branches (e.g. claude/vapor-protocol-renumber-08rsnq):
- ShadowElement (
packages/vue-lynx/runtime/src/shadow-element.ts): a lightweight doubly-linked BTS mirror tree; real elements exist only on MT.nodeOpsmutations emit flat ops eagerly into a buffer, flushed per tick — no whole-tree version, no ACK, no reconcile of a retained graph. - Flat ops protocol (
packages/vue-lynx/internal/src/ops.ts): 16 id-addressed DOM-shaped opcodes with anOP_ARITYtable for walk-without-dispatch — structurally the same family as our delta-protocol v2 (flat self-delimiting frames, header-only validation). - Element templates (
runtime/src/element-template.ts): compile-time-lowered static subtrees —create()of straight-line PAPI calls + hole list, oneINSTANTIATE_TEMPLATEop, hole ids allocated deterministically after the root id so all later updates are ordinarySET_*ops with zero new protocol. This is our L1 create-function + slot-table design, independently arrived at. - Adoption by allocator determinism (vapor
dom-shim.ts): first-screen adoption works by same-code-same-ids (the template host explicitly must not consume a protocol uid so replay allocator state cannot drift) — no snapshot capture, no field comparison. This is the lightweight endpoint that L3 (#58): main-thread slot-table applier + first-screen create-function codegen in @octanejs/lynx #62's design note points toward (identity from compile-time coordinates, per-node snapshots deleted). - Vapor mode (
runtime/src/vapor/) runs@vue/runtime-vaporagainst ShadowElement through a DOM shim: binding-granular effects, updates O(change) by construction.
vue-lynx demonstrates that on Lynx's DOM-shaped Element PAPI, a direct-emission BTS core with eager ops needs none of the whole-tree consistency machinery — while carrying less contract than Octane does (no dual-graph adoption repair, no event-token replay, lighter Suspense/Activity semantics). Those contracts are what our differential-test discipline exists to preserve.
4. The decision
The Lynx specialized background core is runtime.ts's Block model ported to a wire host. Block manages an (instance, slot) region instead of a DOM region; block re-render emits delta-protocol v2 ops (RUN/SET/REMOVE/MOVE/VIS/CLEAR) instead of DOM mutations; markers map to v2 range framing/END anchors; the keyed Block linked list + LIS carries over; hook cells come from the extracted kernel (universal-kernel.ts, #64/#68/#69/#74/#75).
Consequences:
- The consistency protocol narrows. With per-block eager emission there is no whole-tree version to ACK. What must survive: flush atomicity (one block's ops are never split across flushes), the first-screen adoption/event-replay window contract, and fault invalidation (terminal after first mutation — the
applyLynxFirstScreenDirectdiscipline). That is a far smaller design than a generic sub-tree ACK/rollback retrofit. - The universal-core scoped-commit retrofit is the recorded fallback, not the plan. Do not start it; universal-core remains the
@octanejs/threecore and the Lynx fallback during transition. - No signals. Block-granular re-render post-auto-memo is already change-proportional (1 row render for
select); v2 slot tables allow slot-level SET short-circuit after a body re-run. Changing the trigger granularity would change the programming model for a cost the measurements do not locate. - The de-opt corner ports as a region-local ops diff — small, bounded, position reserved in the design.
- v2 protocol becomes load-bearing as the native wire (its Phase 1 rationale), including the A6 residue: the scalar-hole slot kind lands with this core, where its producer lives.
5. Execution plan (in order; each step gates the next)
U0 — Ceiling measurement first (the L0 move, applied to updates). Before building the core, hand-write what it would emit for the lynx-table fixture's mutation ops — a BTS cell that keeps minimal per-block state and emits change-proportional v2 ops for select/update10th/updateStorm/swap/remove — driven through a real MT applier in the same web harness, same-window vs the current path (web/run-web.mjs + the #100 stage decomposition). This is the architecture floor for updates, exactly as benchmarks/lynx-table/prototype/ was for FCP.
Exit gate: reported same-window shares/ratios with the honest-measurement protocol; the reconcileChildren-equivalent count at the semantic floor (select@10k ≈ 43, not 10,042); a GO/NO-GO verdict recorded here. If the floor does not clearly beat the current path after presentation_residual is subtracted, that is a NO-GO on this direction and stops the plan — record it, do not soften it.
U1 — Core design doc (no code). The Block-over-wire structure: owner/scheduling on the kernel seam (#61's interface design), region/anchor model mapped to v2 framing, flush atomicity, first-screen adoption via allocator determinism (the vue-lynx trick, reconciled with #62's R1–R7 and the event-token journal, which must survive verbatim), fault discipline, the de-opt region diff, and the migration/coexistence story (per-root opt-in beside universal-core, differential rig from day one). Post as a comment here for owner review.
U2 — First vertical slice. The fixture-scope subset (host templates + keyed @for + slot SETs) running on the specialized core behind a per-root flag, with the differential harness proving physical-tree + adoption-snapshot + event-journal equivalence against the universal path on the same commits — the first-screen-direct.test.ts pattern extended to updates. Wire gates hold by construction; re-run the U0 harness on the real slice.
U3+ (follow-ups, after the core is stable): native <list> (recycling callbacks × slot tables), worklets on the new core, then the L5 bundle repayment (delete the plan interpreter/batch pipeline/recursive validator from the MT bundle) and the #66 Phase D/E items.
6. Discipline
Everything from #66 §1–§2 applies unchanged: assumption-validating vertical slices, red-green with deliberate breaks, measurement honesty (quiet host, AB/BA, n≥5, same-window shares only, 4-CPU container absolute numbers are not cross-host comparable), stacked draft PRs on new-lynx, changesets, provenance, pnpm sync, spec §8 updates, and execution records on this issue — failures included.
Provenance
- An agent produced this analysis (
agent-authored)
Activity
Huxpro commentedon Aug 20, 2026
U0 — update-path architecture ceiling: measurement and GO
§5's first step, run before any core code. The hand-written direct-emission cell
(
benchmarks/lynx-table/prototype/) stands in for what the specialized corewould emit, driven through the real main-thread applier by the byte-identical
driver both cells share. Session record committed at
benchmarks/lynx-table/prototype/results/web-u0-update-ceiling.{md,json}.n=5, fresh page per sample, cells interleaved AB/BA per repetitionnode prototype/smoke.mjs --rows 1000,8/8 green) — a cell that cannot be driven end-to-end is never a number
Two kinds of claim, kept apart. Counts are deterministic (spread 0, verified
every run) and portable across hosts and sessions. Milliseconds are
host-bound; only the same-window ratio is claimed.
1. The count gate: does the reconcile-equivalent reach the semantic floor?
This is the gate §5 actually wrote — "the
reconcileChildren-equivalent count atthe semantic floor (
select@10k≈ 43, not 10,042)".Gate met, and passed rather than approached.
select@10kgoes from 10,042 to1 — under the floor, because the floor's
+41is the app's fixed chrome anda Block core does not walk chrome it did not change.
update10th@10kgoes from11,041 to 1,000. Spread was 0 in every cell at both scales, as a deterministic
count must be.
Note what the same table says about
create: 20,041 against a floor of 10,041 isa factor of 2, and that factor is the list walk itself, which any core pays once
per created row. The standing debt is an update-path debt specifically — 10.6×
on
update10th, 239× onselect— which is what makes a core that keepsper-block state the right shape of answer.
Two objections, answered before the numbers are read
"The direct cell is told what changed; Octane has to discover it." True, and
that is the finding rather than a confound. A Block core is told too:
ForSlot.itemsis aMap<key, Block>, a state update marks exactly the owningblock dirty, and the block holds its own wire address. The discovery cost the
current path pays is a property of whole-tree commit —
prepareOwnedUpdatereturns
nullwhenevertransport !== null— not of the programming model."The direct cell skips the row-body render." Also true, and already measured:
#66 Phase 3 recorded 1 row-body render for
select@10kagainst those 10,042blueprints. Auto-memo already makes renders change-proportional. So the real
comparison is
1 render + 1 lookupagainst1 render + 10,042 blueprint visits;the render is common-mode and cancels.
The stub's own artifact is reported, not hidden.
rowScanscounts what theprototype actually touched, and its
selectByIdfinds a row by scanning a plainid array. In this fixture that costs 2 (the driver selects row index 1), but
selectStormwalks random ids and reports 84,451 background row scans at 10kagainst 60 keyed block lookups. That 1,400× gap is the stub being worse than the
core it models, and both columns are printed for exactly that reason.
2. The milliseconds: same-window medians,
n=5, AB/BARanges are min–max over the five repetitions. "Separable" means the two ranges do
not overlap at all — the strictest reading available at
n=5, and the only onethis record makes a claim on.
10,000 rows
1,000 rows
Subtracting
presentation_residual§5's gate is "clearly beat the current path after
presentation_residualissubtracted". The direct cell has no stage decomposition, so the subtraction can
only be bounded, and the bound is stated rather than dressed up as a measurement.
The stage record (
stages/results/live-10000.md, same host and container,measured 2h20m before this window at 00:59:53Z against this run's 03:19:58Z)
decomposes the current path only. Its control totals match this window's
octane medians within 3% in every 10k cell — select 142.6 vs 143.2, update10th
280.8 vs 273.4, updateStorm 1088.5 vs 1082.5, create 1848.9 vs 1896.1 — which is
what licenses using its shares here. Its absolute milliseconds are not mixed
with this window's, and the 1k shares are not used at all, because there the two
harnesses' totals differ by more than 30% (staged control 22.5 ms against this
window's 30.5 ms for
select@1k).Assuming the direct cell's residual in milliseconds equals the current path's —
same final tree, same
__FlushElementTree, same composed-tree observation — thefraction of attributable (non-residual) work removed is
(1 − ratio) / (1 − residual_share):3. Verdict: GO
The count gate is met by a factor of 10,042 and it is the gate §5 named.
The millisecond evidence is decisive exactly where it can be: in the two cells
where presentation is a minority of the wall, the floor's range does not overlap
the current path's at all, and it removes 73% of
update10th@10k'sattributable work and 28% of
create@10k's. In the residual-heavy cells it isnot separable at
n=5—updateStormis 78.3% presentation, and 50 flushes overa 10,000-element tree is a cost neither cell can avoid or reduce. That is what a
residual-dominated cell must look like when the non-residual part is removed; it
is not evidence of a loss, and it is equally not evidence of a win.
Three things are recorded against the direction rather than for it:
updateStorm@10khas the floor's median above the current path's (1220 vs1083). The ranges overlap heavily (995–1956 vs 960–1197) and the floor's
spread is 5× the current path's, so the honest reading is "not separable" —
but the median sits on the wrong side, and the prior L0 session on a different
host saw the same shape (539 vs 572). Something about 50 small flushes costs
the hand-written cell more than it costs the current path, and this
measurement does not say what. U2 must re-run this cell on the real slice
before any storm claim is made, and the specialized core's scheduling — how
many commits a 50-tick storm becomes — is now a design item rather than an
assumption.
select@10krecovers less than its count predicts. The count falls by10,042×; the wall falls by 18%, and the attributable estimate is 36% against a
bg_prepareshare of 48.3%. The gap is unexplained by this measurement. Itmay be the direct cell paying a cross-thread cost the decomposition attributes
elsewhere, or the run-web
selectdiffering from the staged one (it runs on apage that already ran
update10th, without a fresh page between ops). Listedas open, not resolved.
selectStormis at parity at both scales. Its background row scans exposethe stub's array lookup; a keyed core touches 60 regions where the stub touches
84,451, and the wall does not move. Whatever
selectStormcosts, it is not thelookup.
Proceeding to U1 (core design) and U2 (first vertical slice), with the storm cell
carried as an open gate rather than a settled one.
4. Corrections to this issue's §1
Two numbers in the issue body are rounded past the point of being right, and they
matter because they are the standing debt this plan exists to repay. Verified
against all five ladder points in the stage record (
create,replace,append,update10th,select), the blueprint law is exactlyrows + changed + 41, where 41 is the app's fixed chrome. So:select@10kis 42, not "≈ 43";The body is left as written; this record is the correction.
Generated by Claude Code
test(bench): interleave the web cells and separate the architecture c…
test(bench): record the #103 U0 update-path ceiling session
Huxpro commentedon Aug 20, 2026
U1 — Block-over-wire: the specialized Lynx background core
Design only. No implementation lands with this comment. Every claim about the
current code cites the file and symbol so a reviewer can check it against source
rather than against this text.
Reference material was read, not copied:
Huxpro/vue-lynx@4e75e3e(
runtime/src/shadow-element.ts,internal/src/ops.ts,runtime/src/element-template.ts,main-thread/src/ifr.ts) and itsclaude/vapor-protocol-renumber-08rsnqbranch. Where this design landssomewhere else than vue-lynx did, the reason is stated.
1. What the specialized core is, in one sentence
runtime.ts's Block — a parent plus a marker-delimited child range, withForSlotholdingMap<key, Block>and a doubly-linked survivor list — is a hostabstraction, not a DOM abstraction. Port it to a host whose "node" is a wire
address
(instance, slot)and whose "insertBefore" is aMOVEframe, and thewhole update path becomes change-proportional without a reconciler pass over the
tree.
1.1 The host mapping
runtime.ts(DOM host)Block.parentNode: Nodeparent: LynxSlotAddress— the range sitestartMarker/endMarker: Node | nullEND_INSTANCE = 0is the anchor sentinelexclusiveMarkersCLEAR) or removes the run with its framing (REMOVE)ForSlot.items: Map<key, Block>Map<key, instanceHandle>head/tail/prevSibling/nextSibling+ LISinsertBefore(node, anchor)MOVE {instance, parent, before}removeChildREMOVE {firstInstance, count}(dense runs)RUN {templateId, parent, before, firstInstance, count, values}SET {instance, slot, value}VIS {instance, state}deoptNode+patchDeoptPropsTwo mappings are load-bearing and deserve their own line.
Markers become framing, not instances.
Block.startMarker/endMarkerareNode | null, andexclusiveMarkersrecords that a block borrowed anenclosing slot's markers rather than minting its own
br//brpair — so today'scost is two real DOM comment nodes per block that mints, and none for a block
that borrows. On the wire nothing needs to be materialized at all: the parent
address plus
beforenames the site, andEND_INSTANCE = 0distinguishes"append into the site" from "insert before this instance". The mint/borrow
distinction survives as a teardown distinction only — clear the range's contents,
or remove the run including its framing — which is why the mapping row above
sends
exclusiveMarkerstoCLEARvs.REMOVErather than to an instance.ForSlotkeeps the key map on the background side and never ships it.Map<key, Block>is background state. What crosses the wire is only the LISoutcome — a list of
MOVEframes — so the wire cost is the number of physicallymoved instances, which is exactly the guarantee
docs/differences-from-react.mdalready makes ("final DOM and survivor identity are guaranteed; the set of
physically moved nodes is not").
1.2 What this deletes
The current Lynx path reaches Octane through
octane/universal/native→universal-native.ts→universal-core.ts, whose commit model is a whole-treeone:
UniversalRoot.prepare()reconciles blueprints for the entire logical treeand hands the host a batch.
prepareOwnedUpdate(universal-core.ts:8089) —universal-core's scoped O(change) path — returns
nullwheneverthis.transport !== null, so it is disabled on exactly the configuration Lynxuses. Its own comment says why: "their commits are acknowledged (or
invalidated) against a whole-tree version, so a scoped batch would need its own
ACK/rollback protocol on the far side before it could be accepted
independently." The specialized core does not retrofit that; it removes the need
for it, because a Block core never had a whole-tree phase to scope down in the
first place.
2. The kernel seam: who owns what, and who schedules
Two seams matter and they are different seams.
The host seam is
packages/lynx/src/core/transport.ts(the wire) and theLynxHostContainerstate inpackages/lynx/src/core/host-driver.ts(the applierside). Nothing about it changes shape. What changes is who stands on the
background side of it.
The kernel seam is
packages/octane/src/universal-kernel.ts, whose boundarydocs/lynx-specialized-target-l0.md§5 already fixed: hook cells, contextpropagation, effect phasing, the Suspense/Activity state machines, and the keyed
LIS reconciler over abstract instance handles are in; host records, command
staging, prop planning, and the transported-commit encoding are out. The module
is host-neutral by construction — its own header requires it to stay "free of
renderer and host imports; owner- and batch-shaped dependencies enter only as
type parameters" — and it currently carries the hook cell shapes, the transition
controller, the owner-claim controller, and
createScheduleOwner.The specialized core consumes that module rather than reimplementing it, which
is why "port the Block model" is a smaller job than "write a second renderer".
It is also why this design does not need to settle §9's open question 4 (the
exact extraction boundary): the seams §5 still lists as unextracted — owner
abstraction, transition-batch root services,
formatUniversalId, thecurrentDraftOwner/claimChildOwnerreconciler edge — are the ones U2 willexercise first, and the slice is the evidence that decides where the line lands.
Owner. Today
UniversalRootowns the logical tree, the blueprint cache, andthe batch. Under the specialized core, a
LynxBlockRootowns the Block graph,the
ForSlotregistries, the kernel's hook cells, and an instance allocator.The allocator is the only new piece of global state, and it is deliberately trivial:
a monotonically increasing counter handing out dense runs, mirrored on the main
thread (§4).
Scheduling. Hooks, effects, and transitions keep
runtime.ts's schedulersemantics unchanged — that is the point of porting the model rather than writing
a new one. The seam-specific rule is where a flush boundary sits: the core
accumulates ops into a frame during a commit and hands the frame to the transport
once, at the end of the commit. A commit never yields to the transport mid-way.
What the seam does not learn. The applier stays dumb.
RUNinstantiates acompiled template,
SETwrites a slot,MOVE/REMOVE/CLEAR/VISdo theobvious thing. It does no diffing, no validation beyond the header check the
scalar-value restriction already buys, and it holds no key maps. Every decision
that needs a key, a LIS, or a dependency comparison happens on the background
side. This is the property that makes the main-thread cost change-proportional:
the applier's work is
O(|ops|)by construction, and|ops|is what thebackground chose to emit.
3. Flush atomicity: one block's ops never tear across a flush
A
Blockis the unit of structural consistency. Two obligations follow.Within a frame, a block's ops are contiguous and ordered. The emission order
for a newly mounted block is
RUN(which allocates the dense instance run), thenthe
SETs that fill its slots, then theRUN/MOVEframes of its children.That is bottom-up attach in the same sense
applyLynxFirstScreenDirect's deferredpapiNodeframes give bottom-up attach today (host-driver.ts:3020— thenode === nullframe is the queued append that pops after the subtree).Across frames, a block is never split. A commit that mounts N blocks emits
one frame containing all N; it never emits a prefix, yields, and emits the rest.
The reason is not aesthetics: a
MOVEaddresses(instance, slot)plus abeforeanchor, and a torn frame can leave the anchor instance not yet allocatedon the main thread, which the applier cannot represent and must not guess at.
The invariant is therefore checkable and should be checked in dev: every
instance referenced as a
parentorbeforein frame F was allocated by aRUNin frame F or in a frame already acknowledged.
This is the rule
docs/lynx-specialized-target-l0.md§9's third open question("delta batching granularity beyond per-commit once a lane scheduler exists")
will eventually revisit. Stating it now as per-commit, indivisible is what
makes the later question well-posed: a lane scheduler may choose to send more
than one commit per frame, but it may never send less than one commit.
U0 turned that open question into a live one. The direct-emission floor sends
one frame per storm tick, and
updateStorm@10kis the single cell where itsmedian landed above the current path's (1220 ms vs 1083 ms; ranges overlap and
the floor's spread is 5×, so it is not separable — but it is not a win either). A
50-tick storm over a 10,000-element tree is 78.3% presentation, and what the
floor demonstrably did not do is reduce the number of presentations. So the core
owes an answer the atomicity rule alone does not give: how many commits does a
50-tick storm become, and who decides?
Two properties are settled here and the third deliberately is not:
emits per commit and the scheduler decides how many commits reach the wire per
frame, which is what keeps the atomicity invariant checkable at the emission
boundary rather than somewhere downstream;
slice before any storm claim is made. Guessing a policy here and calling it a
design is the failure mode this section exists to avoid.
Suspense makes this concrete rather than theoretical. A boundary that suspends
mid-render must not have shipped half of the suspending subtree.
runtime.tsalready journals list shape before a hold is possible (
reconcileKeyed'sjournalForSlot(state)atruntime.ts:25615, taken whileoldSize > 0 && TRANSITION_JOURNAL !== null). The wire core reuses that journal: a hold discardsthe frame under construction and restores the
ForSlotfrom the journal; nothingwas sent, so there is nothing to undo on the main thread.
4. First-screen adoption moves to allocator determinism
This is the largest single change from today's design, and it is the one that has
to be reconciled item-by-item against #62. Doing that reconciliation is the point
of this section; the summary up front is that R1–R5 collapse into a stream
walk, R6 is absorbed by the allocator, and R7 survives unchanged and undiluted.
4.1 What Octane does today
captureLynxFirstTree(host-driver.ts:3146) freezes the painted tree into aclone-safe
LynxFirstTreeSnapshot: per host,{id, nativeId, type, generation, parent, children[], props, visible, events[]}.compareFirstTree(
host-driver.ts:3278) then performs a total three-way comparison — capturedsnapshot vs. the next record vs. the source record — over type, generation,
parent, child order, visibility, props,
nativeId, and physical parenthood viapapi.isChild, for every id. Any single difference produces aLynxFirstTreeMismatchErrorand the background repairs from its own tree. Thereis no value-level patch tier: props differ, the whole adoption fails.
The cost is
O(nodes x fields)on the background thread, plus the serializationof the entire snapshot across the ContextProxy wire — and the snapshot pins every
prop payload of the first screen until it is released.
4.2 What vue-lynx does (read, not copied)
IFR does not snapshot a tree at all.
runIfrRendermounts on the main thread andrecordAndApplyrecords the ops batches it applied. When the background'sfirst
vuePatchUpdatearrives,reconcileBatchwalks the recorded and incomingop streams frame-by-frame using
OP_ARITYas a layout table: opcode must match;all arguments except a trailing value argument must match exactly; a listed
value op (
SET_PROP,SET_TEXT,SET_CLASS, …) whose value differs is patchedin place rather than failing. Structural mismatch tears the tree down and replays
the accumulated background history onto a clean page.
The premise that makes it work is stated in the source: "Because both threads
run identical, deterministic code, the ShadowElement ids and event signs it
generates line up with the main-thread render." Element-template holes are
allocated "contiguously after the root id so both threads agree on ids without
shipping them."
4.3 What this design takes, and what it refuses
Takes: the stream, not the tree. Adoption compares the main thread's recorded
op frames against the background's first frame. It does not build
LynxFirstTreeSnapshot. This deletes the per-node snapshot serialization and theO(nodes x fields)walk, replacing both with anO(|ops|)walk over a flatarray — where
|ops|is already the minimum description of the first screen,because it is what had to be sent to paint it.
Takes: allocator determinism, which the spec already asked for.
docs/lynx-specialized-target-l0.md§3.6 already specifies adoption keyed off(templateId, instance path)— compile-time identity — with "matching becomes anarray-index walk instead of structural comparison". The op stream is the concrete
encoding of that: a
RUNframe carriestemplateId, its range site, andfirstInstance, so walking the frames is §3.6's array-index walk, and noseparate per-instance record has to be built to enable it.
And Octane already half-has it.
applyLynxFirstScreenDirect's own comment says it: "Ids are the pre-order idsthe background renderer will independently assign, so adoption identity is
positional, not minted" (
host-driver.ts:2885). The specialized core extendsthat from host ids to instance handles:
RUNallocatescountinstancesstarting at
firstInstance, and both threads run the same counter over the samedeterministic render, so the background's predicted
firstInstanceequals themain thread's. Nothing about handles is shipped for adoption.
Refuses: vue-lynx's value-patch tier, at first. IFR patches a differing
SET_PROPin place. That is right for Vue, whose main-thread and backgroundrenders can legitimately produce different values (a timer, a resolved async
setup). Octane's first screen is already contractually deterministic — that is
what
compareFirstTree's strictness encodes. Weakening it would be a semanticchange smuggled in under a performance change. The first slice therefore keeps
mismatch ⇒ repair, and a value-patch tier is a separately-argued follow-up
with its own evidence, not part of this port.
Refuses: deterministic listener-id seeding. See §4.5.
4.4 R1–R7, item by item
(memberSelector, templateId)sequences; differences are shape divergencesscoped to that Anchor). Preserved, re-expressed. On the wire the anchor
tree is the
RUNframe sequence: aRUNcarriestemplateIdand aparentrange site, so walking the two streams in lockstep and comparing(parent, templateId, count)per frame is R1's lockstep member walk. Adiffering frame is scoped to its range site, which is R1's "scoped to that
Anchor".
valueselement-wisedispatching on compile-time slot kind). Preserved.
RUNcarriesvaluesand
SETcarries(slot, value); slot kind is compile-time, so the dispatchR2 describes is the same dispatch. The change is only that the values arrive in
the frame instead of in a snapshot node.
templateIds neverlicense skipping it, because
useIdis a global render-order counter).Preserved, and this is the rule the stream walk must be checked against. A
naive optimization — "the
RUNheaders matched, skip the values" — wouldviolate R3 exactly. The walk compares every value of every paired frame. R3 is
also why §4.3 refuses the value-patch tier for now: a total value phase whose
divergences are silently patched is a weaker contract than a total value phase
whose divergences are faults.
c:-kindvalue difference IS shape at the child anchor). Preserved, and it is what
the strict/value argument split encodes. In frame terms: a differing
templateId,parent,before, orcountis shape; a differing scalar invaluesor aSETis value; and a differing child-composition slot is shapeat the child's range site, which the walk reaches as a differing
RUNframethere — not as a value difference at the parent. Note this is the same
strict-args/value-arg split vue-lynx's
strictArgs = arity - 1implements, sothe mechanism is shared even though §4.3 refuses its patch tier.
subtree, never an individual interior node). Preserved, and cheaper to
honour.
CLEARis defined precisely as "valid only where the range site ownsevery child of its parent node" (
delta-protocol.ts), andREMOVEtakes adense run
{firstInstance, count}. Both are range-granular by construction, sothe protocol cannot express the sub-anchor repair R5 forbids.
memberSelectoris that key;unkeyed/
index iranges use ordinal with longest-common-prefix matchingonly). Absorbed by the allocator, with one obligation retained. Under dense
run allocation, ordinal position within a range site is the instance offset
from
firstInstance, so ordinal matching is free. The keyed case still needsR6's rule, because a keyed range's key ordering is what makes the background's
allocation reproducible; so key determinism stays on the obligation list
(§4.6). The longest-common-prefix restriction survives as-is: the stream walk
stops at the first divergent frame and never re-aligns past it.
exists after the commit AND its
epochis unchanged AND its event slot stillcarries a handler; never redirected to a replacement instance at the same
Path). Preserved verbatim, mechanism and all. See §4.5.
4.5 The event-token journal survives unchanged
This is the item most at risk from "just do what vue-lynx does", so it gets an
explicit non-change.
vue-lynx has no journal because it makes the sign deterministic: the main
thread binds
vue:Nwhere N is a render-order counter, so the backgroundre-registers the identical string and a tap landing across the boundary routes
with no re-binding. That mechanism is precisely deterministic listener-id
seeding, which #62 §4.1 deleted under slot addressing — and calls the most
valuable single deletion in the design. Re-introducing it to save a journal would
undo #62's best result to pay for a cheaper adoption. That trade is refused.
So the journal stays exactly as it is today:
LynxFirstTreekeeps its opaque main-local[LYNX_FIRST_TREE_STATE]witheventsByToken: Map<string, LynxResolvedFirstTreeEvent>(
core/first-screen.ts). PAPI references stay out of the clone-safe half.captureLynxFirstTreekeeps journalingeventsByToken.set(registration.listener, event)for visible hosts with a background-sourced registration, and keepsfaulting when a hidden host retains one.
snapshotNativeEventBatchkeeps resolving each delivery token into a frozenfirstTreeTarget {host, generation, type, priority}(
main-thread.ts:1518).deliverNativeEventBatchkeeps re-resolving after the commit and dropping thedelivery unless the handle exists,
handle.generation === firstTarget.generation,isLynxHostAttached(...), and the slot still carries a listener. Thatconjunction is R7, and it is the reason a redirect to a replacement instance
at the same path cannot happen.
releaseLynxFirstTreekeeps refusing to release anavailabletree.What does change is the journal's companion:
LynxFirstTreeSnapshotshrinksfrom a node array to the recorded op frames plus the roots. The journal is keyed
by listener token and host id, neither of which comes from the node array, so it
is unaffected. Concretely, the follow-up work is to keep
captureemitting thesame
eventsByTokenwhile it stops emittingnodes[]— the two loops arealready independent in the current source.
The sealing rule vue-lynx learned the hard way is worth taking, because it is
about the journal's validity window rather than about signs: the recorded
stream is sealed when the synchronous first-screen render returns, and
post-seal main-thread ops are dropped. Octane's equivalent is
markSyncReady()onLynxFirstScreenHost(core/first-screen-host.ts), whichalready marks that boundary; the rule is that no op recorded after
markSyncReadymay enter the adoption stream.4.6 Obligation ledger vs. #62 §4.2
#62 §4.2 recorded 6 surviving obligations, 3 new (templateId stability,
slot-index stability, key determinism), 1 retired. Under allocator determinism:
allocator reproducible across threads (§4.4, R6).
RUNsequence must bea pure function of the render, in the same order the main thread produced it.
This is a genuinely new obligation that allocator determinism introduces, and
it is the one a differential test must pin (U2).
a mechanism, not an obligation; dropping it retires no contract.
5. Fault discipline
applyLynxFirstScreenDirectsets the standard and the wire core adopts itwithout softening.
Terminal-after-mutation. Once the walk has begun mutating the page, a fault
cannot be answered by "return false and let another path try": that leaves a
half-painted page. The current applier's shape is exactly right —
<list>check, and the main-thread event-collision pre-walk, both athost-driver.ts:2933and2967);failed flush sets
state.cleanupNeedsFlush = trueso terminal disposalretries it;
state.faulted = trueandinvalidateMainThreadLifetimesAfterFault(state)run before rethrow, so no native callback can fire against a faulted
container.
What this means for the wire core. The frame is the mutation unit, so the
pre-mutation refusal window is "before the frame is handed to the transport".
Anything the core cannot express — a composition with no
RUN, an unadoptablenative list — must be detected while building the frame, when discarding it is
free. After hand-off, a fault is terminal for that root:
faulted, workletlifetimes invalidated, flush obligation retained, rethrow. There is no
half-applied frame recovery path, and adding one would be a mistake: the applier
has no diff engine with which to reconstruct intent.
One explicit non-goal.
applyLynxFirstScreenDirectreturnsfalse(ratherthan throwing) for native
<list>because that is a property of the page, not ahost defect. The wire core keeps that channel and keeps it narrow:
falsemeans"this page cannot use the specialized path", never "this page failed".
6. De-opt regions
runtime.tshandles the non-static case withBlock.deoptNode,patchDeoptProps, andreconcileDeoptChildren: a region whose shape thecompiler cannot prove renders
ElementDescriptors and is reconciled in place.The source states the requirement plainly (
runtime.ts:17389): "Host elementsare RECONCILED in place across re-renders — same-tag elements are reused — props
patched, children matched by key/position — so DOM-resident state (input value,
focus, selection, scroll, media) survives."
That requirement is a host-state requirement, not a DOM requirement, so it
carries over unchanged: a Lynx element has native state too (input value, scroll
offset, media position), and it is lost the moment the instance is destroyed.
This is the constraint that decides the design. A region diff that re-emitted
the region as a fresh
RUNwhenever anything changed would be correct on paperand would silently drop the user's cursor.
So the wire form of the de-opt path is an instance-preserving region diff:
(position or key) → instance handle,which is the wire counterpart of holding the reused
Element;DOM path uses — same type at the same key/position is the same instance;
SETs whose values differ. It never emitsRUN;RUN; a dropped one emitsREMOVE; a reorderedone emits
MOVE. No new protocol — the output is ordinary v2 frames.SETcannot address a de-opt region by compile-time slot index, because a de-optregion has none. The region's slots are therefore allocated at region scope when
the instance is created, and the table above is what maps a descriptor prop back
to its slot. That is the one piece of machinery the de-opt path needs and the
compiled path does not.
Two properties matter:
never to the page. A de-opt region inside a 10,000-row list does not make the
list's update
O(rows).It is bounded by the region's own size and released when the region unmounts. A
page with no de-opt regions retains nothing — the "pay for optional features
only when used" rule from
core-engineering.md, and the reason this diff livesin the de-opt path rather than becoming the general update mechanism.
Note what this is not: it is not a general vdom fallback and it is not a
byte-comparison of op frames. It is the existing
reconcileDeoptNodealgorithmwith an instance handle where the
Elementused to be — which is the samesubstitution §1.1 makes everywhere else (
reconcileDeoptNodeis atruntime.ts:18046).7. Coexistence with universal-core, and the migration
Per-root opt-in. The specialized core is selected per root, not per build:
CreateLynxRootOptions(packages/lynx/src/root.ts:45) gains a field, and unset,the root goes through
universal-native→universal-coreexactly as today.Nothing about the universal path is modified, deprecated, or made conditional by
this work.
Why per-root and not a build flag: it is what makes the differential test in U2
possible at all. The same fixture, in the same process, rendered through both
cores and driven through the same commits — that is
packages/lynx/tests/first-screen-direct.test.ts's pattern extended from firstscreen to update, and it needs both cores live simultaneously.
What that test compares needs saying precisely, because §4 changes one of the
three artifacts. Physical tree and event journal are compared
byte-for-byte: the applier is shared, so the PAPI-visible tree and the
eventsByTokenmap must be identical structures. Adoption cannot be comparedbyte-for-byte, because the universal path produces a
LynxFirstTreeSnapshotandthe specialized path produces an op stream — so the equivalence asserted there is
of outcome: the same adopt-or-repair decision, and on repair the same
LynxFirstTreeMismatchErrorpath and plan attribution. Asserting byte-equalityof two deliberately different representations would be a test that passes only
until §4 lands.
Shared, not forked. The wire (
core/transport.ts), the applier(
core/host-driver.ts), the protocol (core/delta-protocol.ts), the PAPI layer(
core/papi.ts), worklets, and the event journal are shared by both cores. Thespecialized core replaces the background half only. That is what keeps the
differential test meaningful: if the applier were forked, byte-equality of the
physical tree would prove nothing about the wire.
Migration order. Fixture subset first (U2), then the shape of the evidence
decides the next scope. No root moves by default, and the universal path stays
the fallback for every composition the specialized core refuses (§5) — native
lists most obviously.
Explicitly not in scope. The universal-core scoped-commit retrofit — making
prepareOwnedUpdatework whentransport !== null— is recorded as a fallbackand is not implemented. If the specialized core does not clear its gates, that
patch is the fallback to reconsider; it is not a parallel workstream.
8. What this design does not yet answer
Stated plainly, because a design comment that lists only its strengths is not
evidence:
indivisible, coalescing belongs to the scheduler — and is explicit that the
policy is unresolved. It is the one cell where the direction's own evidence
points the other way, and U2 re-runs it.
select@10krecovered less than its count predicts. U0's count fell by10,042× and its wall by 18%. This design explains the count; it does not
explain the gap, and neither does the measurement.
runtime.ts's slot-keyed hooks arecompiler-assigned and host-independent, so the port is expected to be
mechanical — but "expected to be" is not "shown to be", and no slice has run.
handle space are new retained state. Bounded, but unmeasured.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
U2 — first vertical slice: the Block core exists and its counts hold
Execution record for §5's U2. What landed, what it proves, and what it does not.
Landed as #105 (draft, stacked on #104 → #102 → #101 → #100 → #97):
packages/lynx/src/core/block-core.ts— the Block model over the wire host — andpackages/lynx/tests/block-core.test.ts— its differential and count tests.15 tests, all green.
The core is
runtime.ts's pair of structures with a host handle where the DOMnode was: a
Blockholding{template, firstId, values, key, prev, next}, and aForSlotholding{parent, items: Map<key, Block>, head, tail, size}. The keyedreconcile is an LIS over the survivor sequence, which is the same algorithm and
therefore the same guarantee
docs/differences-from-react.mdalready documents:final order and survivor identity are guaranteed, the set of physically moved
instances is not.
The seam this slice chose, and why it is not the delta protocol
U1 §1.1 mapped the Block model onto delta-protocol v2 opcodes —
RUN,SET,MOVE,REMOVE,CLEAR,VIS. This slice emitsUniversalHostCommandsinstead, and that is a deliberate departure from that table. The reason is not
convenience, so it is worth stating exactly.
The command vocabulary the applier already speaks is the Block vocabulary:
UniversalHostCommandRUN {templateId, parent, before, firstInstance, count, values}mount-template-run {parent, before, program, firstId, firstListenerId, count, values}SET {instance, slot, value}update {id, props}— the applier diffs the complete next props againstrecord.propsMOVE {instance, parent, before}move {parent, id, before}REMOVE {firstInstance, count}remove+destroy, one pair per hostVIS {instance, state}visibility {id, visible}Delta v2 (#101) is a compact encoding of that vocabulary, not new applier
capability — and there is no main-thread v2 applier to target yet
(
core/delta-shadow.tsis an observer, not an applier). Emitting through theexisting commands keeps the applier, the wire, the PAPI layer, and the event
journal shared with the universal path, which is the only thing that makes a
physical-tree comparison between the two cores mean anything. U1 §7 made that
argument for not forking the applier; this is the same argument one level down.
Re-encoding as delta frames is a mechanical follow-up once a v2 applier exists,
and nothing in the core's structure depends on which of the two it emits.
One place the vocabulary is genuinely weaker, recorded rather than smoothed
over.
destroyrefuses a target still attached or still owning children, soretiring a row costs one
removeplus onedestroyper host in its run, inchild-before-parent order.
REMOVE {firstInstance, count}says the same thing inone frame. The teardown test asserts
4 * (1 + hostCount)— the cost thevocabulary actually charges — rather than the cost the protocol would. This is
the first concrete case where the v2 encoding earns its keep beyond compactness.
What the tests prove
1. Change-proportionality — the U0 gate, restated against a real key map
U0 measured the ceiling with a hand-written emitter that kept its row state in a
plain array; the objection it could not answer was "does a real keyed core
actually emit that". These counts are that core's, asserted:
blockLookupscommandsdanger, row gains it)The invariance across three orders of magnitude is the claim; the absolute
2isonly its witness. Against U0's table for
select@10k— 10,042 child blueprintsreconciled on the current path, semantic floor 42 — the keyed core reaches the
row by key and touches nothing else. U0's
1and this slice's2are the samenumber under a different scene: U0's driver toggled one row, this fixture toggles
the row losing
dangerand the row gaining it.update10this the sharper result, because it is the cell where a whole-treereconcile still has a
rowsterm: 100 lookups and 100 commands for 100 changedrows out of 1,000, with no
rowsterm at all.The no-op row matters more than its size suggests.
setKeyedSlotValuereturnsfalse, emits nothing, andflush()returnsnull— so an update that changesnothing produces no frame, rather than an empty one the far side must still
receive and acknowledge.
2. Equivalence — an incremental update is a fresh mount of the same state
Four scenarios drive the core incrementally, then mount the same logical state
from scratch into a second container, and compare the two painted trees:
scoped selection change, keyed reorder, insert-and-remove, and every-tenth-label.
Both sides go through
prepareLynxHostBatch(...).apply()against the fakeElement PAPI, so what is compared is the physical tree the applier produced.
Why this oracle and not "compare against universal-core". The two cores are
different allocators and never had to agree about host ids; a byte comparison
against a universal-core render would be measuring allocator coincidence. The
core-against-itself oracle is the one that actually holds, and it is the one a
differential test needs: whatever sequence of updates you took to get here, the
tree is the tree you would have painted directly.
The comparison normalizes exactly two things and no more — event tokens down to
their
kind:namekey, and the host-id component of a nodes-ref selector — whilekeeping root and generation. A generation bump means an instance was
replaced, which is precisely what these tests exist to catch. The normalizer
throws on a selector it does not recognise, so a format change cannot silently
pass.
A fifth test checks the thing byte-equality of a tree cannot: after a reorder,
the survivor host objects are the same objects (tracked by a
uidstamped atcreation), not equal-looking replacements. That is the host-state contract from
runtime.ts:17389— reuse, not recreate — checked at the identity level.3. Allocation-order determinism — U1 §4.6's new obligation, pinned
U1 §4.6 added one obligation to #62's ledger: the background's run sequence must
be a pure function of the render, because that is what lets the main thread
predict a handle it was never sent. Two cores driven identically now must
allocate identical id runs, and a test asserts it.
Two refusals are also pinned, because a core that silently accepts what it cannot
own is worse than one that refuses:
compileLynxBlockTemplatethrows on alist/list-itemtemplate (U1 §5's narrowfalsechannel — a property of thepage, not a defect) and on a value slot two host nodes claim.
4. A fixture bug this slice found
__InsertElementBeforedelegates to DOMappendChild/insertBeforeon a realhost (confirmed against
@lynx-js/testing-environment'sElementPAPI), so analready-attached child is reparented.
host-driver.tsrelies on exactlythat: a
movecommand emits onepapi.insertBeforewith no precedingpapi.remove.The fake Element PAPI spliced without detaching, so a moved node stayed in both
places — a six-row reorder reported eight rows. Nothing caught it because no
existing fake-PAPI test moves a node;
first-screen-direct.test.tsonly mounts.Fixed in the fixture, which is where the defect is, with the keyed-reorder test
as its regression. Worth recording as a measurement hazard: the first keyed
workload run against that fixture would have produced a wrong tree, and the
counts would have looked fine.
What it does not prove
Listed plainly, because U0's record set that standard and this slice is weaker
evidence than U0 was.
U0 harness re-run on the real slice; that has not happened, so U0's two open
gates stand exactly where U0 left them — the
updateStorm@10kcell whosemedian sat on the wrong side, and the unexplained gap between
select@10k's10,042× count fall and its 18% wall fall.
CreateLynxRootOptions(U1 §7)is not in this slice.
block-core.tsis reachable from neithersrc/root.tsnor
src/main-thread.ts, so the source graphruntime-compatibility.test.tspins is untouched — deliberately, because wiring it in changes that pinned
graph and deserves its own reviewable step.
fixture rendered through both cores in one process. That needs the per-root
flag above, so it is the next slice, not this one. The equivalence tested here
is core-against-itself.
useStatesetter would call;the hook cells that call them are not ported. This is why the tests compare the
core against itself rather than against a universal-core render of the same
component — the two are not yet the same program, and a test that pretended
otherwise would be comparing fixtures rather than cores.
compareFirstTree, R1–R7 re-expressed over frames — is untouched here. Thedeterminism test pins the obligation §4.6 named, not the walk that would
consume it.
instance-preserving region diff is designed and unwritten.
compileLynxBlockTemplaterefuses what the core cannot own rather thanapproximating it.
4 * (1 + hostCount)commands where the protocol would charge one frame. The test asserts the real
cost.
per-region retention as new retained state; this slice adds the first of those
and measures neither.
Next
The per-root opt-in and the two-core differential test, then the U0 harness
re-run on the real slice — which is what turns this slice's counts into a claim
about wall-clock, and what the
updateStormgate is waiting on.Generated by Claude Code
Huxpro commentedon Aug 20, 2026
U2b — the wire takes it, and both cores paint the same page
Second execution record for §5's U2. U2 proved what the specialized core emits
and what it costs; it could not prove the protocol would accept any of it,
because every frame went to a fixture written to agree with the core.
Landed as #106 (draft, stacked on #105):
core/block-root.ts,tests/block-root.test.ts(12),tests/block-core-differential.test.ts(6).vitest run --project lynxis 32 files / 423 tests green.1. The frames are wire-legal, not just applier-legal
createLynxBlockRootis the commit and event half of a background root: it ownsa
LynxBlockCore, turns one flush into one transported commit through the samecreateLynxBackgroundTransportsrc/root.tsbuilds, and routes an inboundnative delivery back to the handler its mount bound.
Nothing is doubled.
selfCheckLynxBackgroundOutboundMessageruns insidetransport.prepareBatchand validates every command in development, and main'sown
validateLynxBackgroundOutboundMessageruns on receipt. A frame that wouldfault a real page now faults in a test.
It is not
LynxRoot. There is norender(component, props), because thereare no hook cells yet and therefore no program for a component to be. The caller
drives the core directly, which is what a compiled block program would do.
Event delivery closes the loop U0 only modelled.
LynxBlockgainsfirstListenerId: the listener run is dense the way the host run is, so ablock's own base is its row offset into the run's base. A tap on the main thread
reaches the row's handler, the handler does a scoped write, and the next commit
carries exactly one
update. Asserted end to end. The refusals are asserted too— unknown listener, priority mismatch, foreign root, released listener — and the
batch is validated whole before any handler runs, so a forged listener cannot
buy a partial dispatch by riding behind a real one.
2. Both cores paint the same page
U1 §7 named this as the reason coexistence is per-root rather than per-build.
The same logical state driven through the universal core and through the Block
core, over the same transport and the same applier, leaves the same physical
tree.
Sharing the applier is the whole point: fork it and byte-equality proves nothing
about the core. Both columns run
createLynxBackgroundTransportagainst the samefake main thread and replay the accepted commits through
prepareLynxHostBatch.Two things are normalized and no more: the host ids inside a nodes-ref selector,
and the numeric half of a native event token. The two cores are different
allocators and never had to agree about a number. Root and generation survive,
so a replaced instance still fails the comparison.
The oracle bites — changing one static prop on the block side fails all four.
That check was run deliberately, because a differential test that cannot fail is
worse than none.
3. What this does not show, stated as tests
#102 attributed the update-path debt to the background drain, not the wire:
select@10kreconciles 10,042 blueprints and emits one host command. Twotests keep that straight so this slice cannot be read as claiming more:
mount-template-runfor the whole dense run.
A claim that the Block core makes the wire cheaper on an update would be
wrong. The claim is about what the background had to visit to produce that one
command, and that is what U2's counters measure.
4. Two findings the seam produced
Both are recorded rather than worked around, because both would have been
invisible from the fixture side.
The transport root id space is not shared.
universal-core.tsallocatestransport root ids from a module-private
NEXT_TRANSPORT_ROOTit does notexport. A second core in the same page therefore cannot mint a non-colliding
identity, and minting from a second private counter would collide silently the
first time both cores ran together.
createLynxBlockRoottakes the id as anoption and the caller owns keeping it distinct. This is a concrete addition to
U1 §2's seam list: the identity allocator has to move or be shared before
per-root coexistence is real.
A
mount-template-runis one command outbound andnodes.length * counthandle deltas inbound. The client container derives a handle transition for
every node of every instance and refuses an acknowledgement that omits one
(
prepareLynxHandleDeltas). So the mount that costs one command to send costs70,000 deltas to acknowledge at 10k rows × 7 hosts — on the legacy path. The
compact acknowledgement is what makes the return leg proportional, and the Block
core's frames qualify for it: no
list/list-item, noreformain-thread:binding, every created host also inserted. Both halves are asserted. This is a
second concrete way the emission side is not the whole story, alongside the
teardown gap U2 recorded.
5. The per-root flag: why it is not in this slice
§5's U2 asks for a per-root flag on
CreateLynxRootOptions. It is not here, andthe reason is not scope-trimming.
LynxRoot.render(component, props)is the only entry point a flag couldredirect, and the Block core has no component program to run — no hook cells, no
compiler output, nothing for
renderto accept. A flag today would be a switchwith nothing behind it, which is worse than no flag: it would read as capability.
The opt-in that exists is already per-root, in the only form that currently
has meaning: a root is constructed by
createLynxRoot(universal) or bycreateLynxBlockRoot(Block), per root, never by a build flag. The flag becomesthe right shape at the same moment hooks do, and not before.
6. Still open, unchanged
slice. That needs the core driving the benchmark app's background rather than
a test, and it is the next piece. U0's two open gates stand exactly where U0
left them:
updateStorm@10kwith the floor's median on the wrong side, andthe unexplained gap between
select@10k's 10,042× count fall and its 18% wallfall.
native lists. Unchanged from the U2 record.
new retained state; neither is measured.
Generated by Claude Code
Huxpro commentedon Aug 20, 2026
U0, re-run on the real slice — the counter the core keeps itself
§5's U2 closes with "再跑一遍 U0 harness 验证真实切片". Here it is, as #107 (draft,
stacked on #106).
U0's floor reported two numbers per operation: what its hand-written op emitter
actually touched, and beside it what a keyed core would touch — the second
derived by hand, because at the time there was no keyed core to ask. U2 built
one. This asks it.
benchmarks/lynx-table/block-counts.mjsdrivesblock-workload.tsover the sameladder
run.mjsuses, on the same chassis: the same cross-wired ContextProxypair, the same fake Element PAPI, the same real main-thread receiver, the
same
__OCTANE_LYNX_PROFaccounting. Only the background core differs. That iswhat makes a count here comparable to the
octane-lynxcolumn rather than merelyadjacent to it. Everything reported is a count, so it needs no quiet host and
claims no milliseconds.
Two columns, because one of them would over-claim alone
Both run the real
LynxBlockCoreover the real transport. They differ only inwhich entry point a state change reaches:
do: write the changed rows' slots by key.
setRows(next)does today: hand the wholenext list to the keyed reconciler.
10,000 rows
1,000 rows is the same table one order down (
select2 vs 1,000;selectStorm60 vs 30,000). Full record, both scales, with the per-op command mix:
benchmarks/lynx-table/prototype/results/u0-block-core-counts.{json,md}, besideweb-u0-update-ceiling.*— the two halves of the same gate.The exit gate
U0's gate was
select@10k's reconcile-equivalent count returning to the semanticlower bound: ~43 against the standing 10,042. The scoped column reports 2.
It is under the stated bound because the bound included the app's 41 chrome
blueprints, and the block core never revisits chrome: the page shell is one
mounted block that a row's selection change does not touch. Every other op with a
floor lands on it exactly —
0,1,000,50,000,60— not near it.GO.
The finding that stops this from being the wrong claim
Look at the
reconcilecolumn. 10,000 forselect@10k, against the universalcore's 10,042 blueprint visits. Those are the same number. The Block model,
driven the way the app drives it today, reproduces the cost the universal core
already pays.
So the win is not the Block model. The win is the scoped write, and the Block
model is what makes the scoped write addressable at all:
ForSlot.itemsis aMap<key, Block>and a block carries its dense host-id run, so "row 7's class"resolves to a host id in one lookup with no tree walk. Port the Block model
without moving the state change off the whole-list path and #103 buys nothing
measurable.
That is the load-bearing sentence for the rest of this issue: the remaining work
is the hook cells that let a state change reach
setKeyedSlotValueinstead ofreconcileForSlot. The core is not the hard part any more; the compiler seamthat routes writes to it is.
What the wire says, and what it does not
Both columns send byte-identical frames at every op and both scales — the
runner fails if they do not. The drive mode changes what it costs to produce a
frame; it never changes the frame. And the block core's commands sit exactly
where the universal core's already sit:
createis onemount-template-run,selectis twoupdates,swapis twomoves,update10thisceil(rows/10)updates. #102 attributed the update-path debt to the backgrounddrain rather than the wire; this is that attribution restated from the other
side. Nothing here claims the specialized core makes the wire cheaper on an
update, because it does not.
Two incidental cross-checks that the hand-written block program really is the
app's program rather than something merely similar: at 1,000 rows both cores
materialize 7,042 host elements, and a
selectframe is 225 bytes fromeither. Read as evidence for the comparison's premise, not claimed as results.
The gap this names rather than scores
swaphas no floor entry and pays 10,000 in both columns. This slice has noscoped move, so a structural reorder goes through the keyed reconciler regardless
of how the change arrives. That is honest LIS behaviour rather than a defect —
final order is guaranteed and survivors keep identity — but it is also the one op
where the ceiling and the floor are the same number, and it is where a
MOVE {firstInstance, count}primitive would earn its keep. Left in the tablewithout a floor rather than dropped, because dropping the row would read as
coverage.
Standing caveats
Both columns are ceilings in the same sense U0's floor was a floor: the block
program is hand-written — no hooks, no compiler, no component bodies. This is
"what does the architecture cost", never "what does Octane on Lynx cost today".
The
octane-lynxcolumn inrun.mjsremains the second number.No milliseconds moved. U0's two open wall-clock gates stand exactly where U0
left them:
updateStorm@10kwith the floor's median on the wrong side, andselect@10krecovering 18% of wall against a count fall three orders larger.This measurement explains the second one's shape — the count that falls is
background traversal, and traversal was 48.3% of that frame, so a 10,042 → 2 fall
bounds the recoverable share at roughly that — but bounding is not measuring, and
the browser cell is what would measure it.
Provenance
Agent-authored, as with the U0/U1/U2/U2b records above.
Generated by Claude Code
Merge pull request #104 from Huxpro/test/lynx-update-ceiling
Merge pull request #107 from Huxpro/test/lynx-u0-block-counts
Huxpro commentedon Aug 20, 2026
Gate record — #100–#102 and #104–#107 reviewed, polished, and merged into
new-lynxWorking split per the owner: the implementing session drives slices forward; this session gatekeeps — reviews, fixes findings directly on the PR branches, and merges what it accepts. Tip is now
7d5e6f1.Review outcome
Two review rounds over the seven-PR chain. No architectural or verdict-affecting defects; U0's GO and the Phase 0–3 records stand as written. Eight findings were fixed on the owning branches before merge, each pinned red-green where testable:
block-coremove, driftedslot.size, and leaked a mounted run);reconcileForSlot/clearForSlotgained adepartedcallback so an owner can release a departing block's listeners before its run is destroyed (previously: retired listener ids stayed routable forever) — 3 new regression testsblock-rootdispatchTransportEventnow enforces the version check universal-core applies to events (a delivery stamped against a superseded batch is refused, not run against post-commit state); a throwing handler no longer drops the remaining pre-validated deliveries — every delivery runs, errors aggregate, matching universal-core — 2 new regression testsisLynxDeltaValueexported as the single wire-scalar predicate; the shadow's duplicate rule and its per-binding array allocation on the profiling hot path are gone; the slot-kind test is null-safebg_prepare/bg_replay_othersplit its own reports emitValidation before merge
On the final merged tree:
pnpm syncclean,pnpm typecheckexit 0,lynxproject 32 files / 428 tests, targeted octane suites 30/30,block-counts.mjsandnode --test stages/*.test.mjsgreen. Thenew-lynxpush CI run is the final backstop.Note for the next batch (#108–#113)
Those branches were cut before these fixes landed, so they do not contain them; the next gate round resolves that at merge time as usual. The
departedcallback added to #105 is the mechanism #108+'s list work should use for listener release — flagging it so it gets adopted rather than re-invented.Generated by Claude Code
Huxpro commentedon Aug 20, 2026
U3 — native
<list>on the block core: recycling callbacks × slot tablesDesign record for §5's U3, in the U1 pattern: design first, no code, owner review before the slice. Written against
new-lynxat7d5e6f1.0. First, a correction to the gate note
departedcannot be adopted by #108–#113, because that batch is not block-core work. Those six PRs are #66 Phase B/C — the universal path's first screen and native-list adoption. Their whole diff againstnew-lynxtouchesfirst-screen.ts,host-driver.ts,main-renderer.tsandmain-thread.ts, and neverblock-core.tsorblock-root.ts. Listener lifetime there is the background journal plusLynxNativeListState.disposed, which predates both cores.The note is right about the mechanism, just early about the batch:
reconcileForSlot/clearForSlothave no production caller at all yet — onlyblock-core.test.ts,block-root.test.tsandblock-core-differential.test.ts. The first production caller is a range owner that holds per-block listeners, and the first such owner is this step. So the pairing the gate flagged —— is adopted below as U3's stated obligation, not re-invented.
block-root.ts:75already documentsreleaseListenersas "Call before its run is destroyed";departedis the only window that satisfies it, sincedestroyBlock(block-core.ts) emitsremove+destroyand nothing else.1. What U3 is, stated as three refusals with one cause
A native list is refused in three independent places today:
packages/octane/src/universal-core.ts:4259,:4398list/list-itemnode makes a plan ineligible for a template program — both in shape derivation and in draft matchingpackages/lynx/src/core/host-driver.ts:4046,:4341mount-template-range/mount-template-run"cannot target a native-list host or descendant"packages/lynx/src/core/block-core.ts:85compileLynxBlockTemplatefails on alist/list-itemnodeThree refusals, one cause: a template run mounts eagerly and densely, and a native list's rows must not exist until Lynx asks for them.
mount-template-runmeans "materializecountinstances now".<list>means "I will callcomponentAtIndexfor the ~12 rows that are visible, and recycle them as the window scrolls".So U3 is not "make the three checks accept lists". It is: introduce the one thing all three are missing — a run that is declared but not materialized — and then the refusals become ordinary eligibility.
2. The deferred run
The background declares, under a
<list>parent, a template program plus one value row per logical item, and materializes nothing:iowns host ids[firstId + i·hostCount, firstId + (i+1)·hostCount). That is already the addressingupdate/v2SETuses, so a scoped write to a row is not a new case. If the row is live, it applies to the materialized node; if it is not, it lands in the declared value row and is picked up when the row is next materialized. Both paths are one slot write, independent of list length.LynxListItemDescriptor(item-key,reuse-identifier,recyclable,defer,packages/lynx/src/core/list.ts:1). The template describes the row's content; the descriptor stays the row's list metadata.applyListUpdatekeeps owning item churn exactly as it does now.componentAtIndex(i)builds instanceifrom(program, values[i])instead of walking records throughcreatePhysicalTree. That is the same substitution L1 already made for the first screen: straight-line create + hole writes instead of a record walk withplanLynxHostPropPatchper node.What this replaces is worth stating as a count. Taking a row of the shape
lynx-tableuses —<view class>with three<text>children, which is a@forand not a list, but is the row shape already measured here — a row is 4 host records plus 3#textrecords, 7 per row, ~70,000 at 10k, against one program plus 10,000 × 4 scalars.The list case is strictly stronger than that
@forcase, and for a reason specific to lists:createPhysicalTreematerializes fromstate.records, and throwsnative list requested missing hostif the record is absent. So every logical row's records must exist and be retained, even though only the ~12 in the visible window are ever physical. A deferred run retires that whole shadow population in favour of one program and N value rows.3. Recycling by slot write — the actual claim
This is the part the step is named for.
Today reuse is
rebindPhysicalTree(state, container, cell.tree, item.id)(host-driver.ts, frommaterializeListItem): re-point an existing physical subtree at a different logical item, walking the subtree and re-applying props node by node. Cost is proportional to the row's node count and prop count, every time the window scrolls by one.With a template-described row, the pooled instance and the requested row are two value arrays over the same program. Rebinding is:
K comparisons and at most K changed slots, typically 1–3 — no subtree walk, no prop-set union, no
planLynxHostPropPatch. To be precise about what that buys, since it is the number U3a has to measure: the block core'supdatedeliberately carries a node's complete next props and lets the applier diff them (block-core.ts,write()), so the saving is not in command count. It is that the set of nodes touched drops from "every node in the row" to "the nodes owning a changed slot", and the decision costs oneObject.isper slot against state the background already holds. The pool partition becomes the program itself: two rows over the same program are interchangeable by construction, which is whatreuse-identifieris approximating today.block-core.tsalready carries both halves of this (valueNodes/valueNames, andwrite()'s unchanged-slot short-circuit). U3 does not invent the mechanism; it points the list's recycling callbacks at it.4. What must survive
Non-negotiable, carried verbatim from the paths this touches:
materializeListItemdetaches an attached cell to'await-enqueue'because Lynx may request a moved logical item before enqueueing its old sign. A deferred run does not change that ordering and must not assume enqueue-before-request.detachments/attachmentsandemitAttachmentsare how the background learns what is physically live. A template-materialized cell publishes the same deltas as a record-materialized one, orhasNativeListTopologybookkeeping goes wrong.invokeNativeListCallbackreturns the fallback once the state is disposed/disposing/faulted; teardown must still make late native callbacks inert (thelynx-listbench asserts this).departed→releaseListenersbefore the run is destroyed. A recycled instance keeps its listener run — it is the same block; only a departing row releases.applyLynxFirstScreenDirectestablished.5. Execution order
§5's own discipline is ceiling-first, and there is already an instrument for it.
U3a — ceiling, on the existing bench.
benchmarks/lynx-list/drives the real host through a fake Element PAPI, scrolling a 12-cell window across 1,000 recyclable rows, and recordscreatedCells/reusedCellswith a semantic-checksum guard. It counts how many cells are reused; it does not count what a reuse costs. U3a adds that counter — props written per reuse — and reports the current path against the hand-written slot-write floor for the same workload. Deterministic counts, not milliseconds, so it carries across hosts and sessions likeblockLookups/commandsdo.Exit gate: the reuse-write ratio, recorded here, with a GO/NO-GO. If the current path is already near the floor, U3 is a NO-GO and the step stops — record it, do not soften it.
U3b — lift the refusals behind the per-root flag. Deferred runs only under a list parent; every other use of
mount-template-runkeeps today's eager meaning. The three sites in §1 become eligibility checks on "is this run deferred", not type bans.U3c — recycling by slot write, with the differential rig extended to lists: physical tree, attach journal and event journal equivalent to the universal path on the same commits, plus the
lynx-listguards still green.6. Two questions for the owner
mount-template-runinUniversalHostBatch, which keeps applier, wire, PAPI layer and event journal shared — the propertyblock-core.ts's "Why this emits host commands rather than delta frames" section says is the only thing that makes a cross-core physical-tree comparison mean anything. Cost: one more Lynx-only concept in the universal ABI, on top of the inventory PR docs: answer the L6 ABI decision — the Lynx-only universal surface stays #116 just took for Roadmap: replace the universal-renderer target for Lynx with a Lynx-specialized compiler and renderer #58 L6. Option B: keep deferred runs inside the block core's own emission and never inUniversalHostBatch— cleaner ABI, but it forks the applier and gives up the differential proof. I lean A for exactly the reason that section states, and Retire the Lynx-only surface from the universal ABI once a background core stops speaking it #117 already carries the eventual deletion of the Lynx-only universal surface.reuse-identifierkeep independent meaning once a row is template-described? Program identity is a strictly finer partition. Honouring both is easy but means a pooled instance can be rejected for a reason the slot tables say is irrelevant.Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Owner decision — the core switch is compile-time, not per-root
Superseding U1 §7's per-root
CreateLynxRootOptionsopt-in: the owner has ruled it overkill. The Block core is selected the way vue-lynx selects Vapor mode — a compile-time switch in the build plugin (rspeedy plugin option → the bundle wires the background driver to one core), not a runtime per-root choice.Consequences for the pending wiring slice:
web/run-web.mjspage — still a clean single-variable comparison.Generated by Claude Code
Huxpro commentedon Aug 20, 2026
Gate record — first-screen batch #108–#110 merged into
new-lynxTip is
2393505. Review + polish + merge per the gatekeeper split; the list batch (#111–#113) and the L5/L6 docs batch (#114–#116) remain open for the next rounds.Review outcome
One finding survived review, fixed on #110's branch before merge (
e6b2898), red-green verified:<list>plus a defect the staged prepare reports — amain-thread:event prop colliding with a background listener of the same channel, or one main-thread ref descriptor assigned to two visible hosts — settled as a quietskippedinstead offailedwith the error, contradicting the pre-check's own contract that a skipped build never skips a diagnostic.firstScreenTreeIsUnadoptablenow takes the envelope's events and replays both checks before granting the skip verdict, throwing the staged path's exact errors so the screen retires asfailedthrough the existing catch. Two new regression scenes infirst-screen.test.ts(valid list + colliding host; valid list + duplicated ref), both verified failing pre-fix.Verified-and-dropped candidates are in the review transcript: the shared empty-events map, the
hasMainThreadPropssticky-flag capture skip, per-record clone-state reuse, envelope/batch event ordering parity,retireFirstScreen(null, …), symbol-keyed prop drop, and the measured 0.06% pre-check walk.Validation before merge
On the merged tree:
pnpm syncclean,pnpm typecheckexit 0,lynxproject 32 files / 441 tests, targeted octane first-screen/template suites 16/16, repo-widepnpm format:checkclean (now a standing part of the gate after the run-97 lint miss). Push CI onnew-lynxis the backstop.Next: the wiring slice is the B0 benchmark gate
With the first screen merged, the remaining blockers for the first honest in-product A/B against the universal path are exactly two, per the owner's decisions recorded above:
octane-blockcell inweb/run-web.mjs/run-fcp.mjsbuilt with the flag on, driven same-window against the flag-off build by the byte-identical driver; the differential harness proving physical tree / adoption snapshot / event journal equivalence on the same commits comes with it, per U1 §7.The list batch (#111–#113) is not on this critical path — the bench fixture has no native list — and queues behind it.
Generated by Claude Code
112 remaining items
Huxpro commentedon Aug 30, 2026
Gate record: E2 train →
new-lynx@ 432c648 — 9 merged, 2 bouncedMerged, in order: #239 (compact-refusal pin), #235 (second-create gate cell), #237 (#234 D1 correctness judge — README union re-resolved on its branch, stale "unmerged wiring" note corrected to point at #244), #240 (Order 3 four-build split evidence, recipes in-repo), #238 (E1 boundary pin), then the E2 stack #243 → #245 → #248 → #249 (teardown-mirror differential pin → clear skips subsumed unbinds → mirror dropped → clear stops describing subsumed detaches, plus the heapMtsAfterClear recipe doc).
Bounced:
createcommands for native-list rows the apply never materializes (thedirectListItem/attachedByItemskip), so it refuses the very<list>page its diagnostic recommends, and under-guards symmetrically when unmaterialized rows are destroyed. Finding with the fix shape (membership-aware projection, transitive, three red oracles) on the PR (comment 5468519717). Re-enters next train.Gate fixes (on the stack head, red-verified): the subsumed-detach skip keyed on the batch's whole destroy set, so destroy + re-create of the same id in one batch skipped a detach on the new incarnation — native binding left installed on a live element. Now positional: skip only when a destroy of that id comes after the detach. (A second fix to #251's bundle-fallback provenance travels with #251 to train 2.)
Validation: full
pnpm teston the gate tree — 26,774 passed; 5 residual fails all from the recorded environment families (two hydration hook-timeouts pass alone; drei screenshot / suspense focus / native-demo byte-untouched by this train).pnpm typecheck,pnpm syncclean. Finalnew-lynxre-verified scoped: lynx project 734/734, stage suite 179/179; final-vs-gate diff is exactly #251's excluded content. CI: runner pool still starved; third-state protocol applies.What this train means: the teardown-mirror (the +3.15MB prime suspect) is gone with a differential pin guarding the fallback; clear's redundant unbinds/detaches no longer journal; Order 3's evidence and recipes are in-tree; E1's boundary is pinned. Next measurements to watch:
heapMtsAfterClear(oracle ≤ upstream's 7.37MB) and clear@10k on the next formal round.Generated by Claude Code
Huxpro commentedon Aug 31, 2026
Gate record — Train 2: #251 + #250 →
new-lynx@ 4081bafBoth merged (method: merge, base
new-lynx): #251test(bench): give the FCP window a reference control(4ef55c3), then #250perf(lynx): fold a compile-time-known text child onto its text host(4081baf, undrafted at merge). The mergednew-lynxtree is byte-identical to the locally validated candidate (emptygit diff).Review (high) — 3 findings, all fixed on the PR branches before merge
host-driver.ts, on perf(lynx): fold a compile-time-known text child onto its text host #250) — the non-densemount-template-runpath planned route-2 creations from id/classes alone, so atexthost whose content the compiler folded painted empty whenever the run was ineligible for the dense fast path; the dense arm and the compiled program painted it.planScalarClassAndIdCreationnow writes the content under the dense applier's exact guard. Red-verified: staged mount of a boundtextnode withtext: 'Price'painted nothing → fix → 106/106.host-props.ts, on perf(lynx): fold a compile-time-known text child onto its text host #250) — the command patch wrote any non-nulltextvalue (text: 0painted "0") while dense/emitter write only non-empty strings. The prop now takes the carrier's semantics on every arm: non-string paints empty, create-time empty content makes no call (call-stream identical to dense/emitter), and emptying existing content writes''over the carrier's own channel rather than an attribute removal the public PAPI does not promise. Red-verified:text: 0painted "0" on the command path only → fix → paints empty with zero attribute calls.papi-run.mjs, on test(bench): give the FCP window a reference control #251) — thereact-first-screencell fell back to the raw rows-0 path when the manifest pinned no digest, driving startup/create windows from bytes nothing vouches for. Now refuses, matching the cell's own "not measured" posture for FCP. (This is the F3 held over from the E2 train, landed on the branch that owns the cell.)Fix commits: 791f937 (#251), f2b3950 (#250).
Validation on the candidate tree (432c648 + both heads + fixes)
pnpm typecheckclean; repo-widepnpm format:checkclean;pnpm syncno generated changes.pnpm test: 26,780 passed | 3 failed | 1 skipped (2,451 files), twice with identical failure sets. All three are the documented environment-artifact families, discriminated individually:native-demoprocess-group fails identically on the untouched base 432c648;dreiscreenshot fails in isolation as well as in-suite;suspense-hydrationreal-browser focus restore is the third. None touches a path this train changes (bench harness, lynx host driver/props, compiler fold).packages/lynxhost-driver 106/106 including the two new regression tests.CI — starved third state
Runner pool still starved: the push run for
new-lynx@4081baf73 is queued as run 33351360018-family, id 33351360015. Local validation above stands as the gate evidence; reconcile against this run id when the pool recovers.Sequence
No change. E2 → E3 → E1 stands; #250 closes #242 Cause A at exactly its bound (
papiCreateCalls70k → 60k @10k, zero spread), Cause B remains priced with E1 (#246). #251 gives #247's FCP window its reference control and the ±0.04 ratio resolution. Still open for Train 3: #236 (awaiting the membership-aware projection fix).Generated by Claude Code
Huxpro commentedon Aug 31, 2026
Gate record — CI restoration + Train 3 (9 PRs) →
new-lynx@ 33d9358CI is live again, and it immediately earned its keep
runs-onmoved from the stalled provider label toubuntu-latest. Diagnosis: no provider job had been picked up since run 434 (2026-08-27) — every run since satqueuedforever — while the one job that executed in that window ran on a GitHub-hosted runner and completed in seconds. One-label change, mechanically reversible when the provider account is restored.packages/solana-kit/audit/react-parity.jsonstill carried the pre-rename lane table (46solana-reactreferences) from the chore: sync new-lynx with upstream octane v0.1.47 (d5175ca8) #229 sync-gate merge resolution, turninglint checksand all four React parity shards red. Restored the sync-side table (its state at d5175ca) and restamped via the generator. fix: point solana-kit parity lanes back at the renamed projects #262's CI: 26/26 green — the repository's first fully green run since 2026-08-27.buttonTapTokenlooked for a raw-text carrier that no longer exists), andbench.ymlwas the only consumer, so the gate died silently. Fixed with a sharedtextContentOfreader plus a timeout diagnostic that prints what actually painted; mutation-verified.Train 3, merged in order
#262 → #253 (E3 contract,
it.failsself-inverting) → #256 (E3:mutatednarrowed to what teardown certification actually reads; retargeted tonew-lynx) → #257 (binary-search run lookup, kills the O(rows × runs) cliff) → #252 (heap-retention probe + recipe; catch-up merge pushed) → #258 (edge-graph retainer walk naming the externref table; retargeted) → #236 (painted-element-ceiling decline, with the membership-aware projection fix — held since the E2 train, finally lands) → #259 (recycle host-boundary pin; union conflict with #257's tests resolved on the branch, 41/41) → #261 (undrafted at merge).Review (high) — no correctness findings; three cleanups, fixed on the owning branches
heap-retention.mjsran the expensive--attributeretainer walk on all four captures per repetition while only the median afterClear table is published — now gated to that phase (b0a6fb9, on perf: name the owner of thearray:retention bucket by walking the edge graph #258).projectedParentdeleted —batchParentsstoresnumber | null, so a stored null already returns through the staged check (cf92fc1, on feat: decline a page that would cross Android's painted-element ceiling #236).LYNX_PAINTED_ELEMENT_CEILINGwas@linked as the default an embedder derives from but exported from no public entry — re-exported from./main-thread(same commit).Validation on the candidate tree (byte-identical to merged
new-lynxminus #260's workflow lines)pnpm typecheckexit 0 (clean re-run after discovering a piped exit code had masked a contention-only failure;benchmarks/spa-navigationpasses standalone). Repo-wideformat:checkclean,pnpm syncclean.pnpm test: 26,809 passed | 3 failed | 2 skipped. The three failures are the same documented environment-artifact families as the Train 2 record (suspense-hydration real-browser focus, drei screenshot, native-demo process-group), plus one file-level alien-signals hydration timeout that passes 1/1 in isolation. All discriminated individually; none touches train-changed paths.LYNX_TABLE_SCALES=1000 node run.mjs 1exit 0 with full workload row — red onnew-lynxbefore fix(bench): read a button label from the carrier the text fold left it on #261, green on the candidate.list-recyclingmerged suite 41/41;painted-element-ceiling21/21; perf(lynx): keep a run certifiable for direct teardown after a props write #256's host-driver suite green.CI arbiter
The push run for the final head is run 33407729769 (
new-lynx@33d9358ed), in progress on live runners at record time; intermediate per-merge push runs were concurrency-cancelled as usual. Will reconcile on completion — with working CI this record's third-state clause is retired going forward.Sequence
No change to E2 → E3(done) → E1(frozen behind the §7 ablation). This train lands E3, the retention Orders' instruments and their verdict (the standing retention gap is ~1.17 MiB and attributed to the host's externref table, not Octane's), the run-lookup complexity fix, the ceiling guard, and the recycle-boundary oracle #193's Layer 1 must beat. Still open: #254 (FCP bucket-4 slice, draft — next train's core), and whatever tonight's E1 ablation produces.
Generated by Claude Code
Huxpro commentedon Aug 31, 2026
Train 3 CI reconciliation
Run 540 (
new-lynx@33d9358ed) completed failure on a single root cause:lint checksrejected the three heap-retention records #252/#258 checked in — the probe wrote them with a bare tab-indentedJSON.stringifyinstead ofwriteEvidenceJson, and my local repo-wideformat:check"pass" had been masked by a piped exit code (both holes now closed). Fix: #268 (820ed3d) routes the probe through the evidence writer and rewrites the three records through it, values untouched. #268's own CI: 25/25 green, including the exact job that failed. The post-merge push run onnew-lynx@820ed3de is the standing arbiter; every other job of run 540 was already green. Gate-chain rule going forward: validation commands are never piped — exit codes are checked directly.Generated by Claude Code
Huxpro commentedon Aug 31, 2026
Final reconciliation —
new-lynxis green on live CIRun 547 (
new-lynx@820ed3de) is success on attempt 2. Attempt 1's sole failure wasstreaming-ssr.test.ts:1070— a timer-tolerance assertion (first.at >= EARLY - 5measured 14.05 ms against a 15 ms floor) on a contended runner; the same test passed on #268's PR run, both local full-suite runs, and the rerun, so it is recorded as a one-off scheduling flake, not train content (nothing in any recent train touches streaming SSR). Flagged as a candidate tolerance follow-up for whoever next touches that suite; not edited unilaterally.Standing state:
new-lynxhead 820ed3d, fully green on live CI — the first green push run for this branch since the outage began on 2026-08-27. Trains 2 and 3 (11 PRs), the CI restoration (#260), and both outage-masked defect fixes (#262, #268) are all landed and reconciled.Generated by Claude Code
Huxpro commentedon Aug 31, 2026
Gate record — Train 4: #263 + #264 + #266 + #254 →
new-lynx@ c124594Four measurement PRs, merged in order (all undrafted at merge; all bench/docs surface, no runtime code).
The headline is #263's verdict: the E1 falsification ablation ran, and the create cell does not move. Two arms (conservative walk-removal; aggressive walk+patch removal with a self-reporting
fallbackProps 0coverage counter), work-preserving at the host boundary (host-call counts identical between arms at both scales), strictly more generous than E1 itself. Point estimate 0.2% at 10,000 rows, 95% CI bounding the walk's share under ~4%, p=0.93. Per the #246 §6 ruling, E1 is filed answered-but-dormant: it does not spend the #163 byte-identity promise, and no implementation PR follows. The MTS descriptor walk is not where the create residual lives. #263 also caught and documented a probe-coupled drift trap (instrumented builds showed a "win" that scaled with probe weight; the per-stage split disqualified it) indocs/measurement/e1-descriptor-walk-ablation.md.Also landed: #264 (first-screen prop-memo census — sizes bucket-4's candidate cut and refutes the cheap version before anyone builds it), #266 (stage-harness teardown pair — the update-then-clear arm E3's follow-up owed), #254 (the bucket-4 phase split + profiler repair — #247's instrumentation slice, finally out of draft).
Review (high) — one finding, fixed and hardened beyond the suggestion
Both new build CLIs silently dropped a malformed
--scalesentry (filter(Boolean)ate the NaN) and accepted a negative, building a partial arm whose missing bundle surfaced only as a mid-campaign 404. The review's suggested fix (copypapi-run.mjs's validation) carries the same mixed-input hole, so both files now parse before filtering —--scales 1000,10kthrows instead of building only the 1,000-row bundle. Runtime-verified. Fixes on the owning branches (860a07d on #263 — a force-push replacing only my own gate commit from minutes earlier, nothing of the author's; 6009071 on #264).Two more items of the #268 defect class swept in the same gate: #264's hand-assembled census record was prettier-red (rewritten through
writeEvidenceJson, values untouched), andbts-profile.mjs/papi-floor.mjsstill carried the bare-stringify write the heap-retention probe was cured of — both now route through the evidence writer.Validation (exit codes checked directly — no piping, per the run-540 lesson)
Stage suites
node --test stages/*.test.mjs216/216; repo-wideprettier --check .exit 0;pnpm syncclean; deterministic lynx-table gate green at 1,000 rows.pnpm typecheck/full Vitest not rerun: the diff touches no file any TS project or Vitest project reaches (verified by scope, and the stage tests in the diff ran in the 216). Merged tree is byte-identical to the validated candidate.Sequence
E1 closes the E-train. E2 done, E3 done, E1 answered-but-dormant by measurement — the #230 sequence is complete without an E1 implementation, and the steady-state create residual's owner remains open exactly where #263 leaves it: not the MTS walk. The live line is now #247's bucket-4 (instrument landed in #254; the attribution run against it is the next unit of work), plus the queue's device-bound items. Open drafts: none from this campaign — the board is clear for the next batch.
Generated by Claude Code
Huxpro commentedon Aug 31, 2026
Train 4 reconciliation — green
Run 563 (
new-lynx@c124594c7, push) is success (attempt 2; attempt 1 hit the same known streaming-ssr timer flake noted on the Train 3 record).new-lynxis green on live CI at the Train 4 head. Overnight chain closed: 4 trains / 15 PRs merged and reconciled, CI restored, E-train complete. No open campaign PRs remain.Generated by Claude Code
Huxpro commentedon Aug 31, 2026
Correction to the Train 4 reconciliation above
I wrote that run 563's attempt 1 "hit the same streaming-ssr timer flake" — that was an assumption, and it is wrong. Attempt 1's actual failure was React parity shard (3/4) (plus its aggregators); it passed unchanged on attempt 2, so it remains a one-off runner flake, but of a different family than the run-540 one. The conclusion stands (
new-lynx@c124594c7 green on live CI); the mechanism label in the previous comment does not, and this note replaces it.Generated by Claude Code
Huxpro commentedon Sep 2, 2026
Gate record — Train 5: #269 + #270 + #271 + #272 →
new-lynx@ a185269The implement-first batch, gated on correctness only per the #246/#247 owner directives. Merged in order: #269 (E1
mount-program-run+ B2 as one ABI: package-relative address, realm-local registry, Rspack cross-compile drift gate, isolated-graph refusal, #238's tests converted per §5) → #270 (first-screen handle minted on demand) → #271 (direct first screen adopts its frozen prop bag; the one cut the web lane resolves, −28.9% interleaved, 4/4 non-overlapping) → #272 (a create stops diffing against nothing; ~160k calls and 40,002 allocations removed). #271/#272 retargeted tonew-lynxat merge; all four undrafted at merge. Merged tree byte-identical to the validated candidate.Review (high) — two findings, fixed on #269's branch (c949e6f)
registerUniversalProgramtolerated re-registration only by plan object identity, but every module re-evaluation (HMR, a chunk under two ids) mints a fresh plan object — the tolerance's own target cases all threw the two-programs TypeError. Now structural over the wire (the surface the address digest covers): equal → no-op keeping the first registration so memoization survives; different → still refused, and the pinned refusal test stays green.The new acceptance criteria, applied
Both #272-derived amendments (#246 issuecomment-5505482799) were checked against #269 and pass: the addressed run is mounted by the same body that mounts a descriptor run — the implementation has exactly one divergent line, and says so — and the suite carries direct oracles that do not route through the differential (refusal-message pins, freeze/memo assertions, resolver validation, the re-registration test).
Validation (exit codes checked directly)
pnpm typecheckexit 0 repo-wide;format:checkexit 0;pnpm syncclean; deterministic lynx-table gate exit 0 at 1,000 rows. Fullpnpm test: 26,850 passed | 5 test-failures | 4 file-failures, every one discriminated: seven are the documented environment families (suspense-hydration focus, drei screenshot, native-demo process-group, web3-island ×2 / aria / alien-signals beforeAll timeouts),monaco-editor-browserwas base-reproduced by the author with the diff absent, andsyntax-highlighternegative-controls passes 1/1 in isolation (contention). No failure touches train-changed paths.Sequence
The compiled-create and publish lines are both implemented and landed. Performance and regression verdicts are deliberately deferred to the device round per the operating mode — web-lane numbers in the PR bodies are labeled indicative with their method (
ablation/interleaved), and the one resolvable web signal (#271's −28.9%) is interleaved and non-overlapping. Next: the capture-deferral directive (#247 issuecomment-5505266187) is issued and unstarted; the device round runs against this head (plus capture when it lands) for the final oracle pass.Generated by Claude Code
Huxpro commentedon Sep 2, 2026
Train 5 CI reconciliation — green on the first attempt
Run 578 (
new-lynx@a1852691c, push): success, no reruns needed. The implement-first batch (E1+B2, publish stack) is landed, validated locally, and green on live CI. Standing head for the device round.Generated by Claude Code
Huxpro commentedon Sep 2, 2026
Train 6 gate record — #273 capture-after-paint
Merged: #273 →
new-lynx@ b230f8a (method merge, undrafted at merge time). Head merged was 371942c = Opus's 1202d91 + its own base-merge ofnew-lynx@a1852691c+ one gate fix.Review (
/code-review highon the full base…head diff): the PR's fence design — every reader of first-screen state in the deferred-capture gap brings capture forward viaensureFirstScreenCaptured()— was sound for the five readers it named (tap, snapshot accessor, inbound commit, unmount, close), and the #231/#233canAnnounceReadyfence reuse checked out. Two readers were missing from the list, both confirmed against source:markFirstScreenSyncReadyin the gap read the still-openstate as "nothing rendered", settled a painted screen asskipped, and announced readiness with no first tree — the background would repaint the page over the one on the glass, and the still-armed timer would later capture the stale source and flip the state back topainted.root.render()in the gap passed the one-shot guard (state stillopen), appending a second tree onto the painted page instead of taking the deterministic one-shot throw the pre-change order gave.Fix (371942c, on the PR branch): both entry points now take the same fence before reading the state. In
markFirstScreenSyncReadythe fence runs beforefirstScreenSyncReadyflips, so the capture's own announce attempt stays withheld and the mark's announcement is the single one that goes out, carrying the tree.Tests: two red-verified additions to the new gap suite. The sync-ready test needed one oracle correction along the way: the unsolicited
main-readynever carriesfirstTreeby design (it rides the first correlated reply), so the first version of the test passed on the broken code — the committed version sends a correlated ready request and asserts the reply carriesfirstTree, and was seen red before the fix. Both red pre-fix;first-screen.test.ts49/49 after.Validation (all exit-code-checked, on the merge candidate
new-lynx@a1852691c+ head — byte-identical to the merged tree):pnpm typecheckexit 0 (note:typecheck:filesonfirst-screen.test.tsstandalone reports pre-existing context errors at lines 615–1107 far from the diff; the repo-wide project check is the gate and is clean)pnpm formatclean on changed files;pnpm syncno generated changespnpm test: 26,874 passed / 3 failed / 1 skipped. The 3 are the documented container-environment families (suspense-hydration focus restore, drei screenshot, native-demo process-group), none underpackages/lynxor any changed file — same signature as prior train records.Mode: implement-first — correctness-only gate, no perf oracle. The FCP verdict for this cut belongs to the device round; the web lane runs the
immediatearm and cannot see it, per the PR's own methodology note.Push-CI reconciliation for
new-lynx@b230f8a77to follow.Generated by Claude Code
Huxpro commentedon Sep 2, 2026
Train 6 CI reconciliation — green on the first attempt. Run 583 (push of
new-lynx@b230f8a77, the #273 merge): success, attempt 1, no reruns needed. No new implementor activity past #273 — no open PRs beyond it and no further commits to the merged branch.new-lynx@b230f8a77stands as the head for the device round.Generated by Claude Code
Huxpro commentedon Sep 3, 2026
Device baseline landed — #274 merged, three follow-ups filed
Merged: #274 (docs-only, the LepusNG
b230f8a77device baseline + sanitized evidence) →new-lynx@8a30448d2. Scope-checked: exactly 13 files, all underdocs/reports/lynx-b230-lepusng/.What the baseline says: no Octane create/FCP/clear milliseconds exist yet — not because anything measured slow, but because three preconditions failed on device. Filed in priority order:
mount-program-runis on the wire remains unknown; static E1 registration IS verified on device: digests match both sides,bindCount/createCount/mountCount = 1on the resident-program first screen).loadBundlepipeline Performance entry, so device FCP is structurally unmeasurable (ReactLynx reference baselines are now on file: FCP@0 57.4 ms, FCP@1k 1389.2 ms medians, n=6).setTimeoutrung fires ~1.85 ms before the firstDoFrameon LepusNG — deferral runs, "after paint" not achieved, win not collected.scheduleFirstScreenCaptureneeds a frame-anchored rung.The 150 vs 338 ms question and every scoreboard claim stay open until #275 unblocks the dynamic cells. Standing head:
new-lynx@8a30448d2.Generated by Claude Code
Huxpro commentedon Sep 4, 2026
Train 7 gate record — #279 (tap blocker) + #280 (loadBundle FCP timing)
Merged: #279 → 6bc1dfe, then #280 →
new-lynx@ac9bb9286(method merge, undrafted at merge time). The merged tree is byte-identical to the locally validated candidate.#279 (
fix(lynx): decline addressed runs for runtime ranges, closes #275): the device tap blocker was never the event path — the native tap reached the background and scheduled the create; the version-2 commit was then rejected by protocol validation: the background producer carried arity 3 per row while the resident main-thread wire had arity 1, because two unproved text holes stayed compiled-create ranges. The fix refuses E1 addresses for range-bearing programs (background mounts fall back to the descriptor), keeping strict validation instead of widening it. Consequence worth stating for the scoreboard: the benchmark row shape is currently not addressable, so device create cells exercisemount-template-rununtil either the fixture proves its text scalar or E1 grows a range-aware resident form — deliberately left to follow-up perf work./code-review high: one finding — theUniversalProgramPlan.wirespec comment didn't carry the new range-free condition; fixed in 80febb7 (comments are the design spec here).#280 (
feat(lynx): publish loadBundle first-screen timing, closes #276): retains native's own pipeline identity from__RenderPageand hands it to the one first-screen flush; first real device FCP entries exist (0/1k/10k; FCP@1k 1416.6 ms vs the ReactLynx reference 1389.2 ms — one-shot acceptance observations, not a formal comparison)./code-review high: two findings, both fixed red-verified in c7031a9:pipelineOptionsparse ran inside the same try as the page-data dispatch, so a malformed pipeline identity also lost the initial page data__RenderPagehas always delivered. The parse now settles in its own try — diagnostic reported, pipeline null, page data still dispatched.prepared.apply(flushOptions)forwarding to the page flush verbatim (red-verified by deliberately dropping the forwarding), covering the staged-fallback leg.Validation (exit-code-checked, on the exact merged tree): repo-wide
pnpm typecheckexit 0 (the "legacy--filtertypecheck" error #280's body mentions is not part of the root gate),pnpm syncclean, fullpnpm test26,878 passed / 3 failed — the same three documented container-environment families as the Train 6 record (suspense-hydration focus, drei screenshot, native-demo process-group), none under any changed surface.Standing head for the device re-run:
new-lynx@ac9bb9286. #275 and #276 close with this train; #277 (frame-anchored capture rung) has a design-recon comment and stays open; #278 (native attribution benchmark) is now unblocked on both gates it named.Push-CI reconciliation to follow.
Generated by Claude Code
Huxpro commentedon Sep 4, 2026
Train 7 CI reconciliation — green on the first attempt. Run 598 (push of
new-lynx@ac9bb9286, the #280 merge): success, attempt 1. Run 596 (the intermediate #279 merge commit) shows cancelled — superseded by the #280 push seconds later under the workflow's concurrency group, which is expected for back-to-back train merges; the surviving head is fully green. No implementor activity past #280, and #278 has no attribution results yet.new-lynx@ac9bb9286stands as the head for the device re-run and the #278 attribution round.Generated by Claude Code