Skip to content

ci: typecheck every published package - #1642

Merged
trueadm merged 2 commits into
mainfrom
ci/typecheck-published-packages
Oct 3, 2026
Merged

trueadm merged 2 commits into
mainfrom
ci/typecheck-published-packages

Conversation

@trueadm

@trueadm trueadm commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Every published package is now typechecked in CI, closing review finding H9. The gap was much wider than the six packages the review named: about 40 published packages had a tsconfig.json, or a package-local typecheck script, that the root pnpm typecheck chain never reached. The coverage manifest required only four projects.

Changes

  • scripts/check-typecheck-coverage.mjs requires every published package's own projects to be reached by the root octane-tsc run.

    • A package's projects are those its typecheck script hands to a .tsrx-aware checker (octane-tsc/tsrx-tsc), or its tsconfig.json when it declares none.
    • Pristine-upstream probes run with plain tsc compare against React's types, so they are not required.
    • New publishedExceptions entries need a reason and an expires date. An expired or stale exception fails the check.
    • New unit tests cover these rules and run from typecheck:coverage, avoiding the ci:workflow:test line other PRs edit.
  • Root typecheck gains 42 projects, which pass together in about 4 s of build time:

    • alien-signals, auto-animate, calendar, colorful (+ adapted typetests), content-loader, day-picker, draggable;
    • email, email-cli, formisch (+ typetests), html-react-parser (+ tests), image-crop (+ tests), input-otp typetests;
    • livestore (+ typetests), octane-is, popper (+ adapted and public-api typetests), portabletext, resizable-panels (+ typetests);
    • sanity-icons, sanity-loader, sanity-logos, spring (+ typetests), stick-to-bottom, syntax-highlighter adapted typetests;
    • to-print, transition-group (+ typetests), vaul, waypoint, window, wouter;
    • tanstack-pacer type tests and tanstack-store adapted typetests, which those packages' own scripts check.
  • Materialized projects. floating-ui's adapted typetests compile upstream files that the React parity harness writes into a gitignored directory, so a clean checkout has no inputs. They are recorded under a new materializedProjects key, which takes a reason and no date because this is not debt, and goes stale once the project is typechecked.

  • Fixes under TypeScript 7.1 (what octane-tsc runs):

    • @octanejs/email: css-tree walk options are typed with satisfies WalkOptionsVisit<…>. TypeScript 7 could not contextually type callbacks through css-tree's large WalkOptions union, giving 8 implicit-any and this.atrule errors. Type-only; the emitted JS is the same.
    • formisch and input-otp typetests: drop baseUrl, which TypeScript 7 removed; paths become relative. Their React parity audits pin these files, so the pinned hashes are updated. tsrx-tsc still compiles both.
    • resizable-panels: TypeScript 7.1's DOM lib has FocusOptions.focusVisible, so the @ts-expect-error was unused, but published consumers on an older lib.dom still need it. An as FocusOptions assertion compiles under both: TypeScript 5.9 rejects the unasserted literal with TS2353 and accepts this. The package script now uses octane-tsc, matching CI.
  • Tracked, not fixed here: drei (4 errors), ink (1) and select (1) fail only inside octane/compiler/volar's virtual TSX, which TypeScript reports as "no corresponding location in the original file":

    • drei: a keyed @for row's key is passed as a component prop, and so are the Suspense children and an undefined ref;
    • ink: a @try boundary component is typed unknown;
    • select: a forwarded ref is typed unknown.

    These are compiler defects, so the packages are not edited to dodge them. They carry exceptions until 2026-10-31, and a separate session is fixing the virtual TSX.

No changeset: the source edits are a type-only satisfies and a comment, so the published behavior and API are unchanged.

Validation

  • pnpm typecheck:coverage: 5/5 unit tests pass, and the check reports "123 published packages, 4 required projects, 0 private and 3 published exceptions". A negative control (dropping packages/wouter/tsconfig.json from the chain) fails with the package and project named.
  • octane-tsc over the added projects together: 0 errors. The first CI run caught the floating-ui inputs, the resizable-panels consumer compatibility and the parity hashes; all three are fixed in the follow-up commit.
  • Each of the 31 originally unreached packages was checked on its own first, to separate real errors from config drift.
  • pnpm sync, pnpm format:files:check on changed files.
  • Full pnpm typecheck, pnpm test: left to CI.

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

Low Risk
Changes are mostly CI/manifest enforcement and type-only fixes; runtime behavior is unchanged aside from resizable-panels using a type assertion for focus options.

