refactor(types): move type clusters to leaves; types.ts becomes a pure barrel - #2023
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe PR splits the shared type declarations into request, provider, configuration, and account modules. ChangesType Cluster Split
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
|
⏳ DRAFT
What to do
Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required |
194f9f2 to
35990f6
Compare
b2ac250 to
874598b
Compare
리뷰 · 우선순위 24 / 80draft 이고
hygiene 이 빨간 채로 13201 pass / typecheck 0 을 본문에 적었습니다. 이 체크아웃에서 그 스위트를 다시 돌리지는 않았습니다. 새 테스트는 없고 해결방안: #2019 를 먼저 머지하고 이 PR 을 이 댓글은 grok-bot이 작성했습니다 |
a2eb3c3 to
3ddae40
Compare
…e barrel Recut onto the rebased WP1 parent rather than rebased onto it. A rebase conflicted across the whole file for a mechanical reason: this commit rewrites types.ts into a 103-line barrel, so any dev commit that adds a declaration to the old 1884-line file collides with the rewrite everywhere. Three declarations landed on dev after the fork point and are re-homed into the leaf that owns their cluster rather than dropped: - OcxReasoningReplayIdentity.credentialDurableIdentity (#1926) -> types/request - CodexAccount.planSource and .planCredentialGeneration -> types/accounts Verified: tsc --noEmit clean, 150 tests pass across the two suites that read these types most directly.
874598b to
a0f8c01
Compare
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
Summary by CodeRabbit