refactor(types): move type clusters to leaves; types.ts becomes a pure barrel - #2023
refactor(types): move type clusters to leaves; types.ts becomes a pure barrel#2023lidge-jun wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
⏳ DRAFT
What to do
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved. |
Summary
Stack (merge bottom-up):
Depends on #2019. Review this PR's diff only.
Layer 2 of the mega-file split program (devlog/_plan/260818_megafile_split_program). src/types.ts (1727 lines) becomes a 103-line pure barrel; every type cluster moves to a type-only leaf:
import("./adapters/cursor/...")type queries rewritten to../adapters/cursor/....The two runtime value re-export blocks from layer 1 (tools + wire) stay in the barrel unchanged, so the runtime import graph is untouched: the protected
responses/core.ts -> types -> types/toolsedge is identical, and type-only leaves are erased. Named re-exports only — noexport *(would duplicate runtime names).Independently audited twice (grok-4.6, gpt-5.6-sol) before implementation; audits corrected cluster boundaries, caught 3 missing dependency edges (request->provider tier types, config->accounts CodexAccount, the RefreshPolicy cycle) and the cursor path rewrites. Recipe recorded in devlog 020_wp1b_type_clusters.md.
Verification
At head b2ac250 on the remote validation host (Linux):
bun run test: 13,201 pass / 15 skip / 0 fail across 840 files (495.6s) — pass count identical to layer 1's baseline, proving zero behavior changetests/core-lab-boundary.test.ts: 13 passbun run typecheck: exit 0Checklist