Repository navigation
Description
Found by an adversarial audit of the #58 L0–L3 equivalence claims. Pre-existing — verified by executing the same repro against a copy of base 6079a6804, where it fails identically. Not #64 drift. Filed because it silently loses user input, and it reaches the DOM runtime, not just the universal/Lynx path.
Root cause
packages/octane/src/universal-core.ts:5214-5232:
const transition = universalTransitionBatchForUpdate();
...
if (transition === null && record.visibility === 'suspense-hidden' && parked !== undefined && parked.generation === committed.generation)The retained-hidden fast path requires transition === null. With any async transition pending — anywhere in the app, unrelated to this component — the gate at :5218 fails and the edit falls through to stageUniversalTransitionUpdate at :5259. When the replacement source finally commits, the generation check at :5252 discards it.
No re-render, no error, no trace.
Consumer impact
A user typing into a useLinkedState-backed field while a Suspense boundary shows a fallback loses those keystrokes if any async transition is still in flight elsewhere — a concurrent startTransition(async () => …) navigation or filter is enough. The two conditions are independent, so the app author has no local reason to expect interference.
The audit also reports the equivalent DOM-runtime scenario is lossy and additionally leaves getValue() stale: the DOM shows draft:B while getValue() returns draft:A!, persisting across two further renders. So the third tuple member — which docs/differences-from-react.md documents as one of Octane's deliberate divergences — disagrees with what is on screen.
Attribution, established by head-vs-base differential
Rather than trusting a worktree run, the lens dropped git show 6079a6804:packages/octane/src/universal-core.ts into packages/octane/src/zz-probe-c3-base-core.ts (same directory depth, so its relative imports resolve) and ran the same 12 linked-state scenarios against both module instances in one process. Base fails identically:
× c3 repro ON BASE 6079a6804: keeps the edit when an unrelated async transition is pending
-> expected 'draft:B' to be 'draft:B!'
Scenarios covered: ordinary useState alongside useLinkedState in one retained component; abandonment of the hidden source with both cells edited; a parked edit followed by a non-suspending render; generation bookkeeping across two consecutive retains.
Suggested direction
The transition === null condition at :5218 conflates "this update is transitional" with "any transition batch exists". A pending unrelated transition should not disqualify a retained-hidden linked-state edit from the parked path. If the coupling is deliberate, the discard at :5252 should at minimum not be silent.
Related
- Companion coverage finding: the refactor(universal): extract the host-neutral hook-cell kernel (issue-58 L2 spike) #64 guard suites execute zero statements of the linked-state hook, so no existing test would catch a regression here either.
Verification performed
Executed with captured output, including the head-vs-base in-process differential above. I did not independently re-run this one; it rests on the finding agent's executed evidence plus the source reading. Adversarial refuter panel had not adjudicated at time of filing.
Activity
Huxpro commentedon Aug 18, 2026
Withdrawing this — the trigger is unreachable from the claimed source, the behaviour is test-pinned, and the polarity is inverted
A dedicated reachability audit took this apart. Every load-bearing claim in the issue fails, and the one that survives points the other way.
1. A keystroke cannot reach it
The claim was "a user typing into a
useLinkedStatefield loses keystrokes." It cannot:inputis discrete, and discrete depth forces the urgent path (runtime.ts:993,universal-core.ts:4876). The mechanism is reachable only from a deferred setter — a debounce timer, a post-await continuation, a subscription callback, or an effect.Nor can the user see it happen: the retained-hidden subtree is
display: none !important, so the field is off-screen for the entire window in which the discard occurs.The auditor built the most ordinary triggering app it could — a compiled
.tsrxmaster-detail editor with a debounced autosaving title field, driven through a realcreateRootDOM root with real click andinputevents. It typechecks (tsrx-tsc --noEmitexit 0, with an injected-error sanity control proving the checker read the file). Reaching the mechanism still required a debounce timer firing after the boundary hid.2. The polarity is inverted — my proposed fix causes data corruption
The same end-to-end app, run both ways:
The generation check I blamed at
:5252is precisely the guard that stops an abandoned-source draft from being replayed, and it says so in its own comment (universal-core.ts:5245-5251): "An old lane may still carry its former base state; replace it with the newly committed value instead of replaying a draft that belonged to the abandoned source."3. It is intentional and test-pinned
Two passing committed tests pin the discard as designed, both present on base:
packages/octane/tests/linked-state.test.ts:680—it('discards an old transition before parking a new source behind Suspense')packages/octane/tests/linked-state.test.ts:712—it('discards an unfinished transition update when its source changes urgently')Suite is 25/25 green at HEAD. The entangling of a non-discrete update into the in-flight batch is also a documented deliberate approximation (
runtime.ts:990-993: "AsyncContext is not available in the browser target, so post-await Action continuations share the one entangled in-flight batch").4. Pre-existing, with a provenance discriminator
universalLinkedStateHookis byte-identical base→HEAD (192 lines, emptydiff); the gate is a pure line shift from base:5269to HEAD:5218.packages/octane/src/runtime.ts— which owns the DOM behaviour I called lossy — is untouched by the entire stack. The DOM gate blames to87cce2f69, confirmed an ancestor of base. A base-worktree run reproduces identically, with a provenance discriminator proving base code actually executed.What survives, if anything
At most a low-severity path-consistency question:
useLinkedStateresolves an edit against a retained-hidden parked draft differently depending on whether an unrelated async transition batch happens to be open — the parked fast path preserves it, the staged path drops it. Pre-existing, invisible to the user, and out of scope for an issue-58 stack audit.What went wrong on my side
This is the fourth withdrawal in this audit and the first to hit all three failure modes at once: unreachable from the source I described (#72's shape), intentional and test-pinned (#73's shape), and polarity inverted so that my fix would cause harm (#82's shape). I filed it on an agent's in-process differential — which was sound for attribution and said nothing about reachability — and I flagged at the time that I had not re-run it. That caveat was the tell, again.
I had this ranked first or second in the triage list I gave the maintainers. It should not have been on the list.
Closing as not-planned.
Generated by Claude Code