Resolve spawned proxy paths from the server root, not the calling module - #217
Conversation
The bundling fix in #198 traded one silent packaging failure for a subtler one. esbuild inlines drivers/claude.ts and drivers/acp/core.ts into index.js at the server root, so the `".."` each wrote to reach a sibling proxy started climbing from the bundle's directory instead of its own — one level too high, two for the ACP driver: PROXY_PATH <Resources>/computer-proxy.js missing PERM_PROXY_PATH <Resources>/permission-proxy.js missing DWEB_PROXY_PATH <Resources>/drivers/dweb-proxy.js missing COMPUTER_PROXY_PATH <Resources>/../computer-proxy.js missing The resolver only stats the .ts branch, so the missing .js was returned unchecked and nothing failed until a child was spawned. The server still booted and /api/health still answered — which is exactly why the new smoke test and the Windows gate both passed the broken build. Impact had it shipped: permission Allow/Deny cards never appear (the default permissionMode is acceptEdits, so every Claude turn takes that branch), cloud-box bots lose mcp__computer, dweb bots lose mcp__dweb, and every ACP engine — grok, gemini, kimi, droid, qwen, hermes — loses its computer proxy. Resolve all five through one anchor in server/proxy-paths.ts, which sits at the server root and is only ever inlined into root-level entries, so the anchor is right in the dev tree and in the bundle. The smoke test now asserts every path in SPAWNED_PROXIES exists inside the staged copy; mutation-checked by restoring the old "..", which fails it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 49 minutes Limit details: You’ve used all 3 included reviews currently available under your plan. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Comment |
Follow-up to #198. That fix traded one silent packaging failure for a subtler one, caught by an adversarial review of the release candidate before publishing.
The defect
esbuild inlines
drivers/claude.tsanddrivers/acp/core.tsintoindex.jsat the server root, so the".."each wrote to reach a sibling proxy started climbing from the bundle's directory rather than its own — one level too high, two for the ACP driver. Measured in a packaged layout:PROXY_PATH<Resources>/computer-proxy.jsPERM_PROXY_PATH<Resources>/permission-proxy.jsDWEB_PROXY_PATH<Resources>/drivers/dweb-proxy.jsCOMPUTER_PROXY_PATH<Resources>/../computer-proxy.jsThe resolver only stats the
.tsbranch (existsSync(ts) ? ts : ts.replace(...)), so the missing.jswas returned unchecked and nothing failed until a child was spawned.Why every gate missed it
The server still booted and
/api/healthstill answered. The smoke test added in #198 and the new Windows packaging step both passed this build. A green run proved nothing about the feature that was dead.Impact had it shipped
decodeConfigdefaultspermissionModetoacceptEdits, so every Claude turn takes the branch that spawns the permission proxymcp__computermcp__dwebThe fix
One anchor:
server/proxy-paths.tsexportsSERVER_ROOTandSPAWNED_PROXIES. It sits at the server root and is only ever inlined into root-level entries — the nesteddrivers/*entries import nothing local — so the anchor is correct in the dev tree and in the bundle alike. All five call sites now go through it, including the two that happened to survive bundling, so there is exactly one way a proxy is located.Verification
pnpm test— 721 passed / 8 skipped across 78 filespnpm typecheckcleanSPAWNED_PROXIESentry exists inside the staged copy, not merely that/api/healthanswers".."resolution fails the smoke test and names the missing proxies🤖 Generated with Claude Code