Repository navigation
Conversation
…scoped-async-signals # Conflicts: # docs/packages.md
…scoped-async-signals # Conflicts: # packages/alien-signals/audit/react-parity.json # packages/apollo-client/audit/react-parity.json # packages/aria/audit/react-parity.json # packages/base-ui/audit/react-parity.json # packages/cmdk/audit/react-parity.json # packages/colorful/audit/react-parity.json # packages/day-picker/audit/react-parity.json # packages/dexie/audit/react-parity.json # packages/dnd-kit/audit/react-parity.json # packages/draggable/audit/react-parity.json # packages/drei/audit/react-parity.json # packages/dropzone/audit/react-parity.json # packages/embla-carousel/audit/react-parity.json # packages/floating-ui/audit/react-parity.json # packages/formisch/audit/react-parity.json # packages/gsap/audit/react-parity.json # packages/hook-form/audit/react-parity.json # packages/i18next/audit/react-parity.json # packages/inertia/audit/react-parity.json # packages/ink/audit/react-parity.json # packages/input-otp/audit/react-parity.json # packages/intersection-observer/audit/react-parity.json # packages/jotai/audit/react-parity.json # packages/lexical/audit/react-parity.json # packages/livestore/audit/react-parity.json # packages/lucide/audit/react-parity.json # packages/mantine-hooks/audit/react-parity.json # packages/markdown/audit/react-parity.json # packages/mobx/audit/react-parity.json # packages/monaco-editor/audit/react-parity.json # packages/motion/audit/react-parity.json # packages/nuqs/audit/react-parity.json # packages/opentui/audit/react-parity.json # packages/pdf/audit/react-parity.json # packages/phosphor-icons/audit/react-parity.json # packages/popper/audit/react-parity.json # packages/radix/audit/react-parity.json # packages/rainbowkit/audit/react-parity.json # packages/react-error-boundary/audit/react-parity.json # packages/react-map-gl/audit/react-parity.json # packages/recharts/audit/react-parity.json # packages/redux-toolkit/audit/react-parity.json # packages/redux/audit/react-parity.json # packages/remix-router/audit/react-parity.json # packages/resizable-panels/audit/react-parity.json # packages/rxjs/audit/react-parity.json # packages/shadcn/audit/react-parity.json # packages/solana-kit/audit/react-parity.json # packages/sonner/audit/react-parity.json # packages/spring/audit/react-parity.json # packages/streamdown/audit/react-parity.json # packages/styled-components/audit/react-parity.json # packages/swr/audit/react-parity.json # packages/syntax-highlighter/audit/react-parity.json # packages/tanstack-ai/audit/react-parity.json # packages/tanstack-devtools/audit/react-parity.json # packages/tanstack-form/audit/react-parity.json # packages/tanstack-hotkeys/audit/react-parity.json # packages/tanstack-pacer/audit/react-parity.json # packages/tanstack-query/audit/react-parity.json # packages/tanstack-router-ssr-query/audit/react-parity.json # packages/tanstack-router/audit/react-parity.json # packages/tanstack-store/audit/react-parity.json # packages/tanstack-table/audit/react-parity.json # packages/tanstack-virtual/audit/react-parity.json # packages/testing-library/audit/react-parity.json # packages/textarea-autosize/audit/react-parity.json # packages/three/audit/react-parity.json # packages/tiptap/audit/react-parity.json # packages/transition-group/audit/react-parity.json # packages/usehooks-ts/audit/react-parity.json # packages/valtio/audit/react-parity.json # packages/vaul/audit/react-parity.json # packages/visx/audit/react-parity.json # packages/wagmi/audit/react-parity.json # packages/waypoint/audit/react-parity.json # packages/window/audit/react-parity.json # packages/xstate-store/audit/react-parity.json # packages/xstate/audit/react-parity.json # packages/zag/audit/react-parity.json # packages/zustand/audit/react-parity.json
domgan-oai
marked this pull request as ready for review
August 27, 2026 23:04
2 of 5 tasks
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
This is the requested experimental implementation of RFC 2. The author has marked it ready so CI can run; there is no package release or merge recommendation. The primary integration path is compiled
@{}TSRX components.The new
octane/signalsengine uses the public Alien Signals 3.2.0 system API. Explicit scopes own writable and derived state, revocable async requests, streams, retained results, serialization, and historical adoption. Query arguments are copied and canonicalized; request sharing ends when the last selector leaves. The existing Alien Signals binding remains on its separate 1.0.4 contract.This consolidation fixes missed reads in parameter defaults and indirect returns by collecting around actual runtime component invocation. Opted-in inferred
useMemocallbacks validate and replay native read evidence while retaining lexical dependency inference. Explicit arrays andnullkeep their contracts.latestpreserves a whole result, including its identity and commands, and retirement of a contributing live owner revokes it even after dependency replacement.isPendingmeasures expression availability; snapshots describe background activity. Serialized seeds are copied data owned by the adopter and its frame leases.The changes reuse Octane cleanup scopes, scheduling, acceptance, Suspense, and hydration. Held output now keeps its DOM, refs, effects, and native read subscriptions together until replacement work is accepted. Compiler activation is separate from collection so unused native adapter implementations stay out of ordinary bundles. Ordinary return-element syntax inside
.tsrxhas secondary compatibility coverage; it does not replace the compiled TSRX template path.The performance follow-up avoids duplicate native collection setup when invocation collection already supplies the owner, observer, and write guard. Child scopes still retire their own obsolete reads, and stored-value witnesses use rendering context rather than a cleanup token to decide whether to collect. No graph cache, candidate pool, or additional retained state is introduced.
The API guide, accepted plan, evidence report, and TSRX performance report separate implemented behavior, measured costs, and open gates. The performance follow-up starts from consolidated draft
422c2c937784af835c64d6fae5a39162143c7a44and also compares with its predecessorcd9ed33754bfc3eeb144ba256dc9b437614e3e92. The branch also incorporates upstreamf036bad8d1e0e095694b8bbc71e95d13e01a7330; that website-only update does not change measured inputs.The CI follow-up in
530ee9a0abe35c5bc1ea0a1da0e44482306a6e42fixes nested Suspense ref cleanup, caught deletion cleanup that connected an abandoned replacement, and urgent state that superseded every held transition update. It adds public regressions while retaining the original TanStack Query and boundary assertions. Native compiler-version and server-hook errors now use the production catalog and generated CLI explanations. The remaining changes repair benchmark discovery, the CommonJS export contract, a forbidden Formisch config fingerprint, generated eval digests, and formatting.The final CI follow-up in
4bc7058bea6093e9e33df6d4e8d3714821700ca2corrects test execution only. The native type-classifier suite now declares its Node environment; all 14 existing cases and assertions are retained. Browser discovery checks actual files against project include/exclude globs, rather than counting shared directory prefixes. An explicit browser glob also prevents the native browser suite from leaking into ordinary shards: Vitest does not expand a bare directory exclusion. Runtime code, compiler options, and benchmark behavior are unchanged.The CI repair report and final evidence manifest record the repaired source, measurements, commands, and limitations. Earlier reports remain historical rather than being retagged as current checks.
Validation
git diff --check. Earlier formatting provenance proves captured JSON values and measured source hashes were preserved.pnpm sync,pnpm format:check,pnpm typecheck, andpnpm test.CI run 33157294097 passed every required and relevant job on
4bc7058bea6093e9e33df6d4e8d3714821700ca2, including formatting/workflow checks, all four main test shards, all four React parity shards, typechecks, Chromium, package validation/builds, eval corpus, runtime loaders, Astro, website, examples, Lynx, Three, and CI provenance. Cursor Bugbot also completed on this head without findings. The PR remains ready and awaits maintainer approval; it has not been merged.Recorded local locked-install attempts received HTTP 403 for TSRX npm payloads, including approved retries. The supplemental compiler uses verified public tag
@tsrx/[email protected]at commit7cb01278dff7aebfd25cbf5abcd2d47c6da7d81aplus the existing repository patch; it is not an npm SRI match or a complete locked workspace. No locked versions or registry policy were changed. The final pre-push sync ran through package inventory and stopped at the missing@tsrx/prettier-plugin; the remaining canonical generators passed separately on identical source and their generated changes are committed. Local source/toolchain limits remain distinct from the new CI run.The previously disclosed nested-portal ref failure is now fixed, with inner-first, outer-first, simultaneous, and reentrant teardown controls. Its earlier reproduction on another experimental draft did not establish upstream-main behavior. Earlier type, publication, retention, model, and supplemental resolver reports retain their original scope and hashes; they are not silently counted as fresh verification of the repaired source.
Risk / follow-ups
For compiled
@{}TSRX one-signal prop updates, the two paired wall ratios againstcd9ed337are 1.026 (95% interval 0.988–1.065) and 0.997 (0.985–1.009). All five focused cases include parity in both repeats. The earlier +28.6% slowdown was not reliably reproduced, so these near-parity point estimates establish neither a speedup nor exact zero overhead. The separate full mixed runner returns an unfavorable 1.085 ratio for that case: 1.707 to 1.852 microseconds with 17.9%/34.5% relative margins of error. It remains in the report alongside every other unfavorable row.The near-parity statement does not cover ordinary return-JSX compatibility. In the full runner its one-signal prop update, signal update, and SSR ratios remain 1.980, 2.543, and 1.918; the enabled unread return case is 2.157 for prop updates and 3.840 for SSR. These costs remain explicit secondary compatibility limits.
Both new public-entry builds reproduce their output hashes. The ordinary client and server export bundles are byte-identical to
f16c0bc7, at 44,134 and 12,340 gzip bytes. The earlier growth of 130 client / 94 SSR gzip bytes versuscd9ed337remains disclosed. The boundary guard still excludes the scoped engine and emitted native adapter/collector implementations from ordinary exports. Complete compiled-fixture sizes are recorded separately; no unchanged-application-bundle claim is made.The unchanged scoped engine retains the earlier consolidation performance limits versus raw Alien Signals: at workload scale 10,000 its broad batch scores are about 2.3–4.0× raw, construction 7.8–16.7×, and disposal 4.8–6.8×. Its chain batch score also rises about 19% versus the previous draft. Both matched graph runs use an explicit 8 MiB Node stack after the raw comparator hit the default stack limit during deep-chain teardown; the failed run is preserved. These are workload results, not universal safe scales or a UI speed claim. Secondary ordinary-return compatibility costs remain disclosed separately.
The earlier foreign-retention workload leaves zero retired consumers after 1,000 lifetimes, using the exact earlier engine bundle. Its earlier deliberate backlink fault detects the expected retained owners. That does not establish async, historical-frame, native DOM, or DevTools retention. Larger TSRX application/lifecycle benchmarks remain open; passing CI does not establish those performance or retention bounds.
Local
useDerived$and async hooks remain deferred because speculative closures cannot safely update transitive committed caches. Mutation journals, remote-write reconciliation, deep stores, pending server-producer transport, non-DOM hosts, and atomic cross-root reveal remain outside scope. Arbitrary local aliases of native hook imports and canonical native-option forwarding intsrx-tscremain limitations. The PR stays ready after current-head CI and Bugbot passed; maintainer approval is still required. No merge or package release is part of this work.Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Benchmark and documentation additions are low risk; the paired changesets describe experimental runtime/compiler signal behavior whose acceptance depends on separate core code not shown in this diff chunk.
Overview
Adds release changesets and a large Node-only benchmark package (
benchmarks/scoped-signals) to measure and gate the experimental scoped signal engine and compiler native read path described in the changeset text (opt-in Alien Signals 3.2.0, owned async resources,nativeReads, DevTools metadata).The unified runner gains
scoped-signals(renderer-free graph timing vs raw Alien 3.2.0, continuous partial disposal, optional heap diagnostics) andscoped-native-reads(production-compiled.tsrxmount/update/SSR/collector costs plus deterministicuse()five-dependency hit/miss guards inratios.json). Supporting runners cover bundle boundaries (ordinary entries must not retain the engine or native adapters), async/foreign retention workers with offline heap scanners, native collector protocol controls, DOM/SSR ABI smoke, and published ESM/CJS entry probes, with 2026-08-27 results documented in-repo.A separate changeset patches
@octanejs/mcp-serverto expose these suites through the benchmark tool schema.Reviewed by Cursor Bugbot for commit 4bc7058. Bugbot is set up for automated code reviews on this repo. Configure here.