Skip to content

feat: stabilize signals and document automatic native reads - #997

Merged
trueadm merged 5 commits into
mainfrom
codex/stable-signals
Sep 8, 2026
Merged

trueadm merged 5 commits into
mainfrom
codex/stable-signals

Conversation

@trueadm

@trueadm trueadm commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Promote octane/signals to a stable API that works without a compiler option. Signal imports and the existing $ capability naming convention automatically select native read tracking in full compilation, plain custom hooks, and editor diagnostics. Modules without signal capability syntax keep their ordinary compiler output.

Add a Signals guide to the website, navigation, search, sitemap, and llms.txt, with examples covering local/shared state, async queries, streams, retained values, memo dependencies, disposal, and SSR/hydration. Move the detailed reference to docs/signals.md and retain a link from the experimental URL.

Changes

  • Remove the public nativeReads option and its app/Vite/Rspack/Rsbuild forwarding.
  • Exercise existing signal suites and real browser builds through standard compiler configuration; add a regression for memoized reads reached through a quoted property without a direct signals import.
  • Keep explicit dependency arrays, scope ownership, renderer support limits, and the separate Alien Signals binding contract intact.
  • Update the performance harness to compare ordinary modules and signal capability modules against archived experimental compilers. Include patch changesets for core and the affected integrations.

Validation

  • After integrating current main: 18,277 core/signal/integration tests passed across 1,060 files, plus 14 expected failures. Command: pnpm exec vitest run --project octane --project octane-prod --project 'octane-signals*' --project vite-plugin --project rspack-plugin --project rsbuild-plugin --project app-core --exclude '**/browser/**' --silent=passed-only.
  • Signal browser tests: 4 passed in development and production.
  • Website/MCP unit tests: 470 passed; production website build passed. The new /docs/signals page also passed real-browser dev/prod SSR and hydration checks (2 tests) against a fresh production build.
  • All 20 documented component compilations passed in dev/prod/Strong/server modes without signal options.
  • Core source/API, affected integration, and website typechecks passed.
  • Review regression: type-only signal imports and aliases compile on non-DOM renderers in dev/prod, while mixed runtime imports still receive signal diagnostics. Six cases failed before the fix; all seven new cases pass.
  • New quoted-property regression failed with stale output under a deliberate detection fault, then passed after restoration.
  • pnpm sync completed.
  • All 18 measured renderer outputs and bundles match current main byte-for-byte; recorded evidence.
  • Scoped formatting and changeset checks passed.
  • Current-head CI passed all 26 jobs on fed1ce550: lint/typecheck, all test and React-parity shards, Chromium and website integration, example builds, package validation, renderer compatibility, and provenance. Bugbot also passed; its type-only import finding is fixed and resolved.

An earlier combined website run stalled and timed out; separate website unit/build runs and a later fresh-build browser run for the Signals guide passed. pnpm typecheck:files chooses plain TypeScript for core test files importing TSRX; an additional TSRX-aware test-only program reports pre-existing declaration/fixture errors also reproduced from the baseline. The supported source/API and website typecheck programs passed. Repo-wide pnpm test and pnpm typecheck were not run locally; CI covers the broader workspace.

Risk / follow-ups

Automatic selection follows authored signal imports and $ capability syntax and preserves runtime capture throughout each selected module. Native rendering remains limited to DOM client/server. The benchmark comparison checks compiler output and bundles; it does not claim a browser timing improvement.

Provenance

  • An agent produced this diff (agent-authored)

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
Compiler and config surface changes how every signals-capable module is compiled (whole-module native tracking from $/imports), which is broad but covered by large test and byte-identical benchmark baselines.

Overview
Promotes octane/signals to a stable API and drops the experimental nativeReads compiler/app/plugin option everywhere (app-core, Vite, Rspack, Rsbuild, bundler defaults).

Compiler behavior change: nativeReadOptions walks the module AST and turns on native signal read tracking when it sees octane/signals imports (non–type-only) or $ capability syntax (identifiers, members, properties)—not from build config. Full compile and plain hook slotting both use this; the old OCTANE_NATIVE_READ_OPT_IN path is removed. Type-only signal imports stay off the native path so non-DOM renderers can still compile.

Docs and site: Adds docs/signals.md, a Signals guide on octanejs.dev, sitemap/search/llms.txt updates, and turns experimental-scoped-signals.md into a redirect. Package READMEs and benchmark harnesses compare “ordinary” vs signal-capability fixtures (legacy compilers still get nativeReads when their types expose it).

Tests and tooling run signal suites through the standard toolchain; new coverage includes quoted read$ props and automatic compilation without options.

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

@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 Sep 8, 2026
@vercel

vercel Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
octane-website Skipped Skipped Sep 8, 2026 5:22pm UTC
octane-website-mcp Skipped Skipped Sep 8, 2026 5:22pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp September 8, 2026 17:08 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website September 8, 2026 17:08 Inactive

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Type-only signal imports enable native reads
    • Added importKind checks to nativeReadOptions so that import type declarations and inline type specifiers from signal modules no longer incorrectly enable native read mode, consistent with the existing guards in analyzeNativeReadDiagnostics.

Create PR

Or push these changes by commenting:

@cursor push fb6131f3d7
Preview (fb6131f3d7)
diff --git a/packages/octane/src/compiler/native-read-diagnostics.js b/packages/octane/src/compiler/native-read-diagnostics.js
--- a/packages/octane/src/compiler/native-read-diagnostics.js
+++ b/packages/octane/src/compiler/native-read-diagnostics.js
@@ -79,7 +79,9 @@
 		if (
 			((node.type === 'Identifier' || node.type === 'JSXIdentifier') && node.name.endsWith('$')) ||
 			(node.type === 'ImportDeclaration' &&
-				(node.source?.value === SIGNALS_MODULE || LOCAL_MODULES.has(node.source?.value))) ||
+				node.importKind !== 'type' &&
+				(node.source?.value === SIGNALS_MODULE || LOCAL_MODULES.has(node.source?.value)) &&
+				(node.specifiers ?? []).some((s) => s.importKind !== 'type')) ||
 			((node.type === 'MemberExpression' || node.type === 'OptionalMemberExpression') &&
 				String(propertyName(node.property, node.computed) ?? '').endsWith('$')) ||
 			(node.type === 'Property' &&

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 0dcc53c. Configure here.

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp September 8, 2026 17:22 Inactive
@trueadm
trueadm marked this pull request as ready for review September 8, 2026 17:27
@trueadm
trueadm merged commit 2ffcc71 into main Sep 8, 2026
51 checks passed
@trueadm
trueadm deleted the codex/stable-signals branch September 8, 2026 19:05

This branch was previously deployed

2 inactive (1 outdated) deployments
Preview – octane-website-mcp — fed1ce55 Deployed Sep 8, 2026 by vercel[bot]
Preview – octane-website — 0dcc53c1 Deployed Sep 8, 2026 by vercel[bot]
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