Skip to content

feat(alien-signals): port react-alien-signals 0.4.0 over alien-signals 3.2.1 - #1860

Merged
trueadm merged 3 commits into
mainfrom
feat/alien-signals-0.4.0
Oct 7, 2026
Merged

trueadm merged 3 commits into
mainfrom
feat/alien-signals-0.4.0

Conversation

@trueadm

@trueadm trueadm commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Re-pins @octanejs/alien-signals from [email protected] to [email protected] and moves the workspace onto a single [email protected].

  • Pin: tag v0.4.0, commit 2d85d8d063d79332ec7c7e99c07bda3a722f491a. The npm SLSA provenance attestation for the published tarball names this commit. The package now declares license: "MIT", which matches the registry and LICENSE.upstream; the license bytes are unchanged.

  • Surface: ports everything in 0.4.0:

    • helpers: batch, trigger, and the previous-value argument to createComputed
    • hooks: useDeferredSignalValue, useSignalSelector, useSignalPassiveEffect, useSignalLayoutEffect, useSignalInsertionEffect
    • optional deps on useSignalEffect and useSignalScope
    • types: SignalSetter, SignalEffectCallback, SignalEffectDependencies

    Components that read the same signal now share one core subscription, as they do upstream.

  • Divergences: both recorded divergences are dropped. 0.4.0 declares the readable useSignalValue overload and starts scopes in a post-commit effect. The port now follows upstream exactly: useSignalScope returns a stable stop handle that stops the running scope, does nothing before commit, and starts a new scope when its deps change. WritableSignal is now the raw core signal, so updater functions go through the hook setters. The changeset lists these behavior changes for callers.

  • Core: the alien-signals catalog entry goes from 1.0.4 to 3.2.1, and octane's exact pin from 3.2.0 to 3.2.1. Octane imports only alien-signals/system, which is byte-identical between 3.2.0 and 3.2.1, so core needs no code change. The lockfile diff contains only these entries.

Evidence

  • Vendored upstream/ tree re-materialized and verified offline against the new audit/upstream.lock.json.

  • The pristine 0.4.0 bun suite passes 36/36 against the recorded workspace oracle (React 19.2.7, which satisfies the >=19.2.0 peer).

  • The adapted suite passes 36/36. Each case keeps its upstream title and a // Per src/index.test.ts:<line> citation. The 10 new integration cases run on Octane primitives, including SSR through the shared hydration fixture renderer, StrictMode, startTransition, and useDeferredValue.

  • Type lanes:

    • The pristine upstream typecheck passes.
    • The adapted counterpart matches all 90 accepted public-API calls one-for-one. The 0.4.0 suite has no @ts-expect-error groups.
    • The paired public-API probes are rewritten for 0.4.0, with negative controls for updater-on-signal, non-signal effect deps, and a missing useComputed deps argument.
  • The alien-signals parity libs needed small, tested changes for the 0.4.0 suite shape:

    • named hook.result.current handles
    • argument-free toBeUndefined()/toBeNull()
    • nested describes in bun's JUnit output, which writes a nested classname innermost-first with a double-escaped separator
    • a typecheck suite with no assertion groups
    • quote and trailing-comma differences, which are formatter output

    Each change has negative controls.

  • The playground demo now uses useSignalSelector. Octane contracts cover the new stop-handle semantics and explicit dependency lists.

  • react-port preflight (--npm-provenance --classify alien-signals=framework-neutral) marks the 0.4.0 pin satisfied by @octanejs/alien-signals, and the terminal check reports terminal.

Validation

  • pnpm format:files:check (changed files)
  • pnpm typecheck (full run left to CI; octane-tsc -p packages/alien-signals/tsconfig.json and tsrx-tsc -p packages/alien-signals/typetests/tsconfig.adapted.json pass)
  • pnpm test (full run left to CI)
  • targeted tests:
    • vitest run --project alien-signals --project alien-signals-ssr: 46/46
    • harness.mjs run-required --manifest packages/alien-signals/audit/react-parity.json: all 5 lanes
    • react-parity/check.mjs --validate-only
    • node --test scripts/react-parity/alien-signals-*.test.mjs: 58/58
    • materialize run --check
    • pnpm sync (clean)

Risk / follow-ups

  • The scope and signal behavior changes above affect existing @octanejs/alien-signals callers. They are deliberate React-parity changes released as a minor.
  • docs/experimental-scoped-signals-evidence.md and docs/async-signals-performance.md still name 3.2.0 and 1.0.4. They are dated measurement records and were left untouched.

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


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


Note

Medium Risk
Upgrades the reactive core and changes writable-signal and scope-stop semantics for existing @octanejs/alien-signals consumers; risk is mitigated by broad parity and contract tests but still warrants migration review.

Overview
Re-pins @octanejs/alien-signals to [email protected] and unifies the workspace on [email protected] (including Octane’s exact pin). The binding implementation is rewritten to match upstream: shared useSyncExternalStore subscription per signal, core batch / trigger, useDeferredSignalValue, useSignalSelector, insertion/layout/passive signal effects, optional dependency lists on useSignalEffect / useSignalScope, and createComputed’s previous-value argument.

Caller-facing semantics align with 0.4.0 rather than the old Octane divergences: WritableSignal only accepts values (functional updates go through useSignal / useSetSignal setters), and useSignalScope exposes a stable stop that is a no-op before commit and restarts when deps change. Documented divergences are cleared; parity audits, vendored upstream, and adapted/pristine suites expand to 36 runtime cases plus updated type inventories.

Docs, changesets, and status metadata reflect the new pin and verification scope (batching, selectors, deferred reads, phased effects, SSR/hydration).

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

trueadm and others added 2 commits October 7, 2026 21:18
…s 3.2.1

