fix(tests): dedupe imports + permission-mode types from #202 consolidation#204
fix(tests): dedupe imports + permission-mode types from #202 consolidation#204
Conversation
…olidation The test consolidation in #202 left duplicate import lines in ctoWorkerLifecycle / linearIntake / linearSync test files (TS2300) and under-typed the lazy resolverUtils handles in prRebase.test.ts (TS2322 against the real AiPermissionMode -> AgentChatPermissionMode signatures). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 48 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 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 |
Fixes the typecheck failures on main after the test consolidation in #202.
Local typecheck clean.
Greptile Summary
This PR fixes TypeScript compilation failures introduced by the test consolidation in #202. It removes duplicate
importstatements (TS2300) in three CTO service test files and corrects the lazy variable type annotations inprRebase.test.tsfrom genericstringto the proper domain types (AiPermissionMode→AgentChatPermissionMode), matching the actual signatures ofmapPermissionModeandmapPermissionModeForModelFamilyinresolverUtils.ts.Confidence Score: 5/5
Safe to merge — changes are purely type/import cleanup with no runtime impact.
All four files contain only import deduplication or type annotation corrections in test files. The types used (AiPermissionMode, AgentChatPermissionMode) are verified to be correctly exported from shared/types, and the function signatures in resolverUtils.ts match exactly. No logic changes, no security implications.
No files require special attention.
Important Files Changed
import type { AgentIdentity }and three duplicate vitest/kvDb import lines; consolidated into single correct imports.import type { ... }block and two duplicate vitest import lines; addedLinearWorkflowConfigto the merged type import.import typelines for shared types into a single multi-symbol import; removed two duplicate vitest import lines.mapPermissionMode/mapPermissionModeForModelFamilyfromstringto `AiPermissionModeFlowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["prRebase.test.ts\n(resolverUtils tests)"] -->|"vi.importActual"| B["resolverUtils.ts"] B -->|"mapPermissionMode(AiPermissionMode)"| C["AgentChatPermissionMode"] B -->|"mapPermissionModeForModelFamily(AiPermissionMode, family)"| C D["shared/types (prs.ts)"] -->|"exports"| E["AiPermissionMode\n(read_only | guarded_edit | full_edit)"] F["shared/types (chat.ts)"] -->|"exports"| G["AgentChatPermissionMode\n(default | plan | edit | full-auto | config-toml)"] E --> B G --> BReviews (1): Last reviewed commit: "fix(tests): dedupe imports + correct per..." | Re-trigger Greptile