Repository navigation
Description
Found by an adversarial audit of the #58 L0–L3 equivalence claims, against the #65 stack head 2fe14465f.
#64's zero-drift claim itself survived this audit — no behavioral drift was found. What did not survive is the evidence for it. Two load-bearing behaviors can be destroyed with the entire declared oracle green, which matters because #66 §3 A2–A3 plans the remaining kernel extraction against exactly these suites.
Mutant 1 — deactivateEffectEventCells has zero behavioral coverage
packages/octane/src/universal-kernel.ts:199-201:
export function deactivateEffectEventCells(cells: readonly EffectEventCell[]): void {
for (const cell of cells) cell.active = false;
}Replacing the body with nothing and running the five suites the pin names:
packages/octane/tests/universal-scheduling.test.ts
packages/octane/tests/universal-event-scope.test.ts
packages/octane/tests/universal-retained-suspense.test.ts
packages/octane/tests/universal-activity.test.ts
packages/octane/tests/universal-kernel-boundary.test.ts
Test Files 5 passed (5)
Tests 77 passed (77)
(Independently reproduced. The finding agent additionally reports the full octane project green — 6786/6786 — with the body removed.)
Coverage of that single statement: 0 executions across the four suites the pin names, 0 in the pin itself, and 2 across all 16 universal-* suites — both under universal-semantics-regressions.test.ts:332 ("keeps Effect Events callable through deletion and root-unmount cleanup phases"), whose assertions only require the events to stay callable and never assert that deactivation happens.
Consumer impact of the behavior being lost: a component removed from a universal root keeps a live, callable effect event indefinitely. The closure retains the component's last-render scope, so a pending timer, an aborted fetch callback, or a host handler captured before removal keeps invoking logic belonging to an unmounted component and keeps its props/state alive. That is precisely the leak the "A universal Effect Event cannot run before commit." guard exists to prevent.
Mutant 2 — the retained-Suspense shared-cell guard is untested
packages/octane/src/universal-core.ts:6152 does hook = { ...hook, next: fn }, so DraftOwner.hooks and UniversalOwnerRecord.hooks hold distinct hook objects sharing one cell. discardDraftOwners (:8191) must therefore skip drafts whose record survived into the committed tree, via the guard at :8200:
if (committed.has(draft.record)) continue;That guard is the entire retained-Suspense correctness argument for effect-event cells, and the file's own comment at :1037-1039 flags the hazard. Inverting it leaves all 299 tests across all 16 universal-*.test.ts files green. Only a purpose-built fixture — startTransition → child suspends → old UI retained → invoke the effect event — observes the difference.
Consumer impact of the guard regressing: the app throws "A universal Effect Event cannot run before commit." from a component that is on screen and fully committed, for as long as a transition-suspended render is outstanding. Every click handler routed through useEffectEvent starts crashing mid-transition — a hard user-visible fault with no test coverage anywhere.
Why this matters for the roadmap, not just for hygiene
#64's argument is "zero behavior change against the guard suites", and #66 §3 A2 identifies kernel slice 2 as "where drift risk starts", naming this same guard set. If the oracle cannot observe deactivateEffectEventCells or the shared-cell guard, then passing it does not establish what A2–A3 need it to establish. The #64 review note already asked for guards that "render through a universal root and assert observed behavior, not call helpers standalone" — universal-kernel-boundary.test.ts:22-52 still calls three helpers standalone, and three of the six extracted helpers (isThenable, trackUniversalThenable, deactivateEffectEventCells) have no direct assertion at all.
Suggested direction
Two behavioral tests, both through a real universal root:
- After the commit that removes an owner has flushed its passive phase, calling that owner's effect-event handle must throw
"A universal Effect Event cannot run before commit." startTransition→ child suspends → old UI retained → the retained (still-committed) component's effect-event handle must remain callable.
Either would have failed against its mutant. Adding them before kernel slice 2 lands would make the A2 guard set actually load-bearing.
Verification performed
Mutant 1 reproduced independently (77/77 green across the five named suites). Mutant 2 rests on the finding agent's executed output plus the source reading above; I did not re-run it. No red test is committed on claude/octane-issue-58-adversarial-audit — these are coverage gaps in existing suites rather than counterexamples to an equivalence claim, and committing a test that passes would not express the defect.
Activity
Huxpro commentedon Aug 18, 2026
Full 8-mutant matrix — and a result that argues against the obvious fix
A systematic mutation lens has since run all eight mutants in a throwaway worktree, with a load-order canary proving the mutated
universal-kernel.tswas the module actually loaded (inserting a top-level throw fails all 12 project-files at import; baseline is 338/338 green).Declared #64 guard set = 6 files × {
octane,octane-prod} = 12 project-files, 338 tests.depsEqual→ always truedepsEqual→ always falsedepsEqualuses!==instead ofObject.is(sodepsEqual([NaN],[NaN])is false)universal-kernel-boundaryONLY — all five behavioral suites passrunEffectCleanupdoes not setmounted=falseuniversal-kernel-boundaryONLY — all five behavioral suites passrunEffectCreatedoes not store cleanupisThenablereturns false for a real thenabledeactivateEffectEventCells→ no-optrackUniversalThenabledoes not record statusThe two layers do not overlap, and that changes the recommendation
This is the part worth acting on. m3 and m4 are caught only by the standalone, hand-built-hook assertions in
universal-kernel-boundary.test.ts— every behavioral suite that renders through a universal root passes both. Conversely m6 and m8 are caught only behaviorally, and the boundary test misses them entirely.The #64 review note (this issue's §3 A2 lineage) asked for guards that "render through a universal root and assert observed behavior, not call helpers standalone." Read literally, replacing the standalone assertions with behavioral ones would lose coverage of m3 and m4 — the NaN/
Object.isdependency semantics and the effectmountedflag. The right move is additive: keep the standalone assertions, and add behavioral coverage for the three helpers that have none.The original recommendation in this issue stands but should be read as in addition to, not instead of.
The hole is pre-existing
Verified in a separate worktree at base
6079a6804: the same function exists there as a private helper atuniversal-core.ts:6626with identical call sites (:11376,:11779,:11787). Making it a no-op on base givesTest Files 30 passed (30)/Tests 594 passed (594).So the coverage hole is not stack drift. What #64 changed is that the helper became one of six named, exported members of a new module carrying a new guard — and that guard still does not cover it. That is a fair thing to fix while the extraction is in progress, not a regression the stack introduced.
Consumer-visible confirmation of the survivor
The lens built a probe rendering through a real universal object root, held the
useEffectEventhandle acrossroot.unmount(), and called it: the unmutated kernel throws"A universal Effect Event cannot run before commit."; the mutant silently re-invokes the dead owner's last committed closure and returns its stale prop. So m7 is a genuine coverage gap, not an equivalent mutant.Scope confirmed by grep: only
universal-core.tsimportsuniversal-kernel.js, and no test outsidepackages/octanetouchesuseEffectEvent(packages/lynx/testsandpackages/three/testshave none), so no other consumer could catch it.Not done
Mutants outside the eight named; mutating the
universal-core.tscall sites rather than the helper bodies.Generated by Claude Code
Huxpro commentedon Aug 18, 2026
Third instance of the same gap: linked-state cells are also entirely uncovered
A linked-state lens measured the same evidence question against a different part of what #64 moved, and found the same shape of hole.
Every suite #64 names as its behavioral guarantee executes 0 of 109 statements of the linked-state hook. None of the four named
universal-*suites callsuseLinkedState/__useLinkedStateWithGetter, so every read and write ofPARKED_UNIVERSAL_LINKED_DRAFTS(universal-core.ts:5215,:5296,:5319,:5348) is unexecuted by the declared oracle.universal-kernel-boundary.test.ts:22-52pins onlyrunEffectCreate/runEffectCleanup/depsEqualstandalone and defers the rest to those suites.ParkedUniversalLinkedDraft,LinkedStateHook,LinkedStateOptionsandLinkedStatePreviousare all types #64 moved into the kernel. The parking WeakMap they describe is never touched by the guard set.Why it matters here rather than as its own issue
This is the same root cause already reported: the declared oracle does not cover what the extraction moved. Running total of measured holes in that oracle:
deactivateEffectEventCellsuniversal-core.ts:8200)universal-*tests greenThat is three independent probes converging on the same conclusion, which is the argument for treating this as a gap in the guard set rather than three test-writing chores.
It is not drift
Same finding as before: the moved code is a pure move, verified by an in-process head-vs-base differential running 12 linked-state scenarios against both module instances simultaneously. The coverage hole predates the extraction; what #64 changed is that these cells are now named exports of a module whose new guard still does not reach them.
Consequence already realised
The same lens found a live, user-visible bug in exactly this uncovered region — retained-hidden linked-state edits silently discarded while an unrelated async transition is pending, filed separately. That is what an uncovered region looks like when something is already wrong in it: no test failed, because no test runs the code.
Generated by Claude Code
Huxpro commentedon Aug 18, 2026
Panel: evidence strengthened, framing disputed
A refuter reproduced this independently and at wider scope, then argued it should not be filed as a
bug. Both halves are worth recording, because they point in opposite directions.The evidence got stronger
In its own worktree at HEAD
5d000b30e, blankingdeactivateEffectEventCellssurvived a wider net than I ran — all 16packages/octane/tests/universal-*.test.tsplus everypackages/lynx/testsfile, 942 passing, with the only failure being this audit's own pre-committed red test.More importantly, it closed the equivalent-mutant question through the public API only —
createUniversalRoot/useEffectEvent/useEffect/root.unmount(), no internals:So the mutation is genuinely observable to a consumer, it is not an equivalent mutant, and no test anywhere in the repo catches it. That is a better demonstration than the one this issue was filed on.
The framing objection
The refuter's ground for refusing it is that the issue concedes today's code is correct, so it is not a defect. That is fair as far as the
buglabel goes — nothing is misbehaving right now — and I want the disagreement visible rather than resolved in my favour by silence.What I would say in response: this issue never claimed a behavioral defect. Its title and body are explicitly about #64's declared oracle being unable to observe what #64 moved, which matters because #66 §3 A2 names that same guard set as the gate for kernel slices 2–5. A guard that cannot fail is not a guard, and the cost of discovering that during A3 is higher than the cost of two tests now.
The companion evidence still stands unchanged: the retained-Suspense shared-cell guard at
universal-core.ts:8200can be inverted with all 299universal-*tests green, and the linked-state cells execute 0 of 109 statements under the declared set. Three independent probes, one live bug already found sitting in the uncovered region (#83).Suggested disposition: if the
buglabel is wrong for a coverage gap, relabel rather than close — the two tests named in the original suggestion would each have failed against their mutant, and adding them before kernel slice 2 is cheap.Generated by Claude Code