Skip to content

fix(react-port): use pinned Jest test discovery - #2659

Merged
domgan-oai merged 2 commits into
octanejs:mainfrom
openai-oss-forks:codex/react-port-pinned-jest-discovery
Nov 14, 2026
Merged

domgan-oai merged 2 commits into
octanejs:mainfrom
openai-oss-forks:codex/react-port-pinned-jest-discovery

Conversation

@domgan-oai

@domgan-oai domgan-oai commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Use a verified list from Jest 29.7.0 for conventional test discovery at the immutable Framer Motion 12.42.2 pin. Keep explicit test selectors, inline sources, and compile-only tests in the inventory.

Closes #2658. Both upstream Jest configs select named tests under src. Treating every __tests__ module as a test makes the port preflight require a registration in a support helper.

Validation

  • pnpm format:check
  • pnpm typecheck
  • pnpm test
  • All 379 React port tests, including 32 preflight tests, plus targeted formatting, pnpm sync, and git diff --check.
  • Pinned Jest --listTests returned 94 client and 3 SSR paths. The independent preflight inventory matched all 97 and extracted 822 static registrations, including two type-test files.
  • The real preflight CLI passed license and test evidence for the immutable package-subdirectory URL. Regression controls exercise a missing test, a changed witness, a selected test without registrations, and independent explicit, inline, and type tests.
  • Performance review is inapplicable. This is repository tooling.
  • Concision review. Reuse the existing pinned profile and Git tree inventory. A general Jest config evaluator would add runner execution or require reproducing Jest's configuration and matching rules.

Risk / follow-ups

The pinned list replaces Jest's convention fallback for this package and commit. Explicit selectors remain additive. The CLI still reports pending intake until the graph's dependencies are classified. Static inventory establishes selection and registrations.

Provenance

  • An agent produced this diff (agent-authored)

Codex task · host com-79386


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Note

Low Risk
Tooling-only changes to test inventory selection for pinned packages; behavior is gated on profiles and covered by new regression tests.

Overview
React port preflight now supports pinned Jest test discovery for immutable packages: when a versioned inventory profile includes jestDiscovery, immutableTestInventory validates config witnesses (pinned git blobs) and requires every listed test path to exist in source with countable registrations, replacing the default Jest __tests__ convention for that pin.

Explicit selectors, inline Vitest sources, type-test paths, and optional helper expansions still apply additively. Profile loading tolerates missing helpers, and mismatch errors refer to test inventory profiles. A new framer-motion 12.42.2 profile records 97 Jest --listTests paths; tests cover inventory shape and failure modes (missing witness, missing listed test, non-test content in a listed file, helpers excluded from default discovery).

Reviewed by Cursor Bugbot for commit 6394e1f. 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 fix PR: bug fix labels Nov 14, 2026
@domgan-oai
domgan-oai marked this pull request as ready for review November 14, 2026 03:43
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No byte growth, no added work, and no timing changes beyond ±3%.

Compares 3c31a249a, the merge commit's first parent with d7672e1e1 on the same runner. Any increase in a js-framework work counter fails this check; byte changes are a report. 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

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 2.600 2.767 ±0.0% ±0.0% … +3.9% ⚪ within noise
octane-tsrx replace 6.025 5.908 −0.8% −4.9% … +3.1% ⚪ within noise
octane-tsrx add 2.133 2.233 +0.0% −0.0% … +4.7% ⚪ within noise
octane-tsrx update 0.096 0.096 +0.5% −1.3% … +3.0% ⚪ within noise
octane-tsrx select 0.006 0.006 +0.7% −0.8% … +2.3% ⚪ within noise
octane-tsrx swap 0.018 0.017 −0.8% −2.7% … ±0.0% ⚪ within noise
octane-tsrx remove 0.018 0.017 +2.9% +1.5% … +4.2% ⚪ within noise
octane-tsrx runlots 22.333 22.325 +1.2% −1.6% … +2.6% ⚪ within noise
octane-tsrx select_lots 0.006 0.006 −0.3% −0.5% … +1.1% ⚪ within noise
octane-tsrx clear 50.025 49.217 −0.7% −1.3% … +0.3% ⚪ within noise
octane-jsx run 3.458 3.767 +0.0% ±0.0% … +2.9% ⚪ within noise
octane-jsx replace 7.958 7.492 −2.4% −3.7% … ±0.0% ⚪ within noise
octane-jsx add 3.308 3.508 +0.0% −0.0% … +6.6% ⚪ within noise
octane-jsx update 0.186 0.168 +1.4% −1.8% … +19.4% ⚪ within noise
octane-jsx select 0.092 0.099 +4.2% ±0.0% … +13.0% ⚪ within noise
octane-jsx swap 0.154 0.152 +1.4% −1.4% … +3.6% ⚪ within noise
octane-jsx remove 0.122 0.125 −0.5% −4.5% … +1.1% ⚪ within noise
octane-jsx runlots 28.525 27.367 −1.9% −5.0% … +1.0% ⚪ within noise
octane-jsx select_lots 0.910 0.877 +3.5% −0.3% … +6.4% ⚪ within noise
octane-jsx clear 52.608 52.700 +0.3% −1.0% … +3.0% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

No changes across 111 measured values.

Public-import reachability bundles (bytes)

No changes across 141 measured values.

@domgan-oai
domgan-oai merged commit 70ba273 into octanejs:main Nov 14, 2026
55 checks passed
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 fix PR: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Honor explicit Jest test discovery during React port preflight

1 participant