refactor(core): remove dead exports and relocate test-only machinery - #3094
Conversation
Generated-by: Codex
📝 WalkthroughSummaryThis PR removes unused core contracts and keeps test-only code out of the published It deletes The PR extends the existing provider conformance tests. It does not create a parallel production path. The provider matrix remains available to runtime tests through local imports. This is the smallest coherent solution. It removes unused files and package exports while preserving existing test behavior. No additional runtime logic or production machinery is added. The deleted bot-platform hints and settings re-export can remain removed because the objectives identify them as unused. The provider matrix and test helper cannot be deleted because tests still use them. Validation includes core tests, the focused provider conformance suite, lint, formatting, build, typecheck, and targeted Knip checks. The full runtime test suite remains unclean in the reported Windows environment because of unrelated shell, PTY, Seatbelt, and POSIX process-semantics failures. Review-relevant risksThe package export removal and deletion of exported symbols change the public No other protected-area effect was identified in the current diff. Required-check status remains unverified beyond the reported validation. The person performing the merge reviews the final diff, and a maintainer makes the final determination. WalkthroughThe PR removes obsolete core exports, deletes platform hint and settings result modules, relocates the test assertion helper, and updates core and runtime test imports. ChangesCore contract cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The refactor removes dead exports and relocates test-only files; the moved helper may still be emitted under dist/tests, but this creates no published-artifact or runtime impact. No actionable merge-blocking risk remains. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/core/src/__tests__/test-helpers.ts (1)
3-3: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDo not treat this move as excluding test code from
dist. The core build includessrc/**/*.ts, so it emitsdist/__tests__/test-helpers.jsand its declaration.@maka/coreis private, so this is not a published-artifact issue.Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: fe1789e2-dda1-4a33-b86d-b62e1799c939
📒 Files selected for processing (18)
packages/core/package.jsonpackages/core/src/__tests__/additional-permissions.test.tspackages/core/src/__tests__/capabilities.test.tspackages/core/src/__tests__/computer-use.test.tspackages/core/src/__tests__/events.test.tspackages/core/src/__tests__/health.test.tspackages/core/src/__tests__/permission-profile.test.tspackages/core/src/__tests__/provider-auth.test.tspackages/core/src/__tests__/runtime-event.test.tspackages/core/src/__tests__/sandbox-boundary.test.tspackages/core/src/__tests__/settings.test.tspackages/core/src/__tests__/task-submission-readiness.test.tspackages/core/src/__tests__/test-helpers.tspackages/core/src/bot-platform-hints.tspackages/core/src/settings/__tests__/sensitive.test.tspackages/core/src/settings/result.tspackages/runtime/src/__tests__/provider-contract-matrix.test.tspackages/runtime/src/__tests__/provider-contract-matrix.ts
💤 Files with no reviewable changes (3)
- packages/core/package.json
- packages/core/src/settings/result.ts
- packages/core/src/bot-platform-hints.ts
Astro-Han
left a comment
There was a problem hiding this comment.
Reviewed against #3089.
bot-platform-hints.ts and settings/result.ts have no remaining importers. provider-contract-matrix belongs next to the runtime conformance suite, not in the contracts package; the suite still imports it from ./provider-contract-matrix.js. The test import rewrites look complete, including settings/__tests__/sensitive.test.ts.
One acceptance line is not literally true. core tsconfig.json is include: ["src/**/*.ts"] with an empty exclude, and the suite runs dist/**/*.test.js, so src/__tests__/test-helpers.ts still emits dist/__tests__/test-helpers.js. The package is private, so this is not a release problem. Fixing it means changing how core is built and tested; do not fold that in here.
Approve.
AI-assisted review: Grok 4.6 drafted the first pass. A second pass on opencode-go/deepseek-v4-flash:max re-grepped the four named symbols on main and on the PR branch and confirmed the conformance import still resolves. I checked the four named deletions, the core exports map, and the tsconfig include/exclude on the PR branch. Unverified by me: I did not rebuild core or rerun the conformance suite.
|
Fast path: dead-contract deletion plus moving test-only files next to their suites. No public export consumers remain for the deleted modules. The package is private, so the leftover I reviewed the final diff and am merging on that basis. Human contributor of record for this review: Astro-Han. |
Summary
Remove dead core contracts and keep test-only machinery out of the contracts package output. Delete the unused bot-platform hints and settings result re-export, move the provider conformance matrix into the runtime test surface, move the core test helper under
core/src/__tests__, and update the affected test imports.Fixes #3089
Verification
npm --workspace @maka/core test— 544 tests passednpm run lintnpm run format:checknpm run buildnpm run typechecknpx knip --workspace apps/desktopnpx knip --workspace packages/uibot-platform-hints.js,settings/result.js,provider-contract-matrix.js, or roottest-helpers.jsdist/__tests__The full
npm --workspace @maka/runtime testsuite was not clean in this Windows environment: unrelated shell/PTY, Seatbelt, and POSIX process-semantics tests failed and the run was stopped after it continued without progress. The changed provider conformance suite passed independently.AI use
Tool(s) and scope: Codex analyzed issue #3089, relocated and removed the specified modules, updated test imports and exports, ran verification, and reviewed the implementation. The human contributor remains responsible for reviewing and submitting the contribution.
Checklist
Does this PR entail a change in behavior?