Skip to content

fix: address React behavioral audit defects - #943

Merged
domgan-oai merged 11 commits into
octanejs:mainfrom
openai-oss-forks:codex/fix-divergence-audit-2026-09-03
Sep 3, 2026
Merged

domgan-oai merged 11 commits into
octanejs:mainfrom
openai-oss-forks:codex/fix-divergence-audit-2026-09-03

Conversation

@domgan-oai

@domgan-oai domgan-oai commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix the confirmed compiler, runtime, DOM, hydration, SSR, and public API defects in the September 3 React 19.2.7 behavioral audit. The audit disposition maps every reported item to its fix or documented intentional Octane behavior.

  • Preserve authored JSX order, whitespace/entities, keyed identity, parser-sensitive markup, hook call-site identity, and owner-bound component metadata.
  • Correct queued updates and transitions, cleanup/error delivery, native event dispatch, form controls/actions, and incremental styles.
  • Escape application strings throughout SSR, handle renderable roots and Suspense failures, and report hydration recoveries.
  • Add migration types and compatibility exports, plus an Octane-native @octanejs/react-is binding pinned to the React 19.2.7 source and package artifact.
  • Update downstream integrations, regression coverage, package evidence, changesets, and divergence documentation.

Validation

Full CI passed on final commit 3f2636bac. The second review's router release-note request is addressed: the @octanejs/tanstack-router patch changeset, README guidance, and status notes document urgent same-route search updates and the useDeferredValue migration. The review reply also records the diagnostic dedupe comparison and local website verification. The PR is ready for human review.

  • All four Node 24 test shards and all four React parity shards, including the aggregate evidence/provenance checks
  • All three example-app shards, website and Chromium integration suites, and package-build/eval/runtime-loader/Astro integration tests
  • Full monorepo typecheck, lint, package publication validation, and Three/Lynx compatibility
  • Local website on this commit: fresh authored production build including Lynx, all 473 tests (396 unit plus 77 development/production SSR and browser integration checks), and the authored .tsrx typecheck
  • Router same-route search navigation: all 3 existing tests pass after the release-note update; final sync, formatting, and changeset/release-plan checks pass
  • Shared parity/port tooling: 813 local tests passed, including real Vitest noisy-output and failing-assertion controls
  • Final parity metadata: 5,345 stable and 5,413 canary cases; all 28 minimal production bundle scenarios pass behavior/reachability controls
  • Focused local regression runs during this fix: compiler/manual-provider/binding/Rspack 1,873; helper/Router/Dexie/universal/hydration 229; transition/Action/hooks/render-retry 452; SSR return/streaming/hydration 436; Store/Hotkeys/Pacer 116; Dexie 34; production error/root/decoder 59
  • React-is binding export/type/provenance evidence and packed-consumer verification
  • Final pnpm sync, formatting, changeset checks, and git diff --check; clean worktree

The final CI fix makes the parity runner read a fresh JSON reporter file, so Vite/plugin console output cannot corrupt the report. Strict assertion/identity verification remains in place, and failed runs cannot publish or reuse successful evidence. Store and Dexie hooks preserve authored explicit slots alongside ambient hook adapters. Error 28 retains its published message; the expanded diagnostic uses new code 63. The new Store regression is recorded in its parity classification ledger.

Bugbot passed on 3f2636bac with no findings. All published review threads are resolved; the maintainer review has a point-by-point response with regression evidence. Manual declaration providers preserve hoisting and cyclic imports while allowing unused providers and their dependencies to be removed from production bundles.

Main at e3194d536 is included without conflicts. Human review is still required.

Risk / follow-ups

This is a broad framework correction. Intentional Octane differences remain documented. Parent setup self-updates settle before child initialization; arbitrary late sibling side effects do not make template execution transactional.

Final hook/memo operation and source-allocation counters remain unchanged. Compiled fixtures grow by 713 minified bytes in each variant, and complete production bundles grow by 3,348 / 3,362 bytes gzip. The final paired transition sample measures 2.8 → 3.6 µs per cycle (29% on that minimal workload). Against the preceding adapter, the tree-shaking follow-up adds about 5.7–9.5 ns per manual-provider invocation in an isolated benchmark. The earlier serializer-only SSR measurement is about 7–9% slower, including the value carrier needed to distinguish text from serialized markup. These costs and measurement limits are documented in the audit.

Provenance

  • An agent produced this diff (agent-authored)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

High Risk
Broad compiler, client runtime, SSR/hydration, and scheduling changes touch core framework contracts and many bindings; regressions could affect rendering, transitions, forms, and server output despite extensive audit-driven tests.

Overview
This PR closes the September 2026 React 19.2.7 behavioral audit with coordinated Octane core fixes and binding/example follow-ups, plus documentation and release notes that record what was fixed versus intentionally different.

Core and public surface (via changesets and docs/divergence-audit-2026-09-03.md). Compiler and runtime behavior moves toward React-aligned observables: JSX ordering/whitespace/keys, template and SSR semantics, transitions and queued updates, native events and form controls, Suspense/hydration/SSR error handling, hook argument preservation through adapters, and migration exports (StrictMode, useFormState, React-named types). New framework error codes and hydration recovery reporting are wired through generated CLI data.

New binding and port tooling. Adds @octanejs/react-is (react-is 19.2.7) with status/inventory updates. React-library-port docs now allow a checked upstream-types-absence command when upstream ships no TypeScript, instead of fabricating pristine/adapted type gates.

Downstream integrations. Patch-level binding fixes (TanStack Router urgent same-route search store updates—Hacker News examples adopt useDeferredValue; Testing Library focus/blur sequencing; Dexie/RxJS Symbol defaults and explicit hook slots; Query, Motion, Lynx, MCP, input-otp, usehooks-ts, etc.). Apollo and Formisch drop typetest react path stubs in favor of authored-source React import conformance scans. Benchmark reachability fixtures wait on visible Suspense commits and compile a wider JS/TS graph; minimal server render uses createElement.

Docs and evidence. docs/differences-from-react.md is expanded; binding counts bump to 107; many parity manifests refresh lockfile hashes; colorful/hook-form tests align with native focusout / delegated focus behavior.

Reviewed by Cursor Bugbot for commit 3f2636b. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix labels Sep 3, 2026
@domgan-oai
domgan-oai marked this pull request as ready for review September 3, 2026 13:11

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 1c0cd39. Configure here.

@trueadm

trueadm commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Review against the audit's probe harness (head 1c0cd39c2)

This review was produced by an agent (Claude Code) by re-running the same React-vs-Octane probes that generated the September 3 audit against this PR's head, running the PR's new test suites and the CI-failing binding suites locally, and reading the implementing hunks. Verdicts below are probe-based: fixed means the Octane output now matches real React 19.2.7 on the same fixture.

Verified fixed (probe output now matches React)

