Repository navigation
Description
Found by an adversarial audit of the #58 L0–L3 equivalence claims, against the #65 stack head 2fe14465f.
Pre-existing, not a regression from the stack. Both the lynx and universal encodings behave identically here, so this is not a counterexample to #63 — it is a defect in the shared first-screen path that the audit surfaced while probing that claim.
Root cause: two different classifiers decide "is this an event prop"
- The compiler erases first-screen event callbacks using the renderer's glob list
firstScreenEvents(bind*,catch*,capture-bind*, …) —packages/lynx/src/config.ts. lynxTemplateSlotKindsandlynxTemplateCreateStatementsAstclassify the same prop with the regexLYNX_EVENT_PROPatpackages/octane/src/compiler/compile-universal.js:3918, which additionally requires[A-Za-z]+after the prefix. The renderer'seventPriorityuses the same regex (packages/lynx/src/main-renderer.ts:625).
Names like bind-tap, catch-tap, and bind1 match the glob and fail the regex. The callback is erased to the FIRST_SCREEN_EVENT sentinel Symbol by (1), then treated as an ordinary prop by (2), so the Symbol is written straight into the host props bag and no event is ever installed.
Reproduction
Executed, <view class="page" NAME={props.onTap} /> compiled under both targets:
bindtap slots=["e:bindtap"] symbolProps=0 eventCmds=1 <- correct
bind-tap slots=["p:bind-tap"] symbolProps=1 eventCmds=0
bind1 slots=["p:bind1"] symbolProps=1 eventCmds=0
catch-tap slots=["p:catch-tap"] symbolProps=1 eventCmds=0
Identical on target: 'lynx' and target: 'universal'. Note JSON.stringify omits Symbol values, so the create command's props look clean in a serialized dump — symbolProps counts the own properties whose value is a Symbol.
Consumer impact
<view bind-tap={handler}> compiles with no diagnostic — the renderer's own hostProps allowlist admits it through the bind* glob — and then the handler silently never fires. It is neither installed as an event nor preserved as a prop; it is erased and replaced by an internal sentinel.
Whether bind-tap is a real Lynx event name is beside the point: the framework currently accepts the prop, destroys the callback, and reports nothing. It should either install the event or reject the name at compile time.
The leaked Symbol(octane.lynx.first-screen-event) in the create command props is a second problem — a renderer-internal marker crossing the wire in a position the protocol does not describe.
Additional consequence for L2
The slots table is the interface #63 declares for the future L2 patch applier (docs/lynx-specialized-target-l0.md §3.3–§3.4). It currently declares slot 0 as "p:bind-tap" for a value the compiler already treated as an event. An L2 applier trusting that table would patch a prop whose value is an internal Symbol rather than installing a listener.
This is latent today only because renderTemplate never reads node.slots (packages/lynx/src/main-renderer.ts) — the table is emitted but unused on the first-screen path, so nothing currently validates it against what create() actually does.
Suggested direction
Single-source the classification. Either derive LYNX_EVENT_PROP from the renderer's firstScreenEvents globs, or have the erasure step use the same regex, so a name cannot be an event for one stage and a prop for the other. A compile diagnostic for event-shaped names that match the glob but cannot be installed would close the silent-failure path.
Verification performed
Reproduced independently of the finding agent across both compile targets. No red test is committed for this on claude/octane-issue-58-adversarial-audit: that branch is scoped to counterexamples against the stack's equivalence claims, and both encodings agree here, so it is not one.
Activity
Huxpro commentedon Aug 18, 2026
Correction: severity overstated — no type-valid
.tsrxcan trigger thisA refuter attacked the reachability claim in this issue and it does not hold. The mechanism is real and reproduces exactly; the consumer-impact framing was wrong.
What I got wrong
The issue says
<view bind-tap={h}>"compiles with no diagnostic". True ofcompile()in isolation — and misleading about the actual authoring workflow.CLAUDE.mdmandatestsrx-tsc --noEmitfor any program containing.tsrx, and it rejects every triggering name:The error fires on unannotated components too — the JSX intrinsic prop check is independent of the props annotation — so skipping the annotation does not buy the fixture back.
The desync cannot be reached by any declared name
LynxStandardEventProps(packages/lynx/src/native-types.ts:170-204) enumerates 34 event names × 5 prefixes = 170 props, built from explicitLynxPrefixedEvent<'name', Type>members. I verified directly: there is nobind${string}index signature anywhere inLynxStandardProps.The refuter ran all 170 declared names through both matchers — the compiler's
hostPropMatchesagainst thefirstScreenEventspatterns, and the renderer'sEVENT_PROP— and found zero disagreements. The desync fires only on names whose suffix is empty or contains a non-letter (bind,bind1,bind2d,bind-tap,global-bind), every one of which is outside the declared prop set.The custom-element escape is also closed by default:
packages/lynx/src/intrinsics.ts:279shipsexport interface LynxCustomIntrinsicElements {}— empty — so that route needs a consumer augmentation declaring a function-valued prop that is not a Lynx event. That is a fixture the reporter must invent, not one Octane hands anyone.Detail the original report under-stated
The sentinel does reach
papi.setAttribute— my dump hid it becauseJSON.stringifysilently drops symbol-valued entries. AString()-based dump showsattrs={bind1: Symbol(octane.lynx.first-screen-event)}. So the leak is real where it fires; it just cannot be made to fire from type-valid source.What survives
slotstable contract for the future L2 applier is still wrong for such names ("p:bind-tap"for a value the compiler already treated as an event).tsrx-tsc, or any futurebind${string}index signature added toLynxStandardProps, re-opens it immediately.Revised severity
Not a live silent-failure for a consumer following the documented workflow. Treat as hardening / latent-inconsistency, ranked below #70, #81, #82, #83, and #84 — all of which fire on ordinary, type-valid code. The suggested fix is unchanged and cheap: single-source the classification so a name cannot be an event for one stage and a prop for the other.
The attribution in the original report stands — the fix belongs in the compiler/renderer matcher pair, not in either applier.
Generated by Claude Code