Skip to content

React 19 parity: outstanding gaps and follow-ups after #709 #711

Closed

Description

@trueadm

Status 2026-08-12 (sixth and final update): #742 is MERGED — every implementation item in this issue is DONE. The audit's arc: #709 (Float resources, root error callbacks, hints, doc sweep) → #712 (style resources, Consumer decision) → #715 (implementation gaps) → #720 (seven Float behavioral gaps) → #725 (ReactDOMFloat evidence: 121 cases dispositioned) → #727 (streamed late Float sheets) → #738 (streaming evidence flips) → #739 (precedence group discovery order + SSR TDZ fix) → #742 (transitive fallback-hoistable suppression, charset/viewport head priority, final evidence flips). Ledger state on main: ReactDOMFloat-test.js has 3 planned cases — all three are warning-MESSAGE families belonging to the diagnostics backlog — and the whole ledger sits at 1,922 planned, which the ledger + CI-checked coverage report track on their own. The diagnostics backlog moved to #744; with that, this issue is CLOSED.

Tracking issue for everything left open by the React 19.2 parity audit after #709 merged. The audit itself (4 parallel area sweeps over the client runtime, react-dom statics, SSR surface, and 19.1/19.2 additions) and the shipped tranche are described in #709; this issue is the remainder, organized by the kind of work each item needs.

