Skip to content

No vitest project ever executes target: 'lynx' output at runtime — the L1 × L3 pair production ships has zero committed coverage #87

Open

Description

@Huxpro

Found by the completeness critic of the adversarial audit of #58, at stack head 5d000b30e.

Every .tsrx fixture in the lynx suite compiles under target: 'universal'

  1. vitest.config.js:4145-4153 — the lynx project's plugin is octane({ renderers: lynxRspeedyRenderers, ssr: false }).
  2. lynxRspeedyRenderers is aliased to lynxRspeedyBackgroundRenderers (packages/lynx/src/config.runtime.js:281), whose renderer carries target: 'universal' (config.runtime.js:219).
  3. grep -rn "target: 'lynx'" packages/lynx/tests/ packages/rspeedy-plugin-octane/tests/ → zero hits.
  4. grep -rn "kind: *'template'" packages/lynx/tests/ packages/lynx/src/ packages/octane/tests/ → hits only in packages/lynx/src/main-renderer.ts (the consumer) and packages/octane/tests/lynx-target-templates.test.ts (a compile-output test that never touches host-driver.ts).

So applyLynxFirstScreenDirect has never been run against a template-encoded plan. L1 (#63) and L3 (#65) are each tested in isolation; the pair that production actually ships is untested.

Production does ship it

The unminified native main.lynx.bundle from the real Rspeedy application pipeline carries the L1 slot-kind table and create-function locals verbatim in its string table:

_h$0_h$1,__octaneUniversalPlan0App_App(static/svg/badge.svg
card-EbFSarcardp:classe:bindtap6p:main-thread:bindlongpress"p:main-thread:ref
p:srcc"tf_1x0jlh812sweb4App.tsrx8@octanejs/lynx/main-rendererNative bundlen0n1n2milestone-five

p:class, e:bindtap, p:main-thread:ref, c are exactly lynxTemplateSlotKinds output; n0 n1 n2 are the create-function locals. The same run reports mainBytes=257207 gzip=119944, with renderPlanNode, applyLynxFirstScreenDirect, and renderFirstScreenNow each present once — interpreter and direct applier both shipping, as L3 intends.

This is the failure mode the repo already documents

vitest.config.js:378-386, explaining why the octane-prod project exists:

"without this project the prod compile branch has ZERO runtime coverage — which is how the 2026-07-08 bare-Symbol() slot regression shipped past 2,400 green tests and broke website hydration on every route."

There is no lynx-target or lynx-prod analogue. The same structural hole exists again, one layer over.

The missing differential, run manually — clean on the shapes tried

Reported as the honest result, not a defect claim. Four cells (target lynx|universal × applier direct|staged), comparing full PAPI journal, physical tree, and adoption snapshot:

### PLAIN                            templatesInLynxOutput=2
lynx+staged: journalLen=47  journal==base:true   tree==base:true  snapshot==base:true
lynx+direct: journalLen=47  journal==base:false  tree==base:true  snapshot==base:true
### BRANCHY (@if + hidden Activity)  templatesInLynxOutput=5
lynx+staged: journalLen=51  journal==base:true   tree==base:true  snapshot==base:true
lynx+direct: journalLen=49  journal==base:false  tree==base:true  snapshot==base:true

lynx+X is byte-identical to universal+X for both appliers; the only journal difference is the already-adjudicated direct-vs-staged create/insert interleave.

So this is a coverage gap, not a live defect — but #70 demonstrates the pair does break under @catch, and with zero coverage the next such break ships silently.

Suggested direction

Add a lynx-target vitest project running packages/lynx/tests/** with octane({ renderers: lynxRspeedyMainThreadRenderers, hmr: false, ssr: false }), mirroring the existing octane/octane-prod pairing. Expected to be cheap — the whole lynx suite is node-environment, and the rspeedy production build itself completes in ~2 s on this host.

Verification performed

Executed at HEAD 5d000b30e; probe sources and outputs preserved. Not independently re-run by me; no adversarial refuter has adjudicated it.

Activity

  1. added
    bug
    on Aug 18, 2026
  2. added a commit that references this issue on Aug 19, 2026
  3. Huxpro commented on Aug 21, 2026

    @Huxpro
    OwnerAuthor

    Re-audited this at new-lynx tip 6f9b1807. Status has moved since filing, and the remaining gap is narrower but real.

    What is already closed

    packages/octane/tests/lynx-target-first-screen.test.ts exists and runs the 2×2 this issue asked for — one fixture compiled at both targets, painted through both appliers, comparing tree, adoption snapshot, and batch length, with a premise guard asserting the two encodings actually differ. packages/lynx/tests/_fixtures/fake-element-papi.ts was extracted to a fixture specifically so the octane project could drive the same host while compiling at target: 'lynx', which the lynx project cannot.

    The suggested direction in the issue body — a whole lynx-target vitest project mirroring octane/octane-prod — was not taken. What landed instead is narrower: one fixture in the octane project. Worth noting explicitly, because it means the lynx suite's other 36 files still run only target: 'universal'.

    What is still open

    The four greps in the body were re-run. Item 3 now has one hit — a comment in the fixture, not a compile — and item 4 has one more, first-screen.test.ts, which constructs a kind: 'template' node by hand rather than compiling one.

    The substantive residual is the native <list> path. applyLynxFirstScreenDirect learned to build native lists in #66 C3, and #119–#126 extended that further; every test of that work hands the applier a hand-authored plan object. So the <list> the create-function encoding produces had never been painted — this issue's own thesis, one layer further in, on the newest first-screen code in the package.

    It is reachable, checked against the compiler rather than assumed. lynxTemplateEligible lowers a whole plan root or none of it, and refuses any tree carrying a ref:

    fixture what lowers env.h types in the lynx output
    <list> under a <view>, no ref anywhere root plan and rows view, list, text, list-item
    same, ref on the <list> rows only; root stays a plan list-item, text

    The second row is the shape examples/gallery ships.

    Covered by #134

    Both fixtures, each through the 2×2 of target × applier, comparing painted tree, adoption snapshot, first-tree journal, published update-list-info, and a cell materialized through the platform's own componentAtIndex.

    No defect found — all four cells agree on both fixtures, which matches the manual differential recorded in the body. Reported as the honest result: this is coverage for a pairing that had none, not a bug fix. The oracle was verified red by ablating TEMPLATE_ENV.p alone, since a change affecting both encodings equally is invisible to an encoding differential by construction.

    Still uncovered at this pairing

    Leaving this open on that basis rather than closing it on #134.


    Generated by Claude Code

  4. Huxpro commented on Aug 21, 2026

    @Huxpro
    OwnerAuthor

    Correction to the "still uncovered" list above: the first item is now covered in the same PR.

    lynxTemplateEligible refuses a bare ref binding and says nothing about a namespaced one, so a main-thread:ref plus a main-thread event lower into the create function with slots ["p:main-thread:ref", "p:main-thread:bindtap"] — the first of which is verbatim what the production bundle string table quoted in the body carries. Universal emits no template for the same source.

    Every committed test of that wiring hands the driver a hand-written {_wvid}/{_wkltId} descriptor, so the worklet the compiler actually emits had never been painted. #134 now compiles one and runs it through the same 2×2, asserting the descriptor lands on the node and that its capture is the same ref cell the prop bound — cell agreement alone would not catch a tree that wired nothing. Verified red by dropping main-thread:ref in TEMPLATE_ENV.p. No defect: all four cells agree.

    Still open, unchanged: @catch (deliberately left to #70, whose fix is blocked on which evaluation order is canonical — a coverage PR should not pre-empt that), and the whole-lynx-target-project suggestion in the body.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-authoredbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions