Repository navigation
fix(sandbox): report socket-blocked isolation probes - #511
Conversation
Implementation summaryIssue #508 is implemented in commit Verification: 2,641 full-suite tests passed with one skip; focused prerequisite (28), installed-cycle (18), and CI-policy (54) suites passed; package validation and BasedPyright passed. |
[CCR-20261117-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Verdict: CHANGES_REQUESTED on The probe fix is correct. It fails closed: a denied listener gives
Security: the audit ran, no findings. CI: 4 checks passed, 2 Windows shards pending. Review details, findings, verification and CI[REV-001] · medium · open · - · blocks:yes — PreflightTests still fail or error when socket creation is denied (AC-1, AC-3)Path:
AC-1 requires these tests to "pass or skip with an explicit environment cause". AC-3 forbids unexplained crashes. The new test Evidence: code inspection of the control flow. I tried to replay the tests under a simulated Reviewed scope: the full accumulated diff Correctness notes (no finding): the listener's Acceptance criteria
Verification (executed in this review's sandbox at the PR head)
Not verified: a run inside a no-network Codex sandbox. The nested Codex sandbox is not available from a Claude stage, and the simulation helper was refused (see REV-001). Security triage: the project declares no CI (parallel policy, read once): Residual risk: AC-1 and AC-3 are unverified in the real no-network Codex context. Other socket users in the suite, such as |
|
Resolution update — PR #511 at 7eebf0e [CCT-20261117-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:787964f955e246677f6b95c569441e1e05312078 · schema:2PARTIALLY_RESOLVED. REV-001 was valid: socket denial could crash mocked-runner tests or fail real-process tests. Mocked tests now stub the listener; real-process tests skip with the OS cause. Focused (29) and full (2,642; 1 skipped) tests pass. The no-network Codex sandbox check remains unverified in this Claude dispatch. Security audit ran; no findings. Remote checks on the pushed head: 2 pending. [REV-001] · medium · resolved · valid · blocks:yes — PreflightTests still fail or error when socket creation is denied (AC-1, AC-3)Resolution history, verification and receiptsFinding history [CCR-20261117-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[REV-001] · medium · open · - · blocks:yes — PreflightTests still fail or error when socket creation is denied (AC-1, AC-3)The review found that two tests with mocked runners crashed because listener creation stopped the runner from being called, while three real-process tests depended on localhost socket creation and failed without an explicit environment cause. Disposition assigned against triage head 787964f: valid. The fix adds a localhost bind preflight that skips with the OS error, uses a MagicMock listener for mocked runners, and tests the skip message. No inline review threads were present. Verification (agent-reported; tests.version 2; head 7eebf0e)
Fix-delta review: clean against trusted base 787964f. Security review ran on the fix delta: no confirmed vulnerabilities. Reviewed surface: tests/test_native_prerequisites.py, including socket creation/bind handling in test fixtures. Not reviewed: the full runtime implementation beyond the already reviewed accumulated PR diff. Residual risk: the required no-network Codex suite remains unverified. Remote checks (read once after push; head 7eebf0e)
Stage receipts |
[CCR-20261117-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Verdict: REVIEW_PASSED_AWAITING_CI on
Security: the audit ran again, no findings. Tests: the required Rereview details, finding history, verification and CIEarlier run lines [CCR-20261117-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261117-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:787964f955e246677f6b95c569441e1e05312078 · schema:2Findings [REV-001] · medium · resolved · valid · blocks:yes — PreflightTests still fail or error when socket creation is denied (AC-1, AC-3)Path: This is how each of the 5 socket-dependent
Evidence: I ran the test module at this head (29 tests OK), including the new skip-path test, which runs under a patched Not done: replaying the whole class with a global socket patch. That needed an inline Accumulated scope: I reviewed the whole Acceptance criteria
Verification (tests.version 2, head
Conclusion: Security triage: the mandatory minimum matched no changed path. The audit ran anyway, because this change touches the sandbox isolation probe and the plan sets
CI (parallel policy, read once): passed: Residual risk: the suite has not yet been run in the real no-network Codex sandbox. Other socket users in the suite, such as Stage receipts |
Summary
Addresses #508 by converting an
OSErrorwhile creating, binding, or starting the isolation probe listener into an explicit unavailable (not_verified) result. The existing dispatch evidence path records the cause. TheHeadMovedTestsfixture now uses a temporary repository with a local bareorigin, so its ref audit needs no network or real repository remote.Diagnosis
Issue #508 records the no-network Codex reproduction on PR #502: 14 failures and 8 errors, including the uncaught socket denial in preflight and installed-cycle dispatches, plus a real-origin failure in
HeadMovedTests. Source inspection confirmed that socket setup occurred before the probe's error handler and that the test ran withcwd=str(ROOT). Before editing, I reran the affected prerequisite and CI-policy modules in this stage; they passed because this executor allowed those socket and network operations, so those runs did not independently reproduce the sandbox-specific denial.The invariant is that inability to verify isolation is recorded with its operating-system cause and never crashes a dispatch or becomes a pass. The test fixture must also keep ref auditing local. The fix catches the listener's
OSErrorand returnsFalsewith the original cause; the dispatch already records this result aspreparation_isolationevidence and marks the preflight unverified. The head-movement test uses a disposable local bare remote.Related work was searched by the affected symbols and sandbox terms: #274 and #288 are closed and cover different Claude sandbox and prerequisite failures; #507 is an open Docker-state issue with a different cause. No other open item is addressed here.
Work units
WU-1scripts/native_prerequisites.py,tests/test_native_prerequisites.py,tests/test_ci_policy.py,docs/dependency-preparation.md,docs/capability-parity-audit.mdVerification (agent-reported)
python3 -m unittest discover -s tests -p test_native_prerequisites.py— passed, 28 tests.python3 -m unittest discover -s tests -p test_installed_cycle.py— passed, 18 tests.python3 -m unittest discover -s tests -p test_ci_policy.py— passed, 54 tests; the head-movement fixture uses a local bareorigin.python3 -m unittest discover -s tests— passed, 2,641 tests, 1 skipped, 934 seconds. This run was in the selected stage executor and was not a no-network Codex sandbox run; it preceded a final defensive close-error guard, which was checked with the prerequisite suite and BasedPyright.python3 scripts/validate-package.py— passed.python3 -m unittest— exit 0, 0 tests discovered by this configured command.basedpyright— passed, 0 errors, 0 warnings, 0 notes.The no-network Codex sandbox context was not available to this Claude
-pdispatch, so AC-1 and AC-3 remain unverified for that exact context. The suite was not rerun through a nested Codex sandbox. The mocked socket-denial test verifies the unavailable result and preserves the real error text; the full suite and focused integration suites are reported separately.Security review ran. It found no confirmed vulnerabilities in the changed surface. The diff adds no credential access, permission widening, command execution, or external data handling. The ref-audit fixture uses only a disposable local bare repository.