Decisions locked in (recorded here so they stop being re-litigated)

  • Context.Consumer: modern approach only — the legacy render-prop form will NOT be added. Octane's context is a callable provider (<MyContext value={…}>, React 19 style) with .Provider kept as an identity alias for React-18-shaped libraries. Consumer existed to work around React's hook-order rules; Octane's slot-keyed hooks make use(MyContext)/useContext legal behind any condition, so the render-prop indirection has no reason to exist here. Documented in docs/differences-from-react.md since feat: React 19 parity tranche — Float resources, root error callbacks, module hints, parity dispositions #709. Remaining actions:
    • Disposition the 11 planned ledger cases Done in feat: Float style resources and Context.Consumer decision (executes #711 decisions) #712: 9 propagation/bailout cases adapted as useContext-reading conformance tests (context-consumer-adapted.test.ts) and flipped to covered with evidence records; the 2 render-prop-surface cases are non_goal. Original scope: disposition the 11 planned ledger cases whose titles target consumers (mostly ReactNewContext-test.js): adapt the ones that test propagation/bailout behavior (observable via useContext-reading components — e.g. "consumers bail out if context value is the same", the ReactContextPropagation-test.js cases) and mark the ones that only test the render-prop API surface (warns when passed a consumer, can read other contexts inside consumer render prop) as non_goal with the rationale above.
    • Done in feat: Float style resources and Context.Consumer decision (executes #711 decisions) #712: accessing .Consumer now logs a one-time-per-context dev diagnostic with migration guidance and still returns undefined (feature probes match production), on both octane and octane/server.
  • Partial pre-rendering (resume/resumeAndPrerender/postpone), cache()/cacheSignal(), hydrateRoot formState: documented non-goals as of feat: React 19 parity tranche — Float resources, root error callbacks, module hints, parity dispositions #709 (ledger + docs consistent). Nothing outstanding; listed to close the loop.
  • <style href precedence> style resources: DECISION REVERSED (maintainer, 2026-08-11) and implemented in feat: Float style resources and Context.Consumer decision (executes #711 decisions) #712 — a <style> with both href and precedence is a React Float style resource (href-keyed, precedence-grouped with link resources); every other <style> stays scoped CSS. Suspensey commits remain a documented non-goal.

Implementation gaps (real code work, roughly priority-ordered)

  • prerenderToNodeStream — implemented in feat: close the React 19 parity implementation gaps (#711) #715 (complete-document prelude; ledger case flipped to covered). — octane/static has only buffered prerender; the stream variant is planned in the ledger and the module doc now says so accurately. Needs the streaming engine wired to the await-everything renderer.
  • Nested-under-host document metadata — fixed in feat: close the React 19 parity implementation gaps (#711) #715 in React's direction: the server now serializes nested hoists (any depth, arm-conditional timing preserved); the §9.2 island policy moved to its runtime guard. The client hoists a <title>/<meta>/<link> found anywhere; the server compiler errors with ssrUnsupported: HeadHoist when one sits inside a host element (only component-body-root placement works end-to-end). React hoists from anywhere. Either extend ssrEmitElement/ssrEmitNodes to partition nested HeadHoist nodes, or make the client reject nested placement with the same diagnostic so the contract is symmetric — the current split fails only at server-compile time, far from the authoring mistake. (Found while building the Float fixtures for feat: React 19 parity tranche — Float resources, root error callbacks, module hints, parity dispositions #709.)
  • Universal renderer — onCaughtError/onUncaughtError wired in feat: close the React 19 parity implementation gaps (#711) #715 (direct render() throws stay the documented result channel; no hydration channel → no onRecoverableError). universal-core.ts keeps its own root implementation and ignores onCaughtError/onUncaughtError/onRecoverableError. Wire the same consume-or-default semantics (drainQueue + sync-mount + hydration equivalents — note from feat: React 19 parity tranche — Float resources, root error callbacks, module hints, parity dispositions #709: there are three catch sites to cover, not one).
  • Deletion-phase/teardown errors — routed to the root callbacks in feat: close the React 19 parity implementation gaps (#711) #715 (block threaded through the teardown channels). The teardown channel (reportTeardownError/TEARDOWN_HANDLER) and the ref-detach queue capture their boundary handler without block context, so uncaught teardown errors keep console.error even on a root with onUncaughtError. Needs block (or root) context threaded through the teardown collection.
  • Resource-hint hardening — done in feat: close the React 19 parity implementation gaps (#711) #715 (unified Float identity for preinit, one-way preload upgrade, imageSrcSet keying, dev validation). Options apply as a lenient attribute pass-through: unknown keys leak into the DOM as attributes, there is no dev validation of option shapes (React warns on e.g. a missing/invalid as), preload+preinit of the same href produce two tags where React's resource map unifies them, and image preloads key on href rather than imageSrcSet+imageSizes. Tests only cover as/crossOrigin/integrity; fetchPriority/imageSrcSet/imageSizes/media serialize correctly but unasserted.
  • Streaming: Float sheet resources discovered after the shell — FIXED in fix: ship Float sheet resources discovered after the streaming shell #727 (was: nothing registered after the shell pass ever reached the streamed HTML; test: disposition all 121 planned ReactDOMFloat parity cases with executable evidence #725's evidence port sharpened it and pinned the observable with three ledger cases). Streaming SSR now ships late-discovered sheet resources (<link rel="stylesheet" href precedence>, <style href precedence>): each resolution wave diffs per-href sheet registrations against what already flushed and emits new tags in a hidden data-oct-fr carrier ahead of the wave's segment reveals — real markup, so no-JS consumers get working CSS; the inline $OCTRH runtime hoists carriers into document.head under the client's precedence-group policy, and once client Float state exists, $OCTFR keeps dedupe/ordering in one authority through mid-stream hydration. A still-pending child boundary's sheet rides its parent's reveal wave, matching React's partial-boundary hoisting. Residuals (still open, documented): late-discovered resource hints and <script async src> Float resources still wait for hydration; reveal gating on sheet load (suspensey commits) stays a non-goal; two bundled runtime copies share one $OCTFR (pre-existing multi-copy hazard).
  • Transitive fallback-hoistable suppression — FIXED in fix: close the last Float engine gaps — fallback-hoistable suppression and head priority order #742 (merged). ssrHeadEl now suppresses while any pending arm is rendering, transitively (nested content arms never reset the depth) — a completed boundary inside a fallback contributes markup but no head lines. Fallback Float resources/hints stay registered (page-global; React allows fallback preloads). Ledger case …c4141d81 flipped to covered with the adapted upstream test. Was: Octane hoisted a <meta> from a completed boundary inside a pending boundary's fallback into the streamed head.
  • Adjudicate: client precedence group order under nested @try — adjudicated as FIX, implemented in fix: form Float precedence groups in tree discovery order on client mounts #739 (MERGED). Root cause was compile-time statement placement, not the reconciler: client resource calls sat at the body tail (after constructs mounted children), so ANY parent/child pair inverted, not just @try. Resource registrations now run after setup and before children mount — groups form in tree discovery order (parent first, suspended arms at reveal), matching SSR and React. The same placement rule exposed and fixed a latent SSR TDZ crash: a hoisted head element or resource whose attr reads a setup local (const slug = …; <link href={slug} precedence>) used to emit its registration ahead of the declaration and throw at render (this bit ssrHeadEl metadata hoists too). Capture-free head statements keep front placement, so arm-root sheets still ship with the streaming shell. Original observation: pure-client mounts inserted precedence groups in body-completion order (e.g. [three, one, two]) where SSR and React produce discovery order ([one, two, three]).
  • Server-side hoistable prioritization — FIXED in fix: close the last Float engine gaps — fallback-hoistable suppression and head priority order #742 (merged). <meta charSet> folds first (1024-byte parser window), then <meta name="viewport">, then everything else in discovery order — Fizz parity; the new HeadBuffer buckets joined both suspense-replay snapshot sites. Ledger case …ed14e46d flipped to covered.

Float behavioral gaps (from the 19.2.7 comparison in the comment feedback, 2026-08-12)

Verified against the ledger (the cited cases exist and are planned); these are behavioral differences, not missing citations:

  • Done in feat: close the React Float behavioral gaps (#711) #720 (itemProp at every classifier entry point incl. the Float resource forms; noscript exclusion is direct-children — the depth bound is documented in differences-from-react.md). Hoist exclusions: itemProp-bearing <meta>/<link> (microdata) and metadata/resources inside <noscript> must stay in their authored locations — Octane currently hoists them on both client and server (…18285c, …3bd259 + the noscript stylesheet/script cases).
  • Done in feat: close the React Float behavioral gaps (#711) #720. Font preloads force anonymous CORS: as: 'font' always emits crossorigin="", overriding a caller-supplied use-credentials (…dc93d1).
  • Done in feat: close the React Float behavioral gaps (#711) #720 (in-memory transfer + SSR coalescing; SSR-crossing transfer noted as residual in the PR). Preload → preinit option transfer: connection attributes and integrity from a prior preload must carry onto the initialized script/stylesheet; SSR should coalesce the redundant preload away (…b15c17).
  • Done in feat: close the React Float behavioral gaps (#711) #720, both cross pairings plus the SSR preload cross-guards from review. Module-script identity across SSR/client: Float module scripts and preinitModule use separate marker/identity maps, so the SSR↔client cross pairing duplicates executable scripts; hydration should adopt.
  • Done in feat: close the React Float behavioral gaps (#711) #720 (four distinct modes: omitted, '', anonymous, use-credentials). Preconnect identity includes CORS mode: key preconnect on (url, crossOrigin), not url alone.
  • Done in feat: close the React Float behavioral gaps (#711) #720. Responsive image preloads omit href when a valid imageSrcSet is present.
  • Done in feat: close the React Float behavioral gaps (#711) #720 (known-option allowlist; non-string hrefs dev-warn + no-op across all six entry points — the untrusted-URL suite now pins the stronger no-coercion contract). Hint validation holes: unknown option keys leak as attributes (React drops them); truthy non-string hrefs coerce instead of dev-warn + no-op (module variants too).

Test-evidence backlog (parity ledger)

1,928 cases remain planned (post-#738; was 1,931 post-#725, 2,048 post-#720). Notables:

Diagnostics backlog (docs/react-diagnostics-plan.md inventory) — MOVED to #744

Tracked in #744 from here on; kept below for the historical record.

  • ARIA name/casing family — Pending (no diagnostic parity yet; serialization behavior covered).
  • CSS style name/value/coercion warnings — Pending diagnostic audit (functional behavior covered, warning parity not established).
  • Named remainders in the Partial families: unknown-property variants, controlled-forms negatives, nesting/hydration message matrix, invalid-listener capture/replacement variants, resource prop-conflict warnings (preload/preinit variants — feat: close the React Float behavioral gaps (#711) #720 added Octane-authored validation warnings, but React MESSAGE parity for this family is still unaudited).
  • Three Float warning families deferred by test: disposition all 121 planned ReactDOMFloat parity cases with executable evidence #725 (ledger …77bece4a, …e1591cd6, …b5694dcf): precedence combined with resource-invalidating props, preload-then-<style> href collisions, and <style href> containing a space — Octane emits no warning for any of these yet.

Infrastructure

  • Fixed (differential fixtures no longer import the 1.5k-icon barrel: ~3.5s → ~37ms per mount, test: fix phosphor differential parity timeout by narrowing fixture imports #713): packages/phosphor-icons/tests/differential/parity.test.ts ("Camera renders byte-identical accessible duotone SVG") hits its 20s timeout intermittently under full-suite load while passing in ~4s standalone — observed three times on 2026-08-11. Needs its slowness diagnosed or a justified timeout bump; until then it muddies full-suite exit codes.

Context

🤖 Generated with Claude Code

Activity

  1. domgan-oai commented on Aug 12, 2026

    @domgan-oai
    Contributor

    🤖 Agent-authored parity follow-up: I compared the remaining Float/resource behavior with React DOM 19.2.7 and found several concrete gaps worth adding to this issue; these are behavioral differences, not merely missing ledger citations.

    1. Hoist exclusions for microdata and <noscript>. React leaves <meta itemProp="name" />, <link itemProp="url" />, and metadata/resources inside <noscript> in their authored locations. Octane currently hoists them out of the parent on both client and server, breaking microdata ownership and activating fallback-only resources. Existing planned cases: does not hoist anything with an itemprop prop (react-case-v1:3e6e9f228c7fd518285c), does not hoist inside noscript context (react-case-v1:63965da96baf7d3bd259), plus the stylesheet/script-in-<noscript> cases.

    2. Font preloads must always use anonymous CORS. preload('/font.woff2', { as: 'font' }) produces crossorigin="" in React, even if the caller supplied crossOrigin: 'use-credentials'. Octane omits the attribute or preserves the credentialed value, which can prevent reuse of the font preload. Planned case: always enforces crossOrigin "anonymous" for font preloads (react-case-v1:81adc7a9833bcddc93d1).

    3. Preload options must transfer to the initialized resource. After preload('/app.js', { as: 'script', crossOrigin: 'use-credentials', integrity: 'sha-test' }) followed by preinit('/app.js', { as: 'script' }), React carries the connection attributes and script integrity onto the actual <script>; Octane loses them. The equivalent stylesheet path also loses connection attributes. On SSR, React additionally coalesces preload → preinit into the initialized resource, while Octane retains the redundant preload. Planned case: can seed connection props for stylesheet and script resources (react-case-v1:872a854b30a254b15c17).

    4. Module scripts need shared client/hydration resource identity. A server-rendered Float module script followed by client preinitModule() for the same URL, or a server-rendered preinitModule() script followed by client Float discovery, creates duplicate executable <script> elements because the two paths use separate marker/identity maps. React's client adopts the existing script instead. This is specifically a client/hydration issue; classic-vs-module SSR emission has different semantics.

    5. Preconnect identity must include the CORS mode. React distinguishes preconnect(url), preconnect(url, { crossOrigin: 'anonymous' }), and preconnect(url, { crossOrigin: 'use-credentials' }). Octane keys only by URL, so discovering the default connection first suppresses the anonymous and credentialed connections.

    6. Responsive image preloads should omit the fallback href. With as: 'image' and a valid imageSrcSet, React emits the responsive imagesrcset/imagesizes preload without href; Octane always retains href on both client and server.

    7. Resource-hint validation/filtering still has holes. Unknown option keys become DOM/SSR attributes (madeUp: 'x' becomes madeup="x"), while React drops them. Truthy non-string href values are also coerced into URLs instead of producing React's development warning and no-op; this affects the module-hint variants as well.

    Suggested evidence: exact-title client + SSR conformance cases for each applicable ledger entry, hydration-adoption coverage for module scripts, and negative microdata/<noscript> fixtures before marking the corresponding Float cases covered.

  2. trueadm commented on Aug 12, 2026

    @trueadm
    CollaboratorAuthor

    Verified the feedback above against the ledger — all four cited case ids exist and are planned, and the seven behavioral differences are consistent with how the current Float implementation was scoped in #709/#712/#715 (generic attribute pass-through, url-keyed identity, hoist-everything classification). Folded them into the issue body as a new Float behavioral gaps section with checkboxes. Worth noting for whoever picks this up: item 1 (itemProp/noscript hoist exclusions) is a compiler-classification change with hydration-cursor implications on both sides, and item 4 (module-script identity) needs the hydration-adoption pattern the non-module resources already use (data-oct-res-style seeding) extended to a shared module namespace.

    🤖 Generated with Claude Code

  3. trueadm commented on Aug 12, 2026

    @trueadm
    CollaboratorAuthor

    Closing: every behavioral item from the React 19.2 parity audit has shipped — #709, #712, #715, #720, #725, #727, #738, #739, and #742 (all merged). Final ledger state on main: ReactDOMFloat-test.js at 3 planned cases (all warning-message families) and 1,922 planned overall, tracked by the ledger and the CI-checked coverage report. The remaining warning-message parity work (the three Float families plus the ARIA/CSS/partial-family audits) continues in #744.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions