fix(mount): classify transport rejections from the launch and daemon-start execs - #46
Conversation
…start execs `startMount` wrapped its mkdir and status-probe execs so a rejected transport becomes a classified error, but left the initial-sync launch and the daemon start unwrapped. Every throw in this function that embeds sandbox output is one callers recognise by message prefix, so those two were the only paths that could produce an error matching no prefix at all — and callers bucket that as "invocation unknown" and discard the cause. That is not hypothetical. Cloud is currently failing 100% of JIT provisions with `relayfile_mount_invocation_unknown` after ~122s, which matches Daytona's ~120s proxy read timeout, and the underlying error was unrecoverable from either the logs or the HTTP body. See #45. Wrap both in the same shape the two already-wrapped execs use, preserving the original error as `cause`. A rejection now lands on `Failed to launch relayfile initial sync:` or `Failed to start relayfile mount:` respectively, which callers already map to named phases. This makes the failure legible; it does not by itself stop the exec from hanging. #45 stays open for the hang. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AGB949mfHcP68whBJebzEM Session-Id: 1fa09ce6-c8d4-4c4a-ad2b-0f1999cb237d
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesstartMount error handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change adds operation-specific context to existing mount execution failures without altering mount behavior or system boundaries. It is merge-ready after normal checks and review, with no actionable merge-blocking risk remaining. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ 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 |
Ships #46 — startMount now classifies transport rejections from the initial-sync launch and daemon-start execs instead of letting them fall through to the caller's unknown bucket. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AGB949mfHcP68whBJebzEM Session-Id: 1fa09ce6-c8d4-4c4a-ad2b-0f1999cb237d
Refs #45.
The gap
startMountwraps its mkdir and status-probe execs so a rejected transport becomes a classified error, but leaves two unwrapped:mkdirmount pathEvery
throwin this function that embeds sandbox command output is one callers recognise by message prefix. So those two were the only paths that could produce an error matching no prefix at all — and callers bucket that as "invocation unknown" and drop the cause.Why it matters right now
Cloud is failing 100% of JIT sandbox provisions on exactly that bucket. Measured 5/5 against production:
~122s matches the ~120s Daytona proxy read timeout this file's own comment cites. The underlying error was unrecoverable from either the logs or the HTTP body, which is how this got chased as a Daytona provisioning-timeout problem for a day while Daytona was in fact creating the sandbox in 1.3 seconds.
Change
Wrap both in the same shape the two already-wrapped execs use, preserving the original as
cause. A rejection now lands onFailed to launch relayfile initial sync:orFailed to start relayfile mount:, which callers already map to named phases (relayfile_mount_daemon_invoked_initial_sync_not_invokedandrelayfile_mount_invoked_exited).This makes the failure legible; it does not stop the exec from hanging. #45 stays open for the hang itself. Paired with AgentWorkforce/cloud#3244 (merged), the next occurrence will name which of the two died instead of returning an opaque phase — which is what the hang investigation needs to start from evidence rather than inference.
Tests
npm test— 819 pass, 0 fail.npm run typecheckclean.Two new tests in
orchestrator.start-mount.test.ts, mirroring the existing mkdir/status rejection tests: each asserts the classified message and thaterror.causeis the original transport error. The daemon-start one drives the full happy path first, since that exec is only reached after the initial sync reports a clean exit.Red-check — reverting both wraps fails exactly the two new tests (
# pass 817 # fail 2); restored, 819/0.🤖 Generated with Claude Code
https://claude.ai/code/session_01AGB949mfHcP68whBJebzEM
Summary by cubic
Fixes
startMountso transport rejections from the initial-sync launch and daemon-start execs are no longer unclassifiable. Previously only the mkdir and status-probe execs were wrapped, so failures in these two paths matched no caller-recognized message prefix, landed in the "invocation unknown" bucket, and lost the original cause.Related to #45. Cloud is failing all JIT sandbox provisions on that unknown bucket after ~122s, which matches the ~120s Daytona proxy read timeout, and the underlying error was unrecoverable from logs or the HTTP body.
cause.Failed to launch relayfile initial sync:orFailed to start relayfile mount:, which callers already map to named phases.Written for commit 7765f12. Summary will update on new commits.