chore(core,sdk): make the ai-v7 typecheck pass deterministic#3847
Conversation
The forward-compat ai-v7 typecheck pass ran under composite: true, so it wrote incremental buildinfo even with --noEmit. Disabling composite/incremental for this -p tsconfig.ai-v7.json pass removes a stale-state source that can surface as spurious CommonJS-vs-ESM (TS1479) errors on the bare "ai" import.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (33)
🧰 Additional context used📓 Path-based instructions (1)**/*.{js,ts,tsx,jsx,css,json,md}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (14)📚 Learning: 2025-11-27T16:26:37.432ZApplied to files:
📚 Learning: 2026-03-02T12:43:34.140ZApplied to files:
📚 Learning: 2026-03-25T15:29:25.889ZApplied to files:
📚 Learning: 2026-05-01T15:45:12.777ZApplied to files:
📚 Learning: 2026-03-21T21:23:35.117ZApplied to files:
📚 Learning: 2026-06-02T21:20:43.541ZApplied to files:
📚 Learning: 2026-04-15T15:39:31.575ZApplied to files:
📚 Learning: 2026-06-02T21:20:48.921ZApplied to files:
📚 Learning: 2026-03-02T12:43:34.140ZApplied to files:
📚 Learning: 2026-06-04T15:28:19.931ZApplied to files:
📚 Learning: 2026-05-23T09:12:50.004ZApplied to files:
📚 Learning: 2026-03-25T15:29:25.889ZApplied to files:
📚 Learning: 2025-11-27T16:26:37.432ZApplied to files:
📚 Learning: 2026-06-02T21:20:43.541ZApplied to files:
🔇 Additional comments (2)
WalkthroughThis pull request updates TypeScript compiler configurations in two packages to disable composite and incremental build modes. The 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The SDK and core packages run a second, forward-compat typecheck pass (
tsc --noEmit -p tsconfig.ai-v7.json) that remaps the"ai"import to the ESM-only AI SDK 7 canary, so we catch source that only compiles against one major. That pass inheritedcomposite: truefrom the base tsconfig, which makestscwrite a.tsbuildinfoeven under--noEmit.Incremental buildinfo caches each file's resolved module format (CJS vs ESM) and module resolution. When that state goes stale or is replayed, the v7 pass can report spurious
TS1479("CommonJS module ... cannotrequirean ECMAScript module") errors on the"ai"import even though the source is fine in a clean checkout. Because this pass shares the typecheck job that gates the Docker image publish, a spurious failure there blocks publishing.Fix
Set
composite: falseandincremental: falseon bothtsconfig.ai-v7.jsonfiles. The pass is--noEmitonly, so it never needed incremental state. Now each run is a clean, full check that writes no buildinfo and can't replay stale resolution.Verified: both
@trigger.dev/sdkand@trigger.dev/coretypecheck green, and neither writes an ai-v7.tsbuildinfoanymore.