Area IDs Evidence
Compiler A1 ternary-hole sibling order (10/11 cases; the 11th differs only in a probe artifact), A2 same-line whitespace (11/11 cases), A6 key coercion, A7 host key remount, A8 portal array/ternary/&& bodies, A10 <style dangerouslySetInnerHTML>, A11 parser-sensitive nesting (<p><div>, <div><tr>, <select><div>, <table><tr> incl. dynamic bindings, content now identical to React modulo Octane's comment anchors), A12 Suspense-transparent warming, A14 static <video muted>, A15 <html>/<head>/<body> compile, A17 precedence-less stylesheet stays in place children-order, children-extra, children-keys, effects-refs 4f/4g/4h, ctxerr-portal P6i2, dom-html, coord-nesting, susp-warm, dom-specials, ssr-elements
Runtime B1 per-hook isPending (sched-pending P1: pB never flips), B2 transition errors reach the owner boundary / reportError (E9j/E9k), B3 render-time reducers and updaters, B6 root.unmount() drains cleanups before returning, B7 keyed inserts mount in tree order (focus race now picks the right element), B9 useDeferredValue stale indicator, B10 memo metadata no longer hoistable (__memo: false on the HOC), B11 keyed portals, B12 disabled-control mouse suppression, B13 handler snapshots incl. flushSync mid-dispatch, B14 custom-element event-name case hooks-transition2, ctxerr-errors, state-reducer, sched-more U1, effects-listorder 12f, susp-transition, api-exports, ctxerr-portal P6b, events-hosts, events-dynamic
Server/API G1 string returns escaped (a<b&" → a&lt;b&amp;"), G2 <style> text raw, G3 <pre> newline guard, G4 buffered Suspense error renders the fallback + onError, G5 pending root throws instead of truncating, C1 renderable roots + second-position options, C3 document roots, B18 focus via focusin/focusout ssr-more, ssr-hooks, api-server, api-misc, events-hosts FOCUS

The PR's new suites pass locally on this head: audit-hook-behavior (64), audit-events-portals (32), compiler-authored-hosts (58), server-renderable-contract (58), compatibility-exports (10), root-container-contract (24), host-update-contract (46), transition-held-audit (12), react-is/contract (7).

Blocker: the B8 hold-release rule regresses the documented useSuspenseQuery / router hold

handleSuspense now reads if (isTransition && …) and unconditionally calls releaseHeldTransition(state) for any non-transition re-suspend. The comment this replaced explained why the continuation existed: in the real useSuspenseQuery shape the query observer notifies on a later macrotask, after Octane's transition window has closed, so the re-render that re-suspends on the same in-flight fetch arrives at urgent priority. React keeps the old content there because its sync re-render happens on the committed (old-key) tree, which does not suspend; Octane has no separate work-in-progress tree, so the continuation was the compensating rule.

Three CI failures reproduce it, and I reproduced two locally on this head:

  • packages/tanstack-query/tests/conformance/transition-suspense.test.ts — both cases, "transition keeps prior content, no fallback flash (React parity)".
  • packages/tanstack-router/tests/conformance/same-route-search.test.ts — "holds the current page while a same-route ?page change suspends (concurrent hold)": flashedPending is now true.
  • examples/hacker-news/e2e/page-more-hold.spec.ts (CI, both tsrx and jsx): 30 row-skeletons appear during the "more" transition.

The audit's B8 case (a user-initiated urgent setId('e') that suspends on a different thenable) is real and this PR fixes it, but the fix needs to distinguish the two shapes. A rule that satisfies both: keep the hold when the urgent render re-suspends on the thenable the hold is already waiting on (or one registered by the held attempt), and release only when it suspends on a new one. The audit's susp-basic probe (release on e) and the three suites above (continue on the same fetch) are the two oracles.

CI is red for other reasons too

  • React parity shard 1/4: packages/octane/src/public-types.ts references React.RefCallback, React.AriaAttributes, React.AriaRole, React.HTMLInputTypeAttribute, React.HTMLAttributeReferrerPolicy, React.HTMLAttributeAnchorTarget. @types/react is already a hard dependency of octane and jsx-runtime.d.ts already imports it, so that is defensible, but three bindings still map react to the poison shim in their typetests: packages/formisch, packages/spring, packages/tiptap. The PR converted apollo-client and inertia to a source-import scan and missed these. Either update those three the same way or define the six aliases locally. Note the converted gates now check authored imports only, no longer the emitted declarations; worth a sentence in the doc.
  • lint: packages/cli/src/data/octane-data.json is stale (pnpm cli:data), presumably missing @octanejs/react-is.
  • test shard 1/4: packages/usehooks-ts/tests/state-hooks.test.ts "rejects step values outside the configured range". The port throws inside the functional updater (src/state.ts:117), which only ever threw synchronously because of the dispatch-time evaluation this PR removes. Upstream useStep validates before calling setState, so the fix is to re-shape the port to upstream, not to keep the test.
  • website integration suite: ssr-hydration.e2e.test.ts:1327 expects scrollY === 0 on the first frame after a view-transition navigation and now sees 4560. I could not attribute this from the diff; it needs a look before merge since it is a user-visible regression in the website itself.

Should fix

  • SSR carrier cost. ssrHtml() allocates a ServerHtml per compiled component render, which the PR measures as a 7–9% SSR slowdown. Branding the compiled function in a module WeakSet at definition time gives the same guarantee without per-render allocation: hoist-non-react-statics cannot copy WeakSet membership, and a compiled body never returns user text unbranded, so typeof out === 'string' && !COMPILED.has(fn) is the only check needed. SSR cold start is one of Octane's headline numbers; this seems worth trying before accepting the regression.
  • B4 is partial. Effects no longer fire for the discarded pass (the S1 half), but the child still renders once with the discarded state: ["init render 0","gc render 0","init render 5",…] vs React ["init render 0","init render 5",…] (state-render-phase2 "self render-phase init on mount"). Either finish the replay or document the extra child render.
  • createRoot(document.body) after hydrateRoot(document, …) fails with "Target container is not a DOM element", which is misleading now that document roots exist; a nested-root or ownership message would be clearer.

Preserved-and-documented items I agree with

A4 opaque template children (descriptorChildren made public), A5 branch identity, A9 raw script bodies, B17 hidden suspended DOM and portals, C6 no forwardRef, the serialization-format differences, and the diagnostics scope. On B5 (passive effects stay post-paint) the contract text is now accurate and the misleading runtime comment is gone; that is a maintainer call rather than a review finding, but note the Radix port still carries its useEffectEvent workaround for it.

Process note

The PR body says the last full run had 55 failing tests. With the B8 rule reverted to a same-thenable continuation, the three gate updates, the cli data regeneration, and the useStep re-shape, the remaining red should be the website scroll assertion. Happy to re-run the probe set against a new head.

@domgan-oai

Copy link
Copy Markdown
Contributor Author

Addressed the follow-up findings in 2817ce84b and ff70daa, with regressions at the owning framework or binding boundary.

  • B8, Query, and Router holds: urgent parent traversal now reads committed child inputs while transition work is queued, and consecutive/awaited Actions replay in dispatch order. This preserves the existing query and same-route hold scenarios without classifying an urgent update by promise identity alone. The raw external-store case remains urgent, as confirmed against React; Hacker News explicitly defers its query input to retain the previous page during pagination. The unchanged Query/Router CI regressions pass, and a new layout-effect Action regression protects the completed-record bailout found during final Router validation.
  • Manual hook slots and Symbol arguments: preserve ordinary custom hooks' authored argument lists, and adapt manual-slot provider definitions so imported, bound, forwarded, and factory-returned hooks still receive their internal call-site slot. Provider discovery handles the prefixed XYFlow hooks and the Router source's TypeScript syntax. Dexie preserves Symbol defaults and explicit internal slot identity. The final compiler matrix passes 1,750 checks; the 20 previously failing CI files pass all 94 checks. Flowboard, Lexical, Input OTP, and the affected browser integrations pass.
  • React type guards: Formisch, Spring, and Tiptap now check authored binding/typetest imports instead of poisoning React's transitive declarations. Octane already depends on React types. The audit document explains that source-import ownership checks and strict consumer typing are separate gates; the complete monorepo typecheck passes.
  • CLI, useStep, and website: regenerated CLI data, moved useStep range validation before dispatch to match upstream, and fixed scroll-reset ordering around the website's view transition. All 78 website integration checks pass, including the scroll-reset scenario.
  • B4: parent setup self-updates now settle before discarded output can initialize child state or run child bodies. Output entrypoints also skip a child when its input expression schedules the update, including conditions, lists, Activity, and portals. The tests check visible initialized state, errors, surviving DOM identity, and hydration. Arbitrary side effects in later sibling expressions still cannot undo an earlier child's initialization; the audit documents this boundary. The final transition/Action/hooks/B4 run passes 452 checks, in addition to portal/list, hydration, and universal/native controls.
  • Document roots: valid nested body roots work. The failing probe leaves document.body null after hydrating a root without a document shell; the diagnostic now explains that condition and the existing document root/document-shell remedies.
  • SSR carrier: retained after testing the proposed function-only WeakSet approach. A compiled template can return user text early, and an ordinary wrapper can forward a compiled return value or an array containing one. The prototype exposed the early text as HTML and double-escaped forwarded markup (six failing checks, two controls). Permanent buffered/streaming regressions protect both cases; 436 SSR/hydration checks pass. The measured 7–9% serializer cost remains documented; no allocation-free replacement is claimed.

Current-head CI is running. The broad local Node run reached 22,972 passing tests; each failure found there now passes its focused rerun, including native filesystem-watching checks outside the macOS sandbox. I am also addressing a newly measured unused-provider tree-shaking cost in a follow-up; the audit records current bundle and transition costs without claiming a speedup.

@domgan-oai

Copy link
Copy Markdown
Contributor Author

Pushed f56539e74 with the remaining follow-up fixes:

  • Unused manual hook providers and their dependencies now disappear from production bundles. Hoisting, actual ESM cycles, authored arguments/defaults, names, arity, receivers, and bound/forwarded aliases remain covered. The final compiler/binding/Rspack matrix passes 1,873 checks; a separate runtime/binding/hydration matrix passes 229.
  • Regenerated the one stale Formisch evidence hash; complete parity metadata validation passes.
  • Added explicit JSX spaces to Pulseboard's pending label. Both failing production browser journeys pass unchanged, and React confirms the multiline whitespace behavior.
  • Website tests now use the authored production build, including Lynx preview assets. The new artifact check reproduces the missing asset on the previous output; all 77 production website checks pass after rebuilding.
  • All 28 minimal bundle scenarios pass with visible-commit and valid-server-output controls. The audit includes final bundle, transition, and manual invocation costs; it makes no general speedup claim.

All four Node shards, browser integrations, package integrations/publication, typecheck, and Three/Lynx compatibility passed on the preceding head. CI is now running on this commit.

@domgan-oai

Copy link
Copy Markdown
Contributor Author

Final validation is green on 419530e5fec8e9d12ac78254ef593104a0473eee: full CI run, including all four Node and React parity shards, example/browser/website integrations, package checks, typecheck, lint, and provenance. Bugbot also passed with no findings.

The final CI failure was console output mixed into the parity JSON stream. Commit 7784363fe isolates the reporter output in a fresh file while retaining strict failure and identity checks; the real-Vitest regression reproduces the old failure, and all 813 shared tooling tests pass. The following commit only fixes the audit table layout.

All review threads are resolved, current main e3194d536 is included without conflicts, and the PR description now records the final results and performance trade-offs. Ready for human review.

@trueadm

trueadm commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Second pass against 419530e5f (agent-produced, same probe harness)

I re-ran the complete audit probe set (~500 React-vs-Octane cases across 11 areas) against this head and against current main, then diffed the failure sets. Everything below is from those runs plus the follow-up diff since 1c0cd39c2.

Net result: parity-probe failures drop from 219 on main to 154 on this head. 67 probes newly match React; 2 newly differ; no behavioral regression surfaced. CI is green and Bugbot has no findings.

Newly matching since the first review

  • B4 is now complete: the discarded mount pass no longer renders the child (["init render 0","init render 5",…] matches React exactly).
  • B8 / holds: letting an urgent render read the committed value of a cell that has a queued transition update is the React-shaped answer to the problem I raised, and it keeps the useSuspenseQuery transition hold without special-casing promise identity. The store-driven case (susp-store) now matches React too, and the re-baselined "urgent key change reveals fallback" test agrees with the audit's probe.
  • Everything verified in the first review still holds (transition pending isolation, ternary order, whitespace, reducers at render time, unmount cleanup, keyed insert order, handler snapshots, disabled controls, custom-element names, portal keys, memo metadata, style scope, defaultValue, server renderables, document roots, SSR escaping).

The two new differences (dev diagnostics, not behavior)

children-diag › UnkeyedMapReturn and UnkeyedHostMapTemplate: Octane now logs the missing-key warning in shapes where the React twin logged nothing in the shared run. The DOM is identical, so this is either React's per-owner dedupe of that warning or a scope difference in Octane's new check; worth confirming Octane dedupes per owner component the way React does rather than per list.

One thing that needs a changeset and a doc line: the router behavior change

packages/tanstack-router/src/router.ts no longer re-asserts the navigation transition around resolved store commits, so a same-route ?page change whose route component suspends now shows the pending fallback unless the route defers its render input; the test was re-parametrised accordingly and Hacker News adopted useDeferredValue(page). I agree this is React parity (my susp-store probe shows React 19.2.7 revealing the fallback for a store-driven re-suspend), and the example change is the idiomatic React pattern. But it is a user-visible behavior change for existing @octanejs/tanstack-router apps that relied on the documented same-route hold, and the PR currently has changesets for @octanejs/tanstack-query, tanstack-store, rxjs, dexie, usehooks-ts and input-otp but none for tanstack-router; the only trace is the replaced code comment. Please add a @octanejs/tanstack-router changeset and a sentence in its status/divergence notes (or the differences doc) that same-route search navigations now render urgently and routes that want stale content should useDeferredValue the search input.

Costs grew in the follow-ups

The description now reports production bundles +3,348 / +3,362 bytes gzip (up from +1,763 on the first head), the minimal transition cycle at 2.8 → 3.6 µs, and SSR still 7–9% slower. The manual-hook-provider work explains most of the bundle delta and is covered by binding tests, so I am not blocking on it, but the SSR carrier allocation is still the same design as before; the WeakSet-of-compiled-functions alternative from the first review remains open as a follow-up.

Verdict

From the audit's perspective this now fixes what it says it fixes, and the preserved items are documented accurately. With the router changeset/doc line added I have nothing further; the diagnostics dedupe point and the SSR carrier cost can be follow-ups.

@domgan-oai

Copy link
Copy Markdown
Contributor Author

Addressed the second review in 3f2636bac:

  • Added the missing @octanejs/tanstack-router patch changeset. The README migration guidance, package status notes, and generated binding status now explain that same-route search store updates render urgently. Routes that retain stale content should apply useDeferredValue to the search input consumed by their suspending content; the router location still advances when navigation commits. All three existing same-route navigation tests pass, as do sync, formatting, and release-plan checks.
  • Confirmed the diagnostic dedupe explanation against compiled Octane and real React 19.2.7. Two ordinary list sites in one Octane rendering block produce one warning, then none on update. A new instance warns again. React's renderer-wide parent-name cache suppresses later shared-run cases, including unrelated ul parents. This is the already-documented per-rendering-block diagnostic policy; additional lifetime coverage can remain a follow-up.
  • The SSR carrier cost remains documented. Any replacement still needs to preserve the existing early-text-return and forwarded-markup regressions from the previous reply; no allocation-free replacement is claimed here.

Also revalidated the website locally on this commit: fresh authored production build, all 473 tests (396 unit plus 77 development/production SSR and browser integration checks), and the authored .tsrx typecheck pass. Bugbot reports no findings. Current-head CI is available here.

@trueadm

trueadm commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Final pass on 3f2636bac (agent-produced)

The only change since the second pass is 3f2636bac, which is docs and metadata: the @octanejs/tanstack-router patch changeset, the "Same-route search navigation" migration section in the router README, and the matching status.json / generated bindings-status line. That covers the one thing I asked for. No source changed, so the second-pass probe results stand (219 → 154 parity-probe failures versus main, 67 newly matching, no behavioral regressions), and CI on this head is green with Bugbot clean.

The per-rendering-block dedupe explanation for the missing-key warning matches what the probe saw, so those two diagnostic rows are closed from my side. The SSR carrier allocation stays a documented cost with a possible allocation-free follow-up; it is not a merge blocker.

Nothing further from the audit's perspective.

@domgan-oai
domgan-oai merged commit 44d50db into octanejs:main Sep 3, 2026
31 checks passed
trueadm added a commit that referenced this pull request Sep 3, 2026
PR #943 moved spliceHead's empty-head early exit behind a full
`body.indexOf('</head>')` so a document root gains an implicit <head>.
Every fragment render with nothing to splice therefore scanned its
complete response, which a CPU profile shows as the whole SSR
throughput regression the audit attributed to the ServerHtml carrier;
bundles with and without the carrier time the same. Decide the common
case from the body's first bytes and return it unchanged; documents keep
their implicit head. Pin the document/fragment contract, add negative
escaping cases for wrappers and newline-sensitive hosts, and record the
attribution in the audit document.

Co-authored-by: Claude Fable 5.1 <[email protected]>
trueadm added a commit that referenced this pull request Sep 3, 2026
#946)

* perf: keep form-action and transition graphs out of event-only bundles

PR #943 let dispatchDelegated call the form-action submit handler directly,
which made startTransition and the held-transition swap graph reachable from
every bundle with delegated events. setFormAction, the only writer of
$$formAction, now installs that handler through FORM_SUBMIT_DRIVER. The
compiled setup checkpoint is emitted only when setup can schedule a
render-phase self-update; passive built-in hooks and unshadowed pure globals
cannot.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* perf: fail closed on callable-shaped sync-factory hook arguments

A memo factory, state initializer, or reducer passed by reference can call a
setter without a visible body. Treat every argument to a sync-factory hook
that could be a function as an unclassified call so the setup checkpoint stays.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* perf: allow only non-invoking global namespace members in setup checkpoint analysis

Array.from, JSON.parse/stringify callbacks, Object.groupBy, and similar can
run user code by reference. Keep an explicit member allowlist and check the
JSON callback positions like a hook factory.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
trueadm added a commit that referenced this pull request Sep 27, 2026
…1335)

