Repository navigation
Fail closed when the Devin sandbox is unavailable - #12
Merged
TheOnlyFusionCube merged 1 commit intoOct 23, 2026
Merged
Conversation
runDevinJob retried a failed sandboxed review without --sandbox in normal mode, triggered by a broad regex over stderr and stdout. That silently downgraded the isolation the caller asked for. Remove the retry. A failed sandboxed run now stays failed, the companion exits non-zero, and sandbox-looking stderr gets an actionable, platform-aware hint (WSL2 on Windows, bubblewrap and socat on Linux, Seatbelt on macOS) with a link to the Devin sandbox docs. The stop review gate still fails open with a warning and does not rerun unsandboxed. README and AGENTS.md now describe the fail closed behavior. Tests cover bwrap and Seatbelt failures (single sandboxed run, failed job, hint), per-platform hints, non-sandbox failures, and the gate. Proposal 3 in TheOnlyFusionCube#4.
TheOnlyFusionCube
approved these changes
Oct 23, 2026
TheOnlyFusionCube
left a comment
Owner
There was a problem hiding this comment.
Verified fail-closed sandbox behavior (39 passed). Clean implementation of Proposal 3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal 3 in #4.
What was wrong:
runDevinJobretried a failed sandboxed review without--sandbox, innormalmode, whenever a broad regex matched the error output. That silently downgraded the isolation the caller asked for. Devin's docs say an unavailable sandbox fails closed.What changed
devin -pinvocation.sandboxFailureHint({ platform, stderr })inlib/devin.mjs. When a failed sandboxed run's stderr looks sandbox-related, the output gets a platform-aware message with a link to https://docs.devin.ai/cli/sandbox. Devin's own stderr lines are kept.bwrap) and socat.--jsonthe hint goes to stderr too. Ordinary failures keep their current exit behavior; changing that would be a separate PR.Not included:
How tested
node --test: 39 pass, 0 fail.tests/sandbox.test.mjs, using the fake devin fixture with sandbox-style stderr (bwrap missing, a Seatbelt error, seccomp):-prun, with--sandbox, and a failed job with the hint.--sandboxwasn't requested.