refactor(runtime-host): trim dead export surface from barrels - #3095
Conversation
Remove unconsumed server, client, protocol, and adapter barrel exports while moving package-internal consumers to their leaf modules. Generated-by: Codex
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan includes up to 3 reviews per rolling hour; 2 remain after this review. 📝 WalkthroughSummaryThis PR reduces the advertised API surface of the private The PR extends the existing module structure. It does not create a parallel implementation or change runtime behavior. The changes are the smallest coherent solution. They remove only unconsumed barrel exports and update dependent imports. No additional abstraction or runtime path was added. No further deletion or simplification is identified without reducing API regression coverage. The import-only test changes preserve existing protocol, transport, server, and client coverage. The formatting fix restores Biome-approved wrapping for three Risks and validation
Review-relevant risksThe current diff changes the exported API contract of No other protected-area effect was identified in the current diff. The person performing the merge must review the final diff, and a maintainer makes the final determination. WalkthroughThe change narrows runtime-host barrel exports and updates internal tests and runtime modules to use direct imports. Test assertions and runtime behavior remain unchanged. ChangesRuntime-host barrel cleanup
Estimated code review effort: 2 (Simple) | ~15 minutes Merge Risk: ⚪ Minimal · up to This PR trims unused barrel exports and updates internal imports without changing runtime behavior; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Astro-Han
left a comment
There was a problem hiding this comment.
Reviewed against #3087.
The deleted server / client / protocol / adapter names have no external importers in cli, desktop, eval, ui, or runtime. The kept server exports are used. Package-internal imports that went through those barrels now point at leaf modules. RuntimeHostProtocolError is no longer re-exported from the protocol barrel; its remaining importers use protocol/errors.js. OAUTH_PRESENTATION_SERVICE_ID / VERSION left the client barrel and still come from the protocol barrel, which is the right owner.
This does not stop the same dead surface growing back: knip.json still only covers apps/desktop and packages/ui. That was optional in the issue; it is the actual gate. Also revert the unrelated assert.rejects rewraps in host-kernel.test.ts.
Approve. The knip follow-up should be its own PR.
AI-assisted review: Grok 4.6 drafted the first pass. A second pass on opencode-go/deepseek-v4-flash:max enumerated the deleted names and grepped consuming workspaces; it found no leftover importer and no behavior change in host-kernel.test.ts beyond the formatter reflow. I grepped the deleted export names from the consuming workspaces and checked knip.json. Unverified by me: I did not rerun the runtime-host suite.
|
Approve stands. Cannot merge yet: the typecheck job fails on Biome format in That is the unrelated Fast path would apply once checks pass: barrel-only export trim, no runtime behavior change, easy to revert. |
Restore the Biome-approved wrapping for three assert.rejects calls so the PR typecheck workflow can pass. Generated-by: Codex
Summary
Trim the consumed API surface of the
@maka/runtime-hostserver, client, protocol, and adapter barrels. Package-internal consumers of removed exports now import directly from their leaf modules, so runtime behavior is unchanged.Fixes #3087
Verification
npm --workspace @maka/runtime-host run buildpassed.npm --workspace @maka/runtime-host run typecheckpassed.npm run buildpassed.npm run typecheckpassed.npm run lintpassed.npm run format:checkpassed.npx knip --workspace apps/desktop --workspace packages/uipassed.AI use
Tool(s) and scope: Codex performed the implementation, test updates for leaf imports, verification, and code review. The commit includes the required
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?