test(cli): replace slow subprocess matrices with unit coverage#4911
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRefactors sandbox inference-route repair/reset and legacy host-alias probing to use dependency injection with new exported types and DI wrappers. Adds comprehensive unit tests for repair/reset and host-alias logic, shared CLI test fixtures, expanded CLI adapter tests (logs/hosts), and condensed/refactored CLI mutation tests. ChangesSandbox dependency-injection refactoring and testing
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Review AdvisorFindings: 1 needs attention, 4 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Consider writing more tests for
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: Dispatch required scenario E2E:
Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
| it("requires a channel before dispatch", async () => { | ||
| await expect(ChannelsAddCommand.run(["alpha"], rootDir)).rejects.toThrow(/channel/i); | ||
| it("requires a channel before dispatch for every mutation command", async () => { | ||
| for (const command of [ |
There was a problem hiding this comment.
use it.each table tests instead of an internal for loop here
There was a problem hiding this comment.
Done in 67a8381: converted the internal loop to it.each table tests.
Selective E2E Results — ✅ All requested jobs passedRun: 27095299976
|
|
Addressed the review/advisor feedback in commit 67a8381. What changed:
Verification:
|
Selective E2E Results — ✅ All requested jobs passedRun: 27095641603
|
Selective E2E Results — ✅ All requested jobs passedRun: 27095907538
|
Summary
Replaces three subprocess-heavy CLI test matrices with focused unit coverage plus smaller smoke tests. This keeps the route-repair, host-alias probe, and sandbox mutation/help behaviors covered while reducing hook and CI runtime for the affected files.
Related Issue
Related to #4892
Changes
src/lib/actions/sandbox/connect.tswith fast unit coverage.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Tests
Refactor