The committed src/**/*.tsrx.d.ts files had drifted since #432: #1069 added a
top-level JSX namespace to octane/jsx-runtime, and #943 changed memo's return
type. Streamdown's types:check was never run by CI, so the drift went unnoticed.

Regenerate the declarations and run `pnpm --dir packages/streamdown types:check`
as a root `test` precheck alongside Visx's.

Co-authored-by: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 2, 2026
…output (#1586)

Three gates that the weekly bench job and local Node 22 runs depend on had
drifted from the code they observe.

tsrx-component-graph counted warm plans with a regex for the
`Object.assign(fn, { __warm: ... })` shape. #943 (44d50db) switched the
compiler to `markWarm(fn, plan)`, so every graph counted zero and the
opaque-cycle control failed. The harness now reads `markWarm` calls against
the runtime import from the parsed output, and a ci:workflow:test case runs
the cycle and chain controls against the current compiler on every PR.

hook-store-composition's work gate required nonzero `appendSlotKey` calls on
the nested lane. #1076 (1e12db7) moved composed hook paths into the cached
`resolveHookPath`, leaving `appendSlotKey` only on the use() description path.
The probe now counts `resolveHookPath`, the direct lane must compose nothing,
and a ci:workflow:test case keeps the probe on the helper `resolveSlot` calls.

behavior-root's destructured-props test pinned one read per getter. V8 12
(Node 22, including the 22.22.2 engines floor) also runs excluded keys'
getters while copying an object rest, with no Octane code involved. The test
now derives its oracle from one native evaluation of the authored pattern, so
an extra snapshot read by Octane still fails on every engine.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants