refactor(types): extract value clusters into types/tools and types/wire leaves - #2019
refactor(types): extract value clusters into types/tools and types/wire leaves#2019lidge-jun wants to merge 2 commits into
Conversation
|
⏳ DRAFT
What to do
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe PR moves tool utilities and wire-policy logic from ChangesTypes value-leaf extraction
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This refactor moves existing type/value definitions into leaf modules while preserving the public exports and runtime identity; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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
First stacked PR of the mega-file split program (devlog/_plan/260818_megafile_split_program, risk basis in 000_risk_assessment.md). Pure move, zero behavior change: the two runtime value clusters leave src/types.ts (1867 -> 1729 lines) into leaf modules, with src/types.ts keeping every current export as a barrel re-export so no consumer or test import changes.
import typelines bind the aliases the remaining interfaces still reference (export type ... fromdoes not bind locally — audit finding); in-placeexport/export typeblocks keep the public surface byte-compatible. Extensionless specifiers so the lab-boundary walker follows the new edges.Value identity is preserved by ESM re-export semantics: one declaration site per const, so MODEL_ADAPTER_OVERRIDE_ALLOWED stays a single ReadonlySet instance. The plan was audited by two independent reviewers (grok-4.6 NEAR-PASS, gpt-5.6-sol FAIL on a barrel-cycle recipe defect) and amended before implementation; both blockers were plan-recipe issues, fixed as described above.
Next in the stack: type-cluster split (request/config/provider/accounts) on this branch's head.
Verification
At head 194f9f2 on remote validation host (Linux):
bun run test: 13,201 pass / 15 skip / 0 fail across 840 files (482.9s)tests/core-lab-boundary.test.ts: 13 pass standalone (new static edges types.ts -> types/tools.ts, types/wire.ts are walked and stay off src/lab/)bun run privacy:scan: passedbun run typecheck: exit 0Checklist
devSummary by CodeRabbit
New Features
Refactor