Repository navigation
fix: codex review に sandbox_mode=read-only を渡す (v0.37.3) - #70
Merged
Merged
Conversation
レビュー実行ヘルパーが sandbox を一切指定していなかったため、レビューは ~/.codex/config.toml の sandbox_mode をそのまま継承していた。設定が workspace-write の環境では、読むだけのレビューが書き込み可能な サンドボックスで実行されてしまう。 codex review には -s/--sandbox フラグが無い(v0.149.1 で確認)ため、 -c sandbox_mode= 経由で渡す。第3引数で上書き可能(既定 read-only)で、 model 指定失敗時の retry でも sandbox 指定は維持する。 テスト3件を追加(既定値、明示指定、retry 時の維持)。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DwBmtdWzndokvhDqmqHtcE
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.
背景
レビュー実行ヘルパーが sandbox を一切指定していなかったため、
codex review --uncommittedは~/.codex/config.tomlのsandbox_modeをそのまま継承していた。設定がworkspace-writeの環境では、読むだけのレビューが書き込み可能なサンドボックスで実行されてしまう。変更
codex reviewには-s/--sandboxフラグが無い(codex-cli v0.149.1 で確認)ため、-c sandbox_mode=経由で渡すread-only)base_argsに切り出し)テスト
scripts/test-helpers.shに3件追加し、全 102 件パス。test-claude-helpers.shもパス。sandbox_mode="read-only"が渡るsandbox_modeが維持される(model のみ外れる)動作確認
修正後のヘルパーで実際にこの差分をレビューし、Codex のヘッダーに
sandbox: read-onlyが出ることを確認。レビュー結果は指摘なし(exit 0、[P1]-[P4] マーカーなし)。🤖 Generated with Claude Code
https://claude.ai/code/session_01DwBmtdWzndokvhDqmqHtcE