Repository navigation
feat: add behavior-only roots and external DOM ownership - #671
Merged
domgan-oai merged 3 commits intoAug 9, 2026
Merged
domgan-oai merged 3 commits into
domgan-oai merged 3 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
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 c3c43f6. Configure here.
trueadm
marked this pull request as ready for review
August 9, 2026 22:52
This was referenced Aug 9, 2026
Merged
7 tasks done
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
attachBehaviorRootfrom bothoctaneand the focusedoctane/behaviorentry point; behavior-only bundles retain no component runtime, compiler, or server modules.Eventidentity/trust, original node identity and namespaces, and once-only native link/form activation without synthetic redispatch.llms.txt; automatically expose the same material through MCP/llms.txt,/llms-full.txt, and documentation search.ReadableStreamSSR regressions, public typings, package/distribution and production-bundle guards, documentation, a patch changeset, and WebKit installation only in the existing browser CI lane.Closes #650.
Validation
pnpm format:checkpnpm typecheck— the full 251-project workspace was not typechecked; both TypeScript 5.9 andtsgopass for the complete Octane package and public typetests.pnpm test— every unscoped monorepo project was not run; the actual root test command, package prechecks, and complete Octane development/production projects passed below.pnpm exec vitest run --project website-unit --maxWorkers=4 --reporter=dot— 332 public-website tests passed.pnpm exec vitest run --project website-mcp-unit --reporter=dot— 41 MCP content, search, and HTTP endpoint tests passed.pnpm exec vitest run --project website-integration website/tests/ssr-smoke.test.ts --reporter=dot— 8 production Vercel-build and SSR tests passed, including the rendered behavior-root guide.cmp website/public/llms.txt website/.vercel/output/static/llms.txt— deployed model-facing asset exactly matches its hand-authored source.pnpm --dir website typecheckandpnpm exec tsgo --noEmit -p website-mcp/tsconfig.json.pnpm syncpnpm test --project octane --project octane-prod --maxWorkers=4 --reporter=json --outputFile=/private/tmp/octane-671-review-core-results.json— 11,251 passed across 2,557 suites, including all package prechecks.pnpm exec vitest run --project octane-events-browser packages/octane/tests/browser/behavior-root/behavior-root.test.ts --reporter=verbose --silent=false— 12 passed across Chromium and WebKit.pnpm exec vitest run --project octane --project octane-prod packages/octane/tests/behavior-root-bundle.test.ts— isolated public entry points and existing root reachability.pnpm --filter octane build— production modules, declarations, and public distribution/export verification.pnpm exec tsc --noEmit -p packages/octane/tsconfig.jsonandpnpm exec tsc --noEmit -p packages/octane/typetests/tsconfig.json.pnpm exec tsgo --noEmit -p packages/octane/tsconfig.jsonandpnpm exec tsgo --noEmit -p packages/octane/typetests/tsconfig.json.GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false pnpm ci:workflow:test— 81 passed.node benchmarks/bundle-size/run-minimal.mjs— all 28 production builds and executable semantic oracles passed; no existing scenario retains the new behavior module.pnpm packages:inventory:checkandpnpm changeset:check.Existing measured bundle sizes match the exact current-
mainbaseline:createRoot94,620 raw / 31,274 gzip,hydrateRoot109,856 / 36,065, and hydration event capture 3,117 / 1,418. The standalone behavior entry is 12,038 bytes minified / 3,741 gzip and contains only the behavior module.Risk / follow-ups
node benchmarks/bench.mjs --quick --ratios bundle-reachabilitypasses 82/84 local ratio guards. The twosuspense-transitionceilings already fail identically on untouched upstreammainunder local Node 26: 120,585 > 120,448 raw and 34,303 > 34,288 brotli. A same-HEAD baseline rebuild proves the proposed change causes neither failure; CI pins Node 24.:emptyand ancestor combinators remain correct. Attribute-heavy external streams pay for a selector rescan per observer delivery; selector-aware streaming optimizations can be evaluated separately.Provenance
agent-authored)Note
Medium Risk
New client lifecycle surface (ownership, async readiness, event queuing) with broad test coverage; existing
createRoot/hydrateRootbundles are guarded not to pull it in unintentionally.Overview
Adds
attachBehaviorRootand a tree-shakeableoctane/behaviorentry so apps can wire delegated native events and disposableadopthooks onto server-rendered or independently streamed markup without hydrating, rendering, or reconciling that DOM.The new runtime tracks document-scoped roots, external ranges with explicit owners and optional
readygates, nested nearest-owner resolution,replacehandoffs, behavior dependencies/conflicts, queued interactions that replay the original trustedEvent(no redispatch or double form/link activation), MutationObserver reconciliation for streamed/attribute changes, and DOM-preserving disposal by default.octanere-exports the same API/types; docs (Core APIs, deferred hydration, SSR,llms.txt), search/MCP metadata, a patch changeset, dist verification, extensive unit/integration tests (including Chromium/WebKit Playwright), and CI WebKit install for the browser lane land with the feature.Reviewed by Cursor Bugbot for commit 8ae47e7. Bugbot is set up for automated code reviews on this repo. Configure here.