Skip to content

ci: typecheck with TypeScript 7.1 in one parallel build - #1521

Merged
trueadm merged 6 commits into
mainfrom
ci/ts7-typecheck
Oct 2, 2026
Merged

trueadm merged 6 commits into
mainfrom
ci/ts7-typecheck

Conversation

@o-alexandrov

@o-alexandrov o-alexandrov commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Typecheck every repository project with TypeScript 7.1 and the tsrx content mapper, in one parallel tsc --build, replacing the serial chain of about 120 tsgo and tsrx-tsc (TypeScript 5.9) invocations. Part of #1247.

Why

On the same blacksmith-4vcpu-ubuntu-2404 runner, the CI "typecheck checks :: Type check" step drops from a main median of 421s (408s to 515s over the last five successful pushes) to 63s and 68s on two runs of this branch. The whole job drops from 482s to 631s down to 127s and 140s. TypeScript 7.1 reads .tsrx through @tsrx/content-mapper, so one checker covers both the plain-TypeScript projects that used tsgo and the .tsrx projects that used tsrx-tsc.

Changes

  • New private workspace package scripts/octane-tsc (bin octane-tsc). It takes repeatable -p <tsconfig> and writes a temporary wrapper beside each project. The wrapper extends the project, adds the contentMappers entry, and points tsBuildInfoFile at a temp dir. It then runs tsc --build <wrappers> --noEmit --runExternalCode --builders <ncpu> --checkers 1 and removes the wrappers afterwards. The real tsconfigs stay untouched, so editors and TypeScript 5.9 never see contentMappers (an error without --runExternalCode).
    • It pins options.compiler: "octane/compiler/volar", because mapper auto-detection prefers @tsrx/react, which bindings install for parity tests.
    • It restores two TypeScript 5.9 defaults only for projects that leave them unset: types: ["*"] and noUncheckedSideEffectImports: false.
    • TypeScript is pinned to 7.1.0-dev.20260921.1. Every nightly from 20260923.1 (through 20260930.4, the latest) reports false TS7031 errors on = {} defaults for destructured parameters whose type comes from an annotation. That is TS7031 false positive for nested object binding pattern with = {} default in an annotated parameter (regression from #64043) microsoft/TypeScript#64431, still open. A five-line repro is clean on 20260922.1 and 5.9.3 and fails on 20260923.1 and 20260930.4. In this repo it hits puck, redux-toolkit, and the rspeedy tests.
    • --showConfig -p <one> is supported for typecheck:files.
  • The root typecheck is one octane-tsc call over every project the old chain reached (including bindings, markdown, solana-kit, dropzone, streamdown, embla, rspeedy demo, shadcn, website, spa-navigation, and every example). It keeps the five pristine tsc lanes (base-ui, base-ui-utils, embla, solana-kit upstream, examples/_shared). bindings:typecheck, markdown:typecheck, and examples:typecheck became batched calls. pretypecheck, prebindings:typecheck, and typecheck:audited-packages were folded in.
  • 78 package typecheck scripts moved from tsrx-tsc/tsgo to octane-tsc. packages/shadcn/scripts/typecheck.mjs is deleted: both shadcn projects are clean under 7.1, so the foreign-diagnostic filter has nothing to filter.
  • @typescript/native-preview (tsgo) is removed. The Three compat CI lanes use octane-tsc. The parity harness no longer accepts tsgo as a lane compiler; no manifest used it.
  • check-source-publication now reads every -p of one call and treats octane-tsc as a .tsrx checker. Its four tsrx-typechecked-by-tsgo debt entries (dnd-kit, redux-toolkit x2, tiptap typetests) are deleted because those projects are now checked with .tsrx and pass. check-typecheck-coverage requires octane-tsc. typecheck:files uses octane-tsc for every project.
  • Binding spread fixes: tiptap, three, remix-router (Form, Link), pdf, lexical, and recharts spread open prop bags ([key: string]: unknown, Record<string, Handler>) next to an explicit ref. The content mapper now checks those .tsrx files, and the fix: restore strict consumer types for published bindings #834 contract rejects that shape (TS2322) because the bag could carry a conflicting ref. Each bag never carries one, so it is now typed & { ref?: undefined } at the spread site or helper return; octane itself is unchanged.
  • Fixes surfaced by the stricter check: @octanejs/xyflow Panel ref is Octane.Ref<HTMLDivElement> (TS2314, patch changeset). The streamdown and redux-toolkit typetests set jsx/jsxImportSource. The harbor island-boundary @ts-expect-error moved to the element, where TypeScript 7 reports it.
  • Rules (project.md, cursor-cloud.md) and CONTRIBUTING name octane-tsc. The consumer-facing tsrx-authoring rule, the CLI, packed-consumer canaries, and the parity/evidence lanes keep tsrx-tsc, because that is what consumers run.

Validation

  • pnpm typecheck: exit 0, 0 errors, 42s wall locally (16 cores, for reference only; the CI numbers above are the comparison).
  • node --test on check-source-publication (16, including a new multi--p case seen failing without the walker change), typecheck-files (7), ci-workflow (70), react-parity/harness-lib (57), classify-ci-change (6): all pass.
  • volar.test.ts "type-checks native refs and spreads without weakening component props" passes (it failed on the earlier octane spread change).
  • A planted type error in a .tsrx file is reported at the right line with exit 2. So is one in a plain .ts file through typecheck:files.
  • pnpm sync and pnpm format:files are clean.

Risk / follow-ups

  • Seven package-local typecheck scripts that the root chain never ran stay on tsrx-tsc, because they fail under 7.1: drei, formisch, ink, input-otp, resizable-panels, floating-ui, vaul. The failures are baseUrl removal, a stale @ts-expect-error, a missing typetest input, and real type errors in drei and ink. Each needs its own fix.
  • TypeScript 7.1 is a nightly. The pinned build still has the macOS watch bug tsc --watch never recompiles on macOS since 7.1.0-dev.20260811.1 microsoft/TypeScript#64351, which was fixed in 20260923.1, the same nightly that introduced #64431. Nothing here runs tsc in watch mode, and editors use their own TypeScript, so the pin costs nothing today. Bump it once #64431 is fixed.
  • Upstream: tsrx mapper auto-detection prefers @tsrx/react over octane when both are installed.

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
Wide CI and developer workflow change on a TypeScript nightly; failures would block merges but are unlikely to affect runtime behavior beyond the listed type fixes.

Overview
Replaces the repo’s split tsgo / tsrx-tsc typecheck chain with a single parallel octane-tsc run (TypeScript 7.1 nightly + @tsrx/content-mapper), via the new workspace package @octanejs/octane-tsc. Root pnpm typecheck, bindings:typecheck, examples:typecheck, CI Three-compat lanes, and most package typecheck scripts now invoke octane-tsc -p …; @typescript/native-preview (tsgo) is dropped from the root.

Docs and agent rules are updated to tell contributors to use octane-tsc for programs with .tsrx. Supporting checks (check-typecheck-coverage, check-source-publication, check-tsrx-module-decls) follow the new checker and multi--p invocations.

Type-only fixes keep .tsrx clean under the stricter mapper: Panel in @octanejs/xyflow uses Octane.Ref<HTMLDivElement> (patch changeset); several bindings annotate open prop spreads with & { ref?: undefined } where ref is set explicitly; typetest tsconfigs gain jsx / jsxImportSource; harbor moves an @ts-expect-error to the element. @octanejs/shadcn drops its custom typecheck.mjs in favor of direct octane-tsc on both tsconfigs.

Reviewed by Cursor Bugbot for commit 274f05a. 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 ci PR: CI or build pipeline labels Oct 1, 2026
@o-alexandrov
o-alexandrov marked this pull request as ready for review October 1, 2026 23:03

@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 3 potential issues.

Fix All in Cursor

Bugbot Autofix prepared fixes for all 3 issues found in the latest run.

  • ✅ Fixed: Compatibility options miss inherited settings
    • declaredOptions now follows absolute, relative, and package extends, so file-scoped checking no longer injects types or noUncheckedSideEffectImports over options the real project set.
  • ✅ Fixed: Typecheck wrappers leak without cleanup
    • The --showConfig arity check now exits before any wrapper is written, SIGINT/SIGTERM delete the wrappers and temp build-info dir, and .octane-tsc-* is gitignored.
  • ✅ Fixed: Bindings typecheck drops two packages
    • bindings:typecheck again includes streamdown and embla-carousel (package plus typetests), including embla's pristine tsc lane from the old package script.

Create PR

Or push these changes by commenting:

@cursor push b829ea571b
Preview (b829ea571b)
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@
 
 # Project-local scoped-typecheck configs can remain after an interrupted run.
 **/.typecheck-files-*/
+**/.octane-tsc-*
 
 # Example-app browser and TSRX tooling outputs
 **/test-results/

diff --git a/package.json b/package.json
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
     "typecheck:files": "node scripts/typecheck-files.mjs --",
     "typecheck:coverage": "node scripts/check-typecheck-coverage.mjs",
     "ci:workflow:test": "node --test scripts/check-changesets.test.mjs scripts/classify-ci-change.test.mjs scripts/ci-workflow.test.mjs scripts/format-files.test.mjs scripts/tsrx-prettier-plugin.test.mjs scripts/typecheck-files.test.mjs scripts/generate-scaffold-manifest.test.mjs scripts/generate-consumer-tsconfigs.test.mjs scripts/check-source-publication.test.mjs scripts/scoped-signals-projects.test.mjs scripts/workspace-packages.test.mjs benchmarks/scoped-signals/workloads.test.mjs benchmarks/scoped-signals/bundle-boundaries.test.mjs benchmarks/scoped-signals/initial-document-signals.test.mjs benchmarks/scoped-signals/fixed-style-journal.test.mjs benchmarks/scoped-signals/ssr-component-frames.test.mjs benchmarks/scoped-signals/split-context-boundary.test.mjs benchmarks/bundle-size/minimal-gates.test.mjs benchmarks/pr-report.test.mjs benchmarks/ci-timing.test.mjs benchmarks/scoped-signals/event-metadata.test.mjs benchmarks/scoped-signals/deferred-boundary.test.mjs benchmarks/scoped-signals/split-hydrate-boundary.test.mjs benchmarks/scoped-signals/inspect-async-retainers.test.mjs benchmarks/tsrx-component-graph/compare.test.mjs benchmarks/conversation-streaming/behavior-only/server.test.mjs scripts/check-staged-dom.test.mjs website/tests/html-compression.test.mjs benchmarks/scoped-signals/stable-event-authority.test.mjs benchmarks/scoped-signals/inline-value-conversions.test.mjs benchmarks/scoped-signals/primitive-local-values.test.mjs",
-    "bindings:typecheck": "octane-tsc -p packages/dropzone/tsconfig.json -p packages/dropzone/typetests/tsconfig.json -p packages/zag/tsconfig.json -p packages/zag/typetests/tsconfig.json -p packages/animejs/tsconfig.json -p packages/gsap/tsconfig.json -p packages/inertia/tsconfig.json -p packages/inertia/typetests/tsconfig.json -p packages/rxjs/tsconfig.json -p packages/wagmi/tsconfig.json -p packages/rainbowkit/tsconfig.json -p packages/usehooks-ts/tsconfig.json -p packages/seo/tsconfig.json -p packages/react-error-boundary/tsconfig.json -p packages/cmdk/tsconfig.json -p packages/sonner/tsconfig.json -p packages/monaco-editor/tsconfig.json -p packages/tiptap/tsconfig.json -p packages/tanstack-hotkeys/tsconfig.json -p packages/tanstack-pacer/tsconfig.json -p packages/tanstack-table/tsconfig.json -p packages/tanstack-router-ssr-query/tsconfig.octane.json -p packages/lexical/tsconfig.json -p packages/valtio/tsconfig.json -p packages/better-auth/tsconfig.json -p packages/better-auth/typetests/tsconfig.json -p packages/opentui/tsconfig.json -p packages/mantine-hooks/tsconfig.json -p packages/mantine-hooks/typetests/tsconfig.json -p packages/mobx/tsconfig.json -p packages/mobx/typetests/tsconfig.json -p packages/docusaurus/tsconfig.json -p packages/phosphor-icons/tsconfig.json -p packages/react-map-gl/tsconfig.json -p packages/react-map-gl/typetests/adapted/tsconfig.json -p packages/intersection-observer/tsconfig.json -p packages/swr/tsconfig.json -p packages/tanstack-pacer/typetests/octane-only/tsconfig.json -p packages/markdown/tsconfig.json -p packages/markdown/typetests/tsconfig.json -p packages/textarea-autosize/tsconfig.json -p packages/pdf/tsconfig.json",
+    "bindings:typecheck": "octane-tsc -p packages/dropzone/tsconfig.json -p packages/dropzone/typetests/tsconfig.json -p packages/zag/tsconfig.json -p packages/zag/typetests/tsconfig.json -p packages/animejs/tsconfig.json -p packages/gsap/tsconfig.json -p packages/inertia/tsconfig.json -p packages/inertia/typetests/tsconfig.json -p packages/rxjs/tsconfig.json -p packages/wagmi/tsconfig.json -p packages/rainbowkit/tsconfig.json -p packages/usehooks-ts/tsconfig.json -p packages/seo/tsconfig.json -p packages/react-error-boundary/tsconfig.json -p packages/cmdk/tsconfig.json -p packages/sonner/tsconfig.json -p packages/streamdown/tsconfig.json -p packages/streamdown/typetests/tsconfig.json -p packages/monaco-editor/tsconfig.json -p packages/tiptap/tsconfig.json -p packages/tanstack-hotkeys/tsconfig.json -p packages/tanstack-pacer/tsconfig.json -p packages/tanstack-table/tsconfig.json -p packages/tanstack-router-ssr-query/tsconfig.octane.json -p packages/lexical/tsconfig.json -p packages/valtio/tsconfig.json -p packages/better-auth/tsconfig.json -p packages/better-auth/typetests/tsconfig.json -p packages/opentui/tsconfig.json -p packages/mantine-hooks/tsconfig.json -p packages/mantine-hooks/typetests/tsconfig.json -p packages/mobx/tsconfig.json -p packages/mobx/typetests/tsconfig.json -p packages/docusaurus/tsconfig.json -p packages/phosphor-icons/tsconfig.json -p packages/react-map-gl/tsconfig.json -p packages/react-map-gl/typetests/adapted/tsconfig.json -p packages/intersection-observer/tsconfig.json -p packages/embla-carousel/tsconfig.json -p packages/embla-carousel/typetests/tsconfig.json -p packages/swr/tsconfig.json -p packages/tanstack-pacer/typetests/octane-only/tsconfig.json -p packages/markdown/tsconfig.json -p packages/markdown/typetests/tsconfig.json -p packages/textarea-autosize/tsconfig.json -p packages/pdf/tsconfig.json && tsc --noEmit -p packages/embla-carousel/typetests/pristine.tsconfig.json",
     "markdown:typecheck": "octane-tsc -p packages/markdown/tsconfig.json -p packages/markdown/typetests/tsconfig.json",
     "typecheck": "pnpm typecheck:coverage && octane-tsc -p packages/blocknote/tsconfig.supported.json -p packages/thinking-orbs/tsconfig.json -p packages/xyflow/tsconfig.json -p packages/solana-kit/tsconfig.json -p packages/solana-kit/typetests/tsconfig.json -p packages/dropzone/tsconfig.json -p packages/dropzone/typetests/tsconfig.json -p packages/zag/tsconfig.json -p packages/zag/typetests/tsconfig.json -p packages/animejs/tsconfig.json -p packages/gsap/tsconfig.json -p packages/inertia/tsconfig.json -p packages/inertia/typetests/tsconfig.json -p packages/rxjs/tsconfig.json -p packages/wagmi/tsconfig.json -p packages/rainbowkit/tsconfig.json -p packages/usehooks-ts/tsconfig.json -p packages/seo/tsconfig.json -p packages/react-error-boundary/tsconfig.json -p packages/cmdk/tsconfig.json -p packages/sonner/tsconfig.json -p packages/streamdown/tsconfig.json -p packages/streamdown/typetests/tsconfig.json -p packages/monaco-editor/tsconfig.json -p packages/tiptap/tsconfig.json -p packages/tanstack-hotkeys/tsconfig.json -p packages/tanstack-pacer/tsconfig.json -p packages/tanstack-table/tsconfig.json -p packages/tanstack-router-ssr-query/tsconfig.octane.json -p packages/lexical/tsconfig.json -p packages/valtio/tsconfig.json -p packages/better-auth/tsconfig.json -p packages/better-auth/typetests/tsconfig.json -p packages/opentui/tsconfig.json -p packages/mantine-hooks/tsconfig.json -p packages/mantine-hooks/typetests/tsconfig.json -p packages/mobx/tsconfig.json -p packages/mobx/typetests/tsconfig.json -p packages/docusaurus/tsconfig.json -p packages/phosphor-icons/tsconfig.json -p packages/react-map-gl/tsconfig.json -p packages/react-map-gl/typetests/adapted/tsconfig.json -p packages/intersection-observer/tsconfig.json -p packages/embla-carousel/tsconfig.json -p packages/embla-carousel/typetests/tsconfig.json -p packages/swr/tsconfig.json -p packages/tanstack-pacer/typetests/octane-only/tsconfig.json -p packages/markdown/tsconfig.json -p packages/markdown/typetests/tsconfig.json -p packages/textarea-autosize/tsconfig.json -p packages/pdf/tsconfig.json -p packages/octane/tsconfig.json -p packages/octane/typetests/signals-engine-node/tsconfig.json -p packages/octane/typetests/tsconfig.json -p packages/octane/typetests/react-compat/tsconfig.json -p packages/app-core/tsconfig.typecheck.json -p packages/cli/tsconfig.typecheck.json -p packages/create-octane/tsconfig.typecheck.json -p packages/rspack-plugin-octane/tsconfig.typecheck.json -p packages/rspeedy-plugin-octane/tsconfig.typecheck.json -p packages/rspeedy-plugin-octane/examples/demo/tsconfig.json -p packages/rsbuild-plugin-octane/tsconfig.typecheck.json -p packages/vite-plugin-octane/tsconfig.typecheck.json -p packages/adapter-vercel/tsconfig.typecheck.json -p packages/adapter-cloudflare/tsconfig.typecheck.json -p packages/astro/tsconfig.typecheck.json -p packages/lynx/tsconfig.json -p packages/lynx/tsconfig.testing.json -p packages/lynx/typetests/tsconfig.json -p packages/dexie/tsconfig.json -p packages/dexie/typetests/tsconfig.json -p packages/tauri/tsconfig.json -p packages/tauri/typetests/tsconfig.json -p packages/electron/tsconfig.json -p packages/electron/typetests/tsconfig.json -p packages/zustand/tsconfig.json -p packages/jotai/tsconfig.json -p packages/nuqs/tsconfig.json -p packages/i18next/tsconfig.json -p packages/tanstack-query/tsconfig.json -p packages/tanstack-store/tsconfig.json -p packages/xstate/tsconfig.json -p packages/xstate-store/tsconfig.json -p packages/xstate/typetests/tsconfig.adapted.json -p packages/xstate-store/typetests/tsconfig.adapted.json -p packages/tanstack-store/typetests/tsconfig.json -p packages/tanstack-db/tsconfig.json -p packages/tanstack-db/typetests/tsconfig.json -p packages/tanstack-form/tsconfig.json -p packages/tanstack-form/typetests/tsconfig.json -p packages/tanstack-ai/tsconfig.json -p packages/tanstack-ai/typetests/tsconfig.json -p packages/tanstack-devtools/tsconfig.json -p packages/tanstack-devtools/typetests/tsconfig.json -p packages/devtools/tsconfig.json -p packages/apollo-client/tsconfig.json -p packages/apollo-client/typetests/tsconfig.json -p packages/recharts/tsconfig.json -p packages/visx/tsconfig.json -p packages/three/tsconfig.json -p packages/three/typetests/tsconfig.json -p packages/lucide/tsconfig.json -p packages/redux/tsconfig.json -p packages/redux-toolkit/tsconfig.json -p packages/redux-toolkit/typetests/tsconfig.json -p packages/remix-router/tsconfig.json -p packages/hook-form/tsconfig.json -p packages/hook-form/typetests/tsconfig.json -p packages/motion/tsconfig.json -p packages/dnd-kit/tsconfig.json -p packages/dnd-kit/typetests/tsconfig.json -p packages/puck/tsconfig.json -p packages/stylex/tsconfig.json -p packages/tanstack-router/tsconfig.json -p packages/tanstack-virtual/tsconfig.json -p packages/tiptap/typetests/tsconfig.json -p packages/floating-ui/tsconfig.json -p packages/radix/tsconfig.json -p packages/base-ui/tsconfig.json -p packages/base-ui/tsconfig.adapted-specs.json -p packages/base-ui-utils/tsconfig.json -p packages/base-ui-utils/tsconfig.adapted-specs.json -p packages/aria/tsconfig.json -p packages/styled-components/tsconfig.json -p packages/styled-components/typetests/tsconfig.json -p packages/testing-library/tsconfig.json -p packages/mdx/tsconfig.json -p packages/tanstack-start/tsconfig.json -p packages/tanstack-start/typetests/tsconfig.json -p packages/octane-evals/tsconfig.json -p website/tsconfig.json -p website-mcp/tsconfig.json -p examples/cartlane/tsconfig.json -p examples/cinebase/tsconfig.json -p examples/draftboard/tsconfig.json -p examples/electron/tsconfig.json -p examples/flowboard/tsconfig.json -p examples/gridlab/tsconfig.json -p examples/hacker-news/tsconfig.json -p examples/harbor/tsconfig.json -p examples/lexical-playground/tsconfig.json -p examples/mailroom/tsconfig.json -p examples/monaco-playground/tsconfig.json -p examples/pagecraft/tsconfig.json -p examples/pulseboard/tsconfig.json -p examples/relay/tsconfig.json -p examples/signal-chat/tsconfig.json -p examples/streambox/tsconfig.json -p examples/threadline/tsconfig.json -p examples/wayfinder/tsconfig.json -p examples/workbench/tsconfig.json -p benchmarks/spa-navigation/tsconfig.json -p packages/tanstack-virtual/typetests/tsconfig.json -p packages/shadcn/tsconfig.json -p packages/shadcn/tsconfig.consumer.json && tsc --noEmit -p examples/_shared/tsconfig.json && tsc --noEmit -p packages/solana-kit/audit/upstream-typetests/tsconfig.json && tsc --noEmit -p packages/embla-carousel/typetests/pristine.tsconfig.json && ./packages/base-ui/node_modules/.bin/tsc --noEmit -p packages/base-ui/tsconfig.pristine-specs.json && ./packages/base-ui-utils/node_modules/.bin/tsc --noEmit -p packages/base-ui-utils/tsconfig.pristine-specs.json",
     "examples:catalog": "node scripts/examples-catalog.mjs",

diff --git a/scripts/octane-tsc/bin.mjs b/scripts/octane-tsc/bin.mjs
--- a/scripts/octane-tsc/bin.mjs
+++ b/scripts/octane-tsc/bin.mjs
@@ -1,5 +1,5 @@
 #!/usr/bin/env node
-import { spawnSync } from 'node:child_process';
+import { spawn } from 'node:child_process';
 import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
 import { createRequire } from 'node:module';
 import { availableParallelism, tmpdir } from 'node:os';
@@ -23,14 +23,36 @@
 	process.exit(2);
 }
 