Re-pin @octanejs/alien-signals from react-alien-signals 0.3.0 to 0.4.0
(tag v0.4.0, commit 2d85d8d063d79332ec7c7e99c07bda3a722f491a, named by
the npm SLSA provenance attestation) and move the workspace to a single
alien-signals 3.2.1.

- Port the full 0.4.0 surface: batch, trigger, createComputed's previous
  value, useDeferredSignalValue, useSignalSelector, the passive/layout/
  insertion signal effects, optional deps on useSignalEffect and
  useSignalScope, and the SignalSetter/SignalEffectCallback/
  SignalEffectDependencies types. Readers of one signal share one core
  subscription.
- Drop both recorded divergences: 0.4.0 declares the readable
  useSignalValue overload and starts scopes after commit, so the port now
  follows upstream exactly (stable stop handle, no-op before commit).
- Re-vendor the pinned upstream tree and lock, regenerate inventories,
  and adapt all 36 upstream cases plus the accepted-call type inventory.
- Teach the alien-signals parity libs about the 0.4.0 suite shape:
  named renderHook handles, argument-free nullish matchers, nested bun
  JUnit describes, a typecheck suite without @ts-expect-error groups,
  and formatter-only quote/comma differences.
- Bump octane's alien-signals pin to 3.2.1; it imports only
  alien-signals/system, which is unchanged from 3.2.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability labels Oct 7, 2026
@trueadm
trueadm marked this pull request as ready for review October 7, 2026 20:20
# Conflicts:
#	packages/alien-signals/audit/react-parity.json
#	packages/alien-signals/audit/runtime-transformation-ledger.json
#	packages/apollo-client/audit/react-parity.json
#	packages/aria/audit/react-parity.json
#	packages/base-ui-utils/audit/react-parity.json
#	packages/base-ui/audit/react-parity.json
#	packages/better-auth/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/email/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/octane-evals/datasets/train/user-apps-v1/manifest.jsonl
#	packages/octane-is/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/select/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/xyflow/audit/react-parity.json
#	packages/zag/audit/react-parity.json
#	packages/zustand/audit/react-parity.json
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🟡 js-framework: 2 timed operation(s) slower beyond ±3%

Compares 21f911d51, the merge commit's first parent with ed249324d on the same runner. A byte value over its committed budget or any increase in a js-framework work counter fails this check. Wall time is a report: base and head samples alternate in one browser, and an operation is called slower or faster only when the 95% confidence interval of its ratio excludes ±3%. Workflow run

js-framework: 1k/10k row operations

target operation base ms head ms head/base 95% CI
octane-tsrx clear 76.992 82.500 +11.8% +4.2% … +28.8% 🟡 slower
octane-jsx runlots 50.417 55.108 +8.7% +5.5% … +15.8% 🟡 slower
All 20 timed operations (18 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 5.200 5.025 +1.6% −6.9% … +9.5% ⚪ within noise
octane-tsrx replace 15.542 15.758 −2.5% −11.8% … +6.0% ⚪ within noise
octane-tsrx add 4.858 4.575 +3.0% −5.7% … +5.7% ⚪ within noise
octane-tsrx update 0.220 0.212 −3.5% −7.9% … +3.5% ⚪ within noise
octane-tsrx select 0.010 0.010 ±0.0% −7.9% … +3.5% ⚪ within noise
octane-tsrx swap 0.064 0.062 −1.3% −4.5% … +3.3% ⚪ within noise
octane-tsrx remove 0.034 0.036 +2.8% −1.2% … +9.8% ⚪ within noise
octane-tsrx runlots 47.258 49.017 +2.8% −1.5% … +14.6% ⚪ within noise
octane-tsrx select_lots 0.009 0.009 −3.7% −11.4% … +4.8% ⚪ within noise
octane-tsrx clear 76.992 82.500 +11.8% +4.2% … +28.8% 🟡 slower
octane-jsx run 6.550 5.800 −4.5% −17.3% … +3.2% ⚪ within noise
octane-jsx replace 17.408 16.417 −0.4% −14.7% … +9.5% ⚪ within noise
octane-jsx add 7.808 6.308 −8.4% −16.8% … +8.8% ⚪ within noise
octane-jsx update 0.544 0.549 +1.9% −9.3% … +13.0% ⚪ within noise
octane-jsx select 0.278 0.262 −5.6% −13.7% … +4.1% ⚪ within noise
octane-jsx swap 0.452 0.465 +10.9% −6.4% … +20.7% ⚪ within noise
octane-jsx remove 0.412 0.410 +0.3% −5.3% … +16.9% ⚪ within noise
octane-jsx runlots 50.417 55.108 +8.7% +5.5% … +15.8% 🟡 slower
octane-jsx select_lots 5.871 6.071 −9.1% −20.6% … +35.4% ⚪ within noise
octane-jsx clear 91.342 81.383 −3.9% −12.3% … +6.6% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

No changes across 60 measured values.

Public-import reachability bundles (bytes)

No changes across 111 measured values.

@trueadm
trueadm merged commit a3dcbd9 into main Oct 7, 2026
23 of 29 checks passed
@trueadm
trueadm deleted the feat/alien-signals-0.4.0 branch October 7, 2026 21:02
trueadm added a commit that referenced this pull request Oct 7, 2026
Conflicts: the 87 react-parity manifests and the user-apps-v1 manifest
record the lockfile hash, which #1860 (react-alien-signals port) changed.
pnpm sync regenerated them. The merged lockfile needs no change from
`pnpm install --lockfile-only` and still holds no TypeScript 7.0.2.

Also takes #1862 and its hydrate-frame budget raise (#1863). This branch
changes no bundled code, so its budgets stay main's.

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 feat PR: new feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant