Skip to content

docs: answer the L6 ABI decision — the Lynx-only universal surface stays - #116

Merged
Huxpro merged 5 commits into
new-lynxfrom
docs/lynx-l6-abi-decision
Aug 21, 2026
Merged

Huxpro merged 5 commits into
new-lynxfrom
docs/lynx-l6-abi-decision

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

Issue #66 Phase E (#58 L6). Stacked on #115; review the last commit only.

#58's L6 proposes deleting the Lynx-only capabilities and compensation layers from octane/universal once the specialized target has replaced the universal Lynx path. This inventories that surface and returns the decision, instead of performing the deletion.

The inventory, taken on origin/new-lynx 5d61724:

side Lynx-only Three-only shared
compiler capability strings template-program-mount, class-name-alias, thread-functions, main-thread-render-only local-host-callback, portal visibility
driver capability flags templateMount, collapsedTemplateMount, templateProgramMount, templateProgramRuns, stableStaticHostProps, lazyPublicInstances localHostCallbacks, compilerLeafProps text, visibility
commands mount-template-run and its coalescing path — the rest

Nothing is removed, and the reason is not Phase D's NO-GO. The specialized target never replaced the descriptor ABI. lynxMainThreadRenderer is target: 'lynx', but it lowers only eligible host-only templates into create functions and otherwise keeps the descriptor ABI — its own config comment says so — and the background half of the same path is lynxBackgroundRenderer at target: 'universal', which is the renderer that declares template-program-mount. Both halves of the shipping Lynx path run through octane/universal, so this surface is load-bearing whatever the cutover decides.

That reorders the milestone. #58 makes the removal downstream of the L5 cutover. It is really downstream of a background core that stops speaking the descriptor ABI at all — the Block-over-wire core from #103, behind a per-root flag today. Both preconditions are open, and they are independent: resolving the cutover would not make the deletion safe, and making the block core the default would, whatever the cutover said.

Why

L6 is the one milestone in #58 whose work is a deletion, so getting its precondition right matters more than usual — deleting on the stated trigger would break the shipping path. The inventory is also the thing a reviewer needs to check that claim rather than take it.

Changes

  • docs/universal-renderer-architecture.md §9: a "Template programs" row in the capability table, and a new Renderer-specific capability inventory subsection carrying the tables above, the removability argument, and the Three answer.
  • docs/lynx-specialized-target-l0.md: §9's carried open question struck through and answered; a §8 landed-increment entry.
  • docs/lynx-native-renderer-plan.md: a risk-table row recording the Lynx-only ABI surface and its real gate.

The carried open question, answered: Three does not want slot tables

Three declares none of the template capabilities and its driver has no mount-template-run arm, so it cannot receive them today. It has no boundary to amortize a collapse across — the driver runs in the host's own realm, and the package's only transport reference is a guard refusing one portal case.

The headroom settles it. node benchmarks/bench.mjs --only three-renderer --ratios, medians of n=20:

op octane r3f 9.6.1 plain three
mount_1k 7.725 ms 10.090 ms 4.115 ms
update_1k 1.670 ms 2.110 ms 0.160 ms
reorder_1k 4.975 ms 5.770 ms 1.195 ms
unmount_tree_1k 2.520 ms 5.280 ms 0.860 ms
reconstruct_dispose_1k 7.030 ms 7.875 ms 3.235 ms
reconstruct_component_dispose_1k 7.310 ms 6.710 ms 3.305 ms
frame_1k_subscribers 0.133 ms 0.182 ms 0.140 ms
raycast_event 0.627 ms 1.425 ms 0.231 ms

53% of the biggest creation cell is Three's own object construction, an irreducible host floor. The entire declarative overhead above it is 3.6 ms per 1,000 objects, and slot tables reach only the descriptor share of that — never the component and hook execution. Octane already leads r3f on seven of eight operations. Against a mechanism that costs Lynx +1,721 B of main-thread gzip (#114) plus a compiler backend and a second driver path, that is not a trade Three should take.

Validation

Documentation only; no package source changes, so no changeset.

  • pnpm format:check — via pnpm format:files:check over all three changed paths
  • pnpm sync — clean, no generated changes
  • pnpm typecheck — not run; no TypeScript in this diff
  • pnpm test — not run; no code under test in this diff
  • measurement evidence: node benchmarks/bench.mjs --only three-renderer --ratios driven end to end, n=20
  • inventory evidence: every capability in the tables traced to its gate site in compile-universal.js / universal-core.ts and to its declaring renderer config or driver

Risk / follow-ups

  • An unrelated ratio guard breached during the Three run and is reported rather than buried: three-renderer reconstruct_component_dispose_1k at octane/r3f 1.07× against maxRatio 1. It is not from this stack — packages/three, packages/octane/src/universal-core.ts, and benchmarks/three are byte-identical between origin/new-lynx and this head — and it is below the measurement's own resolution on this host, where the two scores carry 14.7% and 11.9% RME. It needs a quiet-host same-window check before it means anything.
  • The deletion this milestone describes still has to happen eventually; the follow-up on the universal ABI's remaining scope is filed separately.
  • The Three answer is a decision on present evidence. A transported Three root would change the premise, and nothing in the package establishes one today.

Provenance

  • An agent produced this diff (agent-authored)

Generated by Claude Code

Phase E of issue #66. #58's L6 proposes deleting the Lynx-only capabilities and
compensation layers from octane/universal once the specialized target has
replaced the universal Lynx path. This inventories that surface and returns the
decision instead of performing the deletion.

The inventory, taken on origin/new-lynx: four compiler capability strings
(template-program-mount, class-name-alias, thread-functions,
main-thread-render-only), six driver flags (templateMount,
collapsedTemplateMount, templateProgramMount, templateProgramRuns,
stableStaticHostProps, lazyPublicInstances), and the mount-template-run command
with its coalescing path. Against that, Three declares localHostCallbacks,
compilerLeafProps, and portal, and both share text and visibility.

Nothing is removed, and the reason is not Phase D's NO-GO. The specialized
target never replaced the descriptor ABI: lynxMainThreadRenderer lowers only
eligible host-only templates into create functions and otherwise keeps it, and
the background half of the same path is lynxBackgroundRenderer at
target: 'universal' — the renderer that declares template-program-mount. Both
halves of the shipping path run through octane/universal, so this surface is
load-bearing whatever the cutover decides.

That reorders the milestone. #58 makes the removal downstream of the L5
cutover; it is really downstream of a background core that stops speaking the
descriptor ABI at all — the Block-over-wire core from #103, behind a per-root
flag today. Both preconditions are open and they are independent.

Answers the carried open question in the L0 spec: Three does not want slot
tables. It declares none of the template capabilities and its driver has no
mount-template-run arm; it has no boundary to amortize a collapse across, since
the driver runs in the host's own realm. mount_1k in benchmarks/three at n=20 is
7.7 ms for Octane against 4.1 ms for plain Three, so 53% of the biggest creation
cell is Three's own object construction and the whole declarative overhead above
that floor is 3.6 ms per 1,000 objects — of which slot tables reach only the
descriptor share. Octane already leads @react-three/fiber 9.6.1 on seven of the
suite's eight operations.
@Huxpro
Huxpro changed the base branch from docs/lynx-l5-cutover-gate to new-lynx August 21, 2026 20:25
@Huxpro
Huxpro marked this pull request as ready for review August 21, 2026 20:25
@Huxpro
Huxpro merged commit 151fac2 into new-lynx Aug 21, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants