Repository navigation
Reduce duplicated CLI and sandbox source - #1850
Conversation
Share sandbox failures and review publication identity checks. Simplify check receipt and subprocess result construction without changing interfaces. Architecture-Review: unchanged; command output, receipt schema, subprocess setup, and sandbox boundaries stay the same. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on d511fe6c3050b158f37673d4d6ba50e686ee0af5, 42.0s: approve (0 critical, 0 important, 1 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| print(f"loopzero {args.command}: {exc}", file=sys.stderr) | ||
| return 4 | ||
| except HANDLED as exc: | ||
| if isinstance(exc, sandbox.SandboxUnavailable) and args.command in {"check", "review"}: |
There was a problem hiding this comment.
suggestion: The 'sandbox unavailable' exit-2 handling now depends on command-name strings in _run
Moving the SandboxUnavailable handling out of cmd_check/cmd_review into _run widens its scope. Before, only failures from sandbox.run_checks and _run_review exited with code 2. Now any SandboxUnavailable raised anywhere in the check or review commands does, including in the lock wrapper, _context, and the repost path. I traced the current raisers (runners.py:355/359/419, sandbox.py) and found none reachable outside those two calls, so behavior is unchanged today and tests/test_cli.py:810 and :2320 still hold through main. The cost is that the handling now lives on a hard-coded {"check", "review"} set far from the commands. A new command that runs the sandbox would silently get exit 1 with a different message, and renaming either command would break it without any error. Optional fix: add a short comment here pointing at cmd_check and cmd_review, or define the set as a named constant next to HANDLED.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Reduce duplicated CLI and sandbox source
Context and goal
Refs #575
Acceptance
Notes
Base
Base: 1ae8075
Validation
Recorded for
d511fe6c3050uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review