+// TypeScript follows `./`, `../`, and absolute paths from the config file, and
+// resolves every other `extends` as a module. A leading-dot check drops the
+// absolute config `typecheck:files` writes, plus package and bare specifiers,
+// so the wrapper below would paint 5.9 defaults over options the project set.
+function resolveExtends(project, base) {
+	if (typeof base !== 'string' || base.length === 0) return undefined;
+	if (path.isAbsolute(base) || base.startsWith('.')) {
+		const resolved = path.resolve(path.dirname(project), base);
+		return resolved.endsWith('.json') ? resolved : `${resolved}.json`;
+	}
+	const require = createRequire(project);
+	const specifiers = base.endsWith('.json') ? [base] : [base, `${base}.json`];
+	for (const specifier of specifiers) {
+		try {
+			const resolved = require.resolve(specifier);
+			if (resolved.endsWith('.json')) return resolved;
+		} catch {
+			// Try the next candidate. An unresolvable base is reported by tsc.
+		}
+	}
+	return undefined;
+}
+
 function declaredOptions(project, seen = new Set()) {
 	if (seen.has(project)) return {};
 	seen.add(project);
 	const config = jsonc.parse(readFileSync(project, 'utf8')) ?? {};
-	const bases = [config.extends ?? []].flat().filter((base) => base.startsWith('.'));
-	const inherited = bases.map((base) => {
-		const resolved = path.resolve(path.dirname(project), base);
-		return declaredOptions(resolved.endsWith('.json') ? resolved : `${resolved}.json`, seen);
+	const inherited = [config.extends ?? []].flat().map((base) => {
+		const resolved = resolveExtends(project, base);
+		return resolved ? declaredOptions(resolved, seen) : {};
 	});
 	return Object.assign({}, ...inherited, config.compilerOptions);
 }
@@ -49,65 +71,99 @@
 	};
 }
 
+const showConfig = passthrough.includes('--showConfig');
+if (showConfig && new Set(projects).size !== 1) {
+	console.error('octane-tsc --showConfig takes exactly one -p <tsconfig>');
+	process.exit(2);
+}
+
 // The mapper is enabled from a generated sibling wrapper rather than the
 // project's own tsconfig: contentMappers is an error without --runExternalCode,
 // so editors and every other TypeScript would reject it. The wrapper must sit in
 // the project's directory because the root config decides type-root lookup.
+// Those siblings are removed on every exit path. The checker is async so a
+// SIGINT/SIGTERM handler can run during the build; spawnSync would block the
+// loop and skip both the handler and this cleanup.
 const buildInfoDir = mkdtempSync(path.join(tmpdir(), 'octane-tsc-'));
-const wrappers = [...new Set(projects)].map((project, index) => {
-	const wrapper = path.join(
-		path.dirname(project),
-		`.octane-tsc-${process.pid}.${path.basename(project)}`,
-	);
-	writeFileSync(
-		wrapper,
-		JSON.stringify({
-			extends: `./${path.basename(project)}`,
-			compilerOptions: {
-				...compatibilityOptions(project),
-				tsBuildInfoFile: path.join(buildInfoDir, `${index}.tsbuildinfo`), // --build records build state even with --noEmit
-			},
-			contentMappers: [
-				{
-					package: '@tsrx/content-mapper',
-					extensions: ['.tsrx'],
-					options: { compiler: 'octane/compiler/volar' }, // auto-detection prefers @tsrx/react, which bindings install for parity tests
-				},
-			],
-		}),
-	);
-	return wrapper;
-});
+const wrappers = [];
+let child;
+let abortCode;
 
-const showConfig = passthrough.includes('--showConfig');
-if (showConfig && wrappers.length !== 1) {
-	console.error('octane-tsc --showConfig takes exactly one -p <tsconfig>');
-	process.exit(2);
+function cleanup() {
+	for (const wrapper of wrappers) rmSync(wrapper, { force: true });
+	rmSync(buildInfoDir, { recursive: true, force: true });
 }
 
-let result;
+function abort(signal, code) {
+	if (abortCode !== undefined) return;
+	abortCode = code;
+	if (child && child.exitCode === null && child.signalCode === null) {
+		child.kill(signal);
+		return;
+	}
+	cleanup();
+	process.exit(code);
+}
+
+process.on('SIGINT', () => abort('SIGINT', 130));
+process.on('SIGTERM', () => abort('SIGTERM', 143));
+
 try {
-	result = spawnSync(
-		process.execPath,
-		showConfig
-			? [tsc, '--showConfig', '-p', wrappers[0], '--runExternalCode']
-			: [
-					tsc,
-					'--build',
-					...wrappers,
-					'--noEmit',
-					'--runExternalCode',
-					'--builders',
-					String(availableParallelism()),
-					'--checkers',
-					'1',
-					...passthrough,
+	for (const [index, project] of [...new Set(projects)].entries()) {
+		const wrapper = path.join(
+			path.dirname(project),
+			`.octane-tsc-${process.pid}.${path.basename(project)}`,
+		);
+		writeFileSync(
+			wrapper,
+			JSON.stringify({
+				extends: `./${path.basename(project)}`,
+				compilerOptions: {
+					...compatibilityOptions(project),
+					tsBuildInfoFile: path.join(buildInfoDir, `${index}.tsbuildinfo`), // --build records build state even with --noEmit
+				},
+				contentMappers: [
+					{
+						package: '@tsrx/content-mapper',
+						extensions: ['.tsrx'],
+						options: { compiler: 'octane/compiler/volar' }, // auto-detection prefers @tsrx/react, which bindings install for parity tests
+					},
 				],
-		{ stdio: 'inherit' },
-	);
-} finally {
-	for (const wrapper of wrappers) rmSync(wrapper, { force: true });
-	rmSync(buildInfoDir, { recursive: true, force: true });
+			}),
+		);
+		wrappers.push(wrapper);
+	}
+
+	const status = await new Promise((resolve, reject) => {
+		child = spawn(
+			process.execPath,
+			showConfig
+				? [tsc, '--showConfig', '-p', wrappers[0], '--runExternalCode']
+				: [
+						tsc,
+						'--build',
+						...wrappers,
+						'--noEmit',
+						'--runExternalCode',
+						'--builders',
+						String(availableParallelism()),
+						'--checkers',
+						'1',
+						...passthrough,
+					],
+			{ stdio: 'inherit' },
+		);
+		child.on('error', reject);
+		child.on('exit', (code, signal) => {
+			if (abortCode !== undefined) resolve(abortCode);
+			else if (signal === 'SIGINT') resolve(130);
+			else if (signal === 'SIGTERM') resolve(143);
+			else resolve(code ?? 1);
+		});
+	});
+	cleanup();
+	process.exit(status);
+} catch (error) {
+	cleanup();
+	throw error;
 }
-if (result.error) throw result.error;
-process.exit(result.status ?? 1);

diff --git a/scripts/typecheck-files.test.mjs b/scripts/typecheck-files.test.mjs
--- a/scripts/typecheck-files.test.mjs
+++ b/scripts/typecheck-files.test.mjs
@@ -81,6 +81,12 @@
 			{ cwd: REPOSITORY_ROOT },
 		);
 		assert.equal(result.status, 0, result.error?.message);
+		const wrappers = spawnSync(
+			'git',
+			['check-ignore', '--quiet', 'packages/octane/.octane-tsc-1.tsconfig.json'],
+			{ cwd: REPOSITORY_ROOT },
+		);
+		assert.equal(wrappers.status, 0, wrappers.error?.message);
 	});
 
 	test('ignores build-only configs when selected explicitly or through Git', async () => {

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

Reviewed by Cursor Bugbot for commit 13b3c13. Configure here.

Comment thread scripts/octane-tsc/bin.mjs Resolved
Comment thread scripts/octane-tsc/bin.mjs Resolved
Comment thread package.json Resolved
# Conflicts:
#	packages/alien-signals/audit/react-parity.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 1, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No size increases and no timing regressions outside noise.

Compares 3ffd8cc3c with 626f89ad9 on the same runner. Timing verdicts require a change beyond the combined margin of error (at least 5%) and one 0.1ms timer tick, with the fastest sample moving the same way. Workflow run

js-framework: 1k/10k row operations (ms, lower is better)

All 20 timed operations (20 within noise)
target operation base head Δ noise
octane-tsrx run 3.24 3.44 +6.2% ±7% ⚪ within noise
octane-tsrx replace 6.58 7.40 +12.5% ±16% ⚪ within noise
octane-tsrx add 3.21 3.32 +3.4% ±10% ⚪ within noise
octane-tsrx update 0.34 0.42 +23.5% ±50% ⚪ within noise
octane-tsrx select 0.16 0.17 +6.2% ±65% ⚪ within noise
octane-tsrx swap 0.42 0.43 +2.4% ±35% ⚪ within noise
octane-tsrx remove 0.37 0.40 +8.1% ±47% ⚪ within noise
octane-tsrx runlots 28.67 29.66 +3.5% ±15% ⚪ within noise
octane-tsrx select_lots 0.26 0.23 −11.5% ±39% ⚪ within noise
octane-tsrx clear 39.39 41.60 +5.6% ±18% ⚪ within noise
octane-jsx run 3.45 3.53 +2.3% ±32% ⚪ within noise
octane-jsx replace 6.97 6.41 −8.0% ±18% ⚪ within noise
octane-jsx add 3.50 3.09 −11.7% ±25% ⚪ within noise
octane-jsx update 0.64 0.62 −3.1% ±41% ⚪ within noise
octane-jsx select 0.41 0.39 −4.9% ±49% ⚪ within noise
octane-jsx swap 0.68 0.61 −10.3% ±24% ⚪ within noise
octane-jsx remove 0.63 0.56 −11.1% ±32% ⚪ within noise
octane-jsx runlots 27.85 27.45 −1.4% ±11% ⚪ within noise
octane-jsx select_lots 2.44 2.26 −7.4% ±29% ⚪ within noise
octane-jsx clear 45.28 42.91 −5.2% ±15% ⚪ within noise

Application bundle size (bytes)

No changes across 45 measured values.

Public-import reachability bundles (bytes)

No changes across 105 measured values.

CI job durations

  • 🟡 10 job(s) slower than every recent main run: React parity shard (3/4), heavy integration (browser - chromium), test shard (Node 24, 1/4), test shard (Node 24, 4/4), React parity shard (4/4), heavy integration (package builds, eval corpus, runtime loaders, Astro), React parity shard (2/4), React parity shard (1/4), test shard (Node 24, 3/4), example apps (2/3)
  • 🟢 1 job(s) faster than every recent main run: typecheck checks

Compares the CI run for 274f05a60 (run) with the last 5 successful main push runs. A job is only slower or faster outside the whole main range, by at least 10% and 15s.

job main median main range this PR Δ
wall clock (first job start to last job end) 12m 31s 8m 50s–13m 11s 35m 17s +22m 46s (+182%) 🟡 slower
total job time 129m 23s 95m 08s–141m 48s 146m 56s +17m 33s (+14%) 🟡 slower
React parity shard (3/4) 10m 05s 7m 13s–11m 29s 17m 22s +7m 17s (+72%) 🟡 slower
heavy integration (browser - chromium) 7m 19s 6m 34s–9m 46s 11m 32s +4m 13s (+58%) 🟡 slower
test shard (Node 24, 1/4) 7m 25s 6m 11s–9m 26s 10m 54s +3m 29s (+47%) 🟡 slower
test shard (Node 24, 4/4) 7m 44s 5m 52s–9m 32s 11m 12s +3m 28s (+45%) 🟡 slower
React parity shard (4/4) 9m 22s 7m 29s–10m 30s 12m 25s +3m 03s (+33%) 🟡 slower
heavy integration (package builds, eval corpus, runtime loaders, Astro) 3m 18s 2m 49s–5m 58s 6m 00s +2m 42s (+82%) 🟡 slower
React parity shard (2/4) 8m 10s 7m 39s–10m 05s 10m 13s +2m 03s (+25%) 🟡 slower
React parity shard (1/4) 8m 30s 7m 00s–10m 10s 10m 33s +2m 03s (+24%) 🟡 slower
test shard (Node 24, 3/4) 6m 59s 5m 42s–8m 54s 9m 01s +2m 02s (+29%) 🟡 slower
example apps (2/3) 3m 28s 2m 47s–3m 39s 3m 54s +26s (+13%) 🟡 slower
typecheck checks 8m 11s 5m 40s–11m 14s 2m 07s −6m 04s (−74%) 🟢 faster
All 26 timed jobs
job main median main range this PR Δ
React parity shard (3/4) 10m 05s 7m 13s–11m 29s 17m 22s +7m 17s (+72%) 🟡 slower
heavy integration (browser - chromium) 7m 19s 6m 34s–9m 46s 11m 32s +4m 13s (+58%) 🟡 slower
test shard (Node 24, 1/4) 7m 25s 6m 11s–9m 26s 10m 54s +3m 29s (+47%) 🟡 slower
test shard (Node 24, 4/4) 7m 44s 5m 52s–9m 32s 11m 12s +3m 28s (+45%) 🟡 slower
React parity shard (4/4) 9m 22s 7m 29s–10m 30s 12m 25s +3m 03s (+33%) 🟡 slower
heavy integration (package builds, eval corpus, runtime loaders, Astro) 3m 18s 2m 49s–5m 58s 6m 00s +2m 42s (+82%) 🟡 slower
lint checks 5m 59s 4m 52s–9m 03s 8m 21s +2m 22s (+40%) ⚪ within noise
React parity shard (2/4) 8m 10s 7m 39s–10m 05s 10m 13s +2m 03s (+25%) 🟡 slower
React parity shard (1/4) 8m 30s 7m 00s–10m 10s 10m 33s +2m 03s (+24%) 🟡 slower
test shard (Node 24, 3/4) 6m 59s 5m 42s–8m 54s 9m 01s +2m 02s (+29%) 🟡 slower
test shard (Node 24, 2/4) 10m 04s 6m 28s–11m 59s 10m 59s +55s (+9%) ⚪ within noise
website integration suite 4m 47s 4m 43s–6m 33s 5m 37s +50s (+17%) ⚪ within noise
validate publishable packages 4m 01s 3m 28s–6m 25s 4m 42s +41s (+17%) ⚪ within noise
example apps (2/3) 3m 28s 2m 47s–3m 39s 3m 54s +26s (+13%) 🟡 slower
React parity checks 15s 15s–18s 17s +2s (+13%) ⚪ within noise
example apps (3/3) 3m 32s 2m 39s–3m 49s 3m 33s +1s (+0%) ⚪ within noise
lint 4s 4s–5s 4s ±0s (±0%) ⚪ within noise
typecheck 4s 4s–5s 4s ±0s (±0%) ⚪ within noise
test (24) 4s 4s–5s 4s ±0s (±0%) ⚪ within noise
CI provenance 4s 4s–5s 4s ±0s (±0%) ⚪ within noise
examples 4s 4s–4s 3s −1s (−25%) ⚪ within noise
classify changeset release 15s 14s–17s 14s −1s (−7%) ⚪ within noise
example apps (1/3) 3m 31s 2m 47s–4m 12s 3m 17s −14s (−7%) ⚪ within noise
Lynx compatibility 2m 00s 1m 19s–3m 02s 1m 40s −20s (−17%) ⚪ within noise
Three compatibility 3m 20s 2m 28s–3m 29s 2m 44s −36s (−18%) ⚪ within noise
typecheck checks 8m 11s 5m 40s–11m 14s 2m 07s −6m 04s (−74%) 🟢 faster

@o-alexandrov
o-alexandrov marked this pull request as draft October 2, 2026 03:41
@o-alexandrov o-alexandrov reopened this Oct 2, 2026
…d helper

Keep the #834 contract that an index-signature spread composed with an
explicit ref is rejected, and declare ref?: undefined on the seven binding
bags that never carry a ref. Point the .tsrx check scripts at octane-tsc.
@o-alexandrov
o-alexandrov marked this pull request as ready for review October 2, 2026 04:27
@trueadm
trueadm merged commit 3d7a077 into main Oct 2, 2026
73 of 95 checks passed
@trueadm
trueadm deleted the ci/ts7-typecheck branch October 2, 2026 07:26
trueadm added a commit that referenced this pull request Oct 2, 2026
- pdf, recharts, and three take main's ref-free spread fixes from #1521,
  which cover the same TSRX 0.5 type errors this branch fixed. Drop this
  branch's duplicates: pdf's HostProps.ref type, recharts'
  AdaptedEventHandlers alias, three's wrapperProps, and their changesets.
- main now typechecks .tsrx through octane/compiler/volar (octane-tsc), whose
  editor parse keeps parentheses. Patch @tsrx/core 0.5.2 so a parenthesized
  `const theme = (<style>…</style>);`, the formatter's multi-line layout,
  resolves as a style `apply` target instead of TSRX3002. volar.test.ts
  covers identifier and member targets and keeps a non-style target
  rejected.
- Format the files main changed with @tsrx/prettier-plugin 0.5; each
  compiles to the same output.
- Regenerate the parity lockfile hashes and manifests with pnpm sync.

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 ci PR: CI or build pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants