fix: route canonical path failures through blocked classification#1211
fix: route canonical path failures through blocked classification#1211
Conversation
Follow-up to #1206 review: the early getCanonicalRepoPath() wrap in resolve() threw directly, escaping the classification flow that createNewEnvironment uses. Permission errors, malformed worktree pointers, ENOENT, etc. surfaced as unclassified crashes instead of becoming an actionable `blocked` result. Mirror createNewEnvironment's contract: - isKnownIsolationError → return { status: 'blocked', reason: 'creation_failed', userMessage: classifyIsolationError(err) + suffix } - unknown errors → throw (programming bugs stay visible as crashes, not silent isolation failures) Adds two tests in resolver.test.ts: - EACCES classifies to "Permission denied" blocked message - Unknown error propagates as throw Addresses CodeRabbit review comment on #1206.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe resolver's canonical path computation is updated to convert known infrastructure-related failures into a blocked status with a user message, while unknown failures are rethrown. Tests validate both error handling paths. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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 |
…leam00#1211) Follow-up to coleam00#1206 review: the early getCanonicalRepoPath() wrap in resolve() threw directly, escaping the classification flow that createNewEnvironment uses. Permission errors, malformed worktree pointers, ENOENT, etc. surfaced as unclassified crashes instead of becoming an actionable `blocked` result. Mirror createNewEnvironment's contract: - isKnownIsolationError → return { status: 'blocked', reason: 'creation_failed', userMessage: classifyIsolationError(err) + suffix } - unknown errors → throw (programming bugs stay visible as crashes, not silent isolation failures) Adds two tests in resolver.test.ts: - EACCES classifies to "Permission denied" blocked message - Unknown error propagates as throw Addresses CodeRabbit review comment on coleam00#1206.
Summary
Follow-up to the CodeRabbit review on #1206. The early `getCanonicalRepoPath()` wrap in `IsolationResolver.resolve()` threw directly, bypassing the classification flow that `createNewEnvironment` uses. Permission errors, ENOENT, malformed worktree pointers, etc. would surface as unclassified crashes instead of becoming an actionable `blocked` result.
Change
Mirror `createNewEnvironment`'s contract:
Single file behavior change in `packages/isolation/src/resolver.ts:114`. Two tests added in `resolver.test.ts`:
Testing
Review reference
CodeRabbit comment on #1206 — "Canonical-path failures still escape resolve() as thrown exceptions."
Summary by CodeRabbit
Bug Fixes
Tests