Repository navigation
test(octane): pin early host ownership in a container whose previous root fell back - #1826
Merged
Merged
Conversation
…root fell back A previous root's hydration recovery once left its container marked as repaired, so a later root reusing that container could accept an external change to an early host's site while suspended (#1777). The boundary/root fallback redesign (#1784) removed that state: an early host's site check is now purely structural. Run the two suspended early-host handoff groups in a container whose previous root fell back (fallBackOnce, which verifies a real fallback first), and under Strong compilation, so a lingering per-container exemption fails them. Fixes #1777 Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm
marked this pull request as ready for review
October 6, 2026 19:28
Contributor
Benchmark report
Compares js-framework: 1k/10k row operations
All 20 timed operations (19 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)No changes across 60 measured values. Public-import reachability bundles (bytes)No changes across 105 measured values. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| 🔵 In progress View logs |
octane-website | 0374489 | Oct 06 2026, 08:12 PM |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1777 by pinning the behavior that #1784 already delivered. This PR changes only tests.
Before #1784, a root's per-site hydration repair left its container marked as repaired. A later root that reused the container could then accept an external change to an early host's site while it was suspended. It also retired the early binding instead of refusing. #1784 replaced per-site repair with React 19's boundary/root fallback. An early host's site check (
valid()indom-bindings.ts) is now purely structural: parent chain, both neighbors, and descriptor id. No state from an earlier root can authorize a changed site. The latest comment on the issue confirms the bug no longer reproduces.Changes to
packages/octane/tests/behavior-root.test.ts:fallBackOncehydrates and unmounts a root in the same container that really falls back. It checks for one recoverable error and that the server DOM was replaced.onUncaughtErroronce as Version Packages #75. Nothing commits, the early binding is not cleaned up, and a later publish still reaches the original button. The unchanged case hands off, and the nested case falls back the root.useLayoutEffectdeps replace[], because Strong rejects explicit deps.The helper forces the fallback with a text mismatch. A stale element inside a template element, as in the issue's primer, causes no fallback. This is the documented intentional divergence that static template descendants are not walked.
Validation
pnpm format:check(scopedpnpm format:files:checkon the changed file: clean)pnpm typecheck(scopedpnpm typecheck:fileson the changed file: the same 3 pre-existing errors asmain, none new)pnpm test(left to CI)octaneandoctane-prod.pnpm sync: no generated changes.Risk / follow-ups
No runtime change, so there is no changeset.
Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
Only test coverage changes; no production runtime or API changes.
Overview
Test-only expansion in
behavior-root.test.tsto lock in #1777: early host behavior during suspended hydration must not depend on a prior root in the same container having fallen back.Adds
fallBackOnceto force a real hydration fallback (text mismatch → recoverable error, server DOM replaced) and unmount incontainer. The two suspended early-host suites now matrix over dev/prod, Strong compilation, and fresh vs reused container (viasuspendedHandoffModes/suspendedHandoffModein test titles), passing{ strong }intoauthoredPresentationand callingfallBackOncewhenreusedis true.Fixture sources drop explicit
useLayoutEffect(..., [])deps so Strong compilation accepts the tests.Reviewed by Cursor Bugbot for commit 0374489. Bugbot is set up for automated code reviews on this repo. Configure here.