Overview
Root CI typecheck now covers every published package, not just a handful of manifest-listed projects. scripts/check-typecheck-coverage.mjs is refactored into testable exports that assert each non-private package’s octane-tsc/tsrx-tsc projects (or default tsconfig.json) appear in the root pnpm typecheck chain, with dated publishedExceptions, materializedProjects, and stale-exception detection. Unit tests run via typecheck:coverage before the manifest check.

The root typecheck script adds ~43 octane-tsc projects for packages that previously only typechecked locally (e.g. email, formisch, wouter, resizable-panels typetests, and related typetest configs). @octanejs/drei, @octanejs/ink, and @octanejs/select stay out of the chain until virtual-TSX compiler issues are fixed, with exceptions expiring 2026-10-31.

TypeScript 7.1 compatibility tweaks: @octanejs/email css-tree walk callbacks use satisfies WalkOptionsVisit<…>; formisch and input-otp typetests drop removed baseUrl and use relative paths; resizable-panels replaces @ts-expect-error on focusVisible with as FocusOptions and switches its package typecheck to octane-tsc to match CI.

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

About 40 published packages had a tsconfig, or a package-local typecheck
script, that no CI job ran. The root `typecheck` chain never reached them, and
the coverage manifest required only four projects.

- check-typecheck-coverage.mjs now requires every published package's own
  projects to be reached by the root octane-tsc run. Those are the projects its
  `typecheck` script hands to a .tsrx-aware checker, or its tsconfig.json when
  it declares none. A project that cannot pass yet needs a published exception
  with a reason and an expiry date, and an exception goes stale as soon as the
  project is typechecked. Unit tests cover the rules.
- The root `typecheck` gains 43 projects: alien-signals, auto-animate,
  calendar, colorful, content-loader, day-picker, draggable, email, email-cli,
  formisch, html-react-parser, image-crop, input-otp, livestore, octane-is,
  popper, portabletext, resizable-panels, the sanity packages, spring,
  stick-to-bottom, syntax-highlighter, to-print, transition-group, vaul,
  waypoint, window, wouter, plus floating-ui, tanstack-pacer and tanstack-store
  projects their own scripts check.
- Fixes for errors under TypeScript 7.1 (octane-tsc):
  - email: css-tree walk options typed with `satisfies`, so their callbacks
    are contextually typed again.
  - formisch and input-otp typetests: drop `baseUrl`, which TypeScript 7
    removed.
  - resizable-panels: the lib now knows `FocusOptions.focusVisible`, so the
    unused `@ts-expect-error` goes, and its script uses octane-tsc like CI.
- drei, ink and select fail only on errors in octane/compiler/volar's virtual
  TSX, with no source location. They carry exceptions until 2026-10-31 while
  that compiler defect is fixed separately.

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 ci PR: CI or build pipeline labels Oct 3, 2026
@github-actions
github-actions Bot marked this pull request as draft October 3, 2026 07:46
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 4 value(s) increased
  • 🔴 bundle-reachability: 6 value(s) increased

Compares 11a9da935 with 58a63aeb1 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 also moving beyond that margin. 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.29 +1.5% ±7% ⚪ within noise
octane-tsrx replace 6.73 6.89 +2.4% ±18% ⚪ within noise
octane-tsrx add 3.22 3.14 −2.5% ±12% ⚪ within noise
octane-tsrx update 0.38 0.30 −21.1% ±43% ⚪ within noise
octane-tsrx select 0.12 0.15 +25.0% ±92% ⚪ within noise
octane-tsrx swap 0.31 0.29 −6.5% ±33% ⚪ within noise
octane-tsrx remove 0.34 0.32 −5.9% ±56% ⚪ within noise
octane-tsrx runlots 27.23 29.50 +8.3% ±23% ⚪ within noise
octane-tsrx select_lots 0.23 0.22 −4.3% ±73% ⚪ within noise
octane-tsrx clear 39.09 38.72 −0.9% ±6% ⚪ within noise
octane-jsx run 3.60 3.53 −1.9% ±8% ⚪ within noise
octane-jsx replace 6.63 6.36 −4.1% ±13% ⚪ within noise
octane-jsx add 3.06 3.05 −0.3% ±8% ⚪ within noise
octane-jsx update 0.53 0.49 −7.5% ±27% ⚪ within noise
octane-jsx select 0.39 0.39 −0.0% ±51% ⚪ within noise
octane-jsx swap 0.62 0.60 −3.2% ±22% ⚪ within noise
octane-jsx remove 0.50 0.48 −4.0% ±36% ⚪ within noise
octane-jsx runlots 27.27 27.22 −0.2% ±9% ⚪ within noise
octane-jsx select_lots 2.50 2.49 −0.4% ±17% ⚪ within noise
octane-jsx clear 42.07 40.48 −3.8% ±8% ⚪ within noise

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 126,800 125,203 −1,597 (−1.3%) 🟢
octane-tsrx js_gzip 41,987 41,356 −631 (−1.5%) 🟢
octane-tsrx js_brotli 37,029 36,465 −564 (−1.5%) 🟢
octane-tsrx app_gzip 2,563 2,562 −1 (−0.0%) 🟢
octane-tsrx app_brotli 2,222 2,226 +4 (+0.2%) 🔴
octane-tsrx fw_raw 119,288 117,691 −1,597 (−1.3%) 🟢
octane-tsrx fw_gzip 39,424 38,794 −630 (−1.6%) 🟢
octane-tsrx fw_brotli 34,807 34,239 −568 (−1.6%) 🟢
octane-tsrx todo_js_raw 142,187 140,590 −1,597 (−1.1%) 🟢
octane-tsrx todo_js_gzip 47,000 46,407 −593 (−1.3%) 🟢
octane-tsrx todo_js_brotli 41,237 40,640 −597 (−1.4%) 🟢
octane-tsrx todo_app_gzip 2,476 2,477 +1 (+0.0%) 🔴
octane-tsrx todo_app_brotli 2,120 2,119 −1 (−0.0%) 🟢
octane-tsrx todo_fw_raw 137,077 135,480 −1,597 (−1.2%) 🟢
octane-tsrx todo_fw_gzip 44,524 43,930 −594 (−1.3%) 🟢
octane-tsrx todo_fw_brotli 39,117 38,521 −596 (−1.5%) 🟢
octane-tsrx chat_js_raw 141,396 139,799 −1,597 (−1.1%) 🟢
octane-tsrx chat_js_gzip 46,944 46,353 −591 (−1.3%) 🟢
octane-tsrx chat_js_brotli 41,289 40,785 −504 (−1.2%) 🟢
octane-tsrx chat_app_gzip 2,977 2,978 +1 (+0.0%) 🔴
octane-tsrx chat_app_brotli 2,641 2,639 −2 (−0.1%) 🟢
octane-tsrx chat_fw_raw 134,743 133,146 −1,597 (−1.2%) 🟢
octane-tsrx chat_fw_gzip 43,967 43,375 −592 (−1.3%) 🟢
octane-tsrx chat_fw_brotli 38,648 38,146 −502 (−1.3%) 🟢
octane-tsrx weather_js_raw 178,362 176,764 −1,598 (−0.9%) 🟢
octane-tsrx weather_js_gzip 58,358 57,763 −595 (−1.0%) 🟢
octane-tsrx weather_js_brotli 50,823 50,323 −500 (−1.0%) 🟢
octane-tsrx weather_app_gzip 9,044 9,045 +1 (+0.0%) 🔴
octane-tsrx weather_app_brotli 7,597 7,584 −13 (−0.2%) 🟢
octane-tsrx weather_fw_raw 151,627 150,029 −1,598 (−1.1%) 🟢
octane-tsrx weather_fw_gzip 49,314 48,718 −596 (−1.2%) 🟢
octane-tsrx weather_fw_brotli 43,226 42,739 −487 (−1.1%) 🟢

13 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
cli-spa-starter raw 116,492 114,895 −1,597 (−1.4%) 🟢
cli-spa-starter gzip 39,366 38,762 −604 (−1.5%) 🟢
cli-spa-starter brotli 34,383 33,916 −467 (−1.4%) 🟢
root-chained-jsx raw 85,941 84,344 −1,597 (−1.9%) 🟢
root-chained-jsx gzip 28,529 27,881 −648 (−2.3%) 🟢
root-chained-jsx brotli 25,334 24,833 −501 (−2.0%) 🟢
prop-attributes raw 97,393 95,796 −1,597 (−1.6%) 🟢
prop-attributes gzip 32,385 31,774 −611 (−1.9%) 🟢
prop-attributes brotli 28,676 28,217 −459 (−1.6%) 🟢
context raw 110,798 109,201 −1,597 (−1.4%) 🟢
context gzip 36,702 36,119 −583 (−1.6%) 🟢
context brotli 32,499 32,026 −473 (−1.5%) 🟢
hydrate-root raw 172,762 172,836 +74 (+0.0%) 🔴
hydrate-root gzip 54,761 54,795 +34 (+0.1%) 🔴
hydrate-root brotli 47,804 47,808 +4 (+0.0%) 🔴
deferred-hydration raw 236,147 236,221 +74 (+0.0%) 🔴
deferred-hydration gzip 74,660 74,695 +35 (+0.0%) 🔴
deferred-hydration brotli 64,515 64,439 −76 (−0.1%) 🟢
suspense-transition raw 166,742 165,145 −1,597 (−1.0%) 🟢
suspense-transition gzip 53,582 53,003 −579 (−1.1%) 🟢
suspense-transition brotli 46,878 46,418 −460 (−1.0%) 🟢
binding-mantine-hooks-vite raw 98,028 96,431 −1,597 (−1.6%) 🟢
binding-mantine-hooks-vite gzip 32,600 31,991 −609 (−1.9%) 🟢
binding-mantine-hooks-vite brotli 28,917 28,434 −483 (−1.7%) 🟢
binding-mantine-hooks-esbuild raw 97,622 96,030 −1,592 (−1.6%) 🟢
binding-mantine-hooks-esbuild gzip 32,786 32,165 −621 (−1.9%) 🟢
binding-mantine-hooks-esbuild brotli 29,112 28,613 −499 (−1.7%) 🟢
binding-apollo-client-esbuild gzip 114,460 114,461 +1 (+0.0%) 🔴
binding-apollo-client-esbuild brotli 99,732 99,684 −48 (−0.0%) 🟢
binding-usehooks-ts-vite raw 98,661 97,064 −1,597 (−1.6%) 🟢
binding-usehooks-ts-vite gzip 32,764 32,156 −608 (−1.9%) 🟢
binding-usehooks-ts-vite brotli 29,090 28,573 −517 (−1.8%) 🟢
binding-usehooks-ts-esbuild raw 98,244 96,652 −1,592 (−1.6%) 🟢
binding-usehooks-ts-esbuild gzip 32,930 32,316 −614 (−1.9%) 🟢
binding-usehooks-ts-esbuild brotli 29,231 28,719 −512 (−1.8%) 🟢

70 other measured values are unchanged.

…s and the parity lane

The first CI run of the wider root typecheck found three problems with this
branch's own changes:

- resizable-panels: published consumers compile the source with an older
  lib.dom that has no `FocusOptions.focusVisible`, so removing the
  `@ts-expect-error` broke the packed-consumer check. An `as FocusOptions`
  assertion compiles under both TypeScript 5.9 and 7.1 (verified: 5.9 rejects
  the unasserted literal with TS2353).
- formisch and input-otp: the React parity audit pins each typetest config's
  hash. Dropping `baseUrl` resolves the same files under tsrx-tsc and
  octane-tsc, so the pinned hashes are updated.
- floating-ui's adapted typetests compile upstream files that the parity
  harness materializes into a gitignored directory, so a clean checkout has no
  inputs. The coverage record gains `materializedProjects`: a reason, no
  expiry, stale once the project is typechecked. The project leaves the root
  chain.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm marked this pull request as ready for review October 3, 2026 10:21
@trueadm
trueadm merged commit c1d3da2 into main Oct 3, 2026
50 checks passed
@trueadm
trueadm deleted the ci/typecheck-published-packages branch October 3, 2026 10:55
KevinVandy pushed a commit to KevinVandy/octane that referenced this pull request Oct 9, 2026
* feat: add @octanejs/tanstack-db binding

Port the Octane live-query bindings for @tanstack/db (TanStack/db PR octanejs#1699,
`packages/octane-db`, still open) into the monorepo as `@octanejs/tanstack-db`.

- Re-exports @tanstack/[email protected] unchanged; adapts the live-query surface
  (useLiveQuery, useLiveInfiniteQuery, useLiveSuspenseQuery, useLiveQueryEffect,
  usePacedMutations) onto Octane hooks. Source imports only public @tanstack/db.
- Package shape matches sibling bindings: exports point at src/ (no dist build),
  self-contained tsconfig (jsxImportSource octane), status.json.
- Tests decoupled from the db monorepo: internal src imports rewritten to
  @tanstack/db; test helpers, the conformance suite, and db's expression
  evaluator vendored under tests/db-fixtures/ (pinned to 0.6.17, test-only) so
  the infinite-query tests can interpret the where/cursor IR db generates.
- Wired into vitest.config.js and the root typecheck script; registered in
  website/src/content/bindings.json; changeset added.

Generated inventories (docs/packages.md, docs/bindings-status.md, CLI data,
react-parity lockfile hashes) are intentionally omitted from this diff and
should be regenerated with `pnpm sync` at merge time.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(tanstack-db): move @octanejs/tanstack-db to TanStack DB 0.7.0 and fix live-query blockers

Rebinds the binding to the TanStack DB 0.7.0 adapter architecture and fixes the
PR review's P1 blockers at the source:

- Suspense suspends via Octane `use(thenable)` instead of `throw promise`
  (Octane Suspense only recognizes the use() sentinel). Proven by an async
  fallback regression test.
- useLiveQuery/useLiveSuspenseQuery rebuilt on db's shared createLiveQueryObserver
  (db octanejs#1642) so status-only transitions (error/cleaned-up) update isError/
  isCleanedUp.
- useLiveInfiniteQuery rebuilt on the coordinated createLiveQueryWindowController
  (db octanejs#1675): window leases stop two hooks on one collection truncating each
  other (regression test), and a failed page load rolls back and surfaces
  snapshot.error with a clean retry.
- useLiveQueryEffect parses deps + the compiler slot together from ...rest, so
  no-deps usage keeps its call-site slot.
- Conformance suite: drop order-only-move from universal expected-fail (db octanejs#1669
  fixed the contract); un-skip the missing-orderBy test (surfaced synchronously
  during render via getWindow()); record StrictMode double-invoke as
  not-applicable. Committed-test-marker gate passes.
- Bump @tanstack/db ^0.6.17 -> ^0.7.0; re-pin vendored db-internal fixtures;
  vendor the @tanstack/[email protected] adapter source under upstream/ with
  SHA256SUMS; add UPSTREAM.md pin + crosswalk; refresh status.json/README.

Octane-adaptation: the subscribe wrappers defer an initial onStoreChange to a
microtask because Octane's useSyncExternalStore re-checks the snapshot before
(not after) subscribe; pinned by the eager-onstorechange test.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(tanstack-db): call use() unconditionally in useLiveSuspenseQuery; document startSync divergence

Addresses two Cursor Bugbot findings on the 0.7.0 remediation commit.

- [High] useLiveSuspenseQuery called use() only on the loading/idle path and
  skipped it once ready. Octane keys use(thenable) by dynamic call-order index
  (runtime __thenableIdx), not by compiler slot, so a ready hook that skips its
  use() shifts the thenable index of a sibling use()/second useLiveSuspenseQuery
  in the same component. On the replay after the first query resolves, the
  second hook read the first's fulfilled thenable (resume-replay leniency path)
  and stopped suspending, surfacing its still-loading collection as ready. Fix:
  call use() unconditionally — exactly once per render — handing it an
  already-resolved sentinel on the ready/stale paths so the call-order index
  stays stable and no suspend occurs. New regression test drives two
  independently gated collections and asserts the later sibling stays suspended
  while the earlier one is ready (fails pre-fix with `a:3|b:0`).

- [Medium] Documented the useLiveInfiniteQuery `startSync: true` divergence in
  status.json. The query-function collection is created with the first-page
  window already applied (.limit(pageSize + 1).offset(0)), so eager sync fetches
  exactly the first page — never a wider subset — before the window controller
  grows it; only the fetch-start timing differs from upstream's post-commit
  start. (Bugbot's third finding, "stale pages after deps change", was against
  the pre-remediation commit and no longer applies: the controller rewrite
  computes page count synchronously during render.)

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(tanstack-db): pre-tag the useLiveSuspenseQuery ready-path sentinel as fulfilled

Follow-up to the unconditional-use() change. The shared `SETTLED` thenable handed
to `use()` on the non-loading paths was a bare `Promise.resolve()`. Octane's
`use()` tags an untagged thenable `'pending'` synchronously (its fulfillment
callback runs a microtask later), so the first `use(SETTLED)` on the ready path
suspended and flashed the Suspense fallback even though data was already ready.

Give `SETTLED` the React 19 `cache()` settled shape (`status: 'fulfilled'`) so
`trackThenable` leaves it untouched and `use()` returns synchronously without
suspending. New regression test preloads a collection to `ready` before mount so
the first render takes the ready path, and asserts the fallback never renders
(fails pre-fix: first commit shows `Loading...` instead of `ready:3`).

Reported by Cursor Bugbot on the previous commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(tanstack-db): defer infinite query sync until commit

* fix: repair tanstack db CI integration

* fix: complete tanstack db CI integration

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: Dominic Gannaway <[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.

1 participant