diff --git a/desloppify/app/commands/runner/codex_batch.py b/desloppify/app/commands/runner/codex_batch.py index 6fb754ab2..14c389ad3 100644 --- a/desloppify/app/commands/runner/codex_batch.py +++ b/desloppify/app/commands/runner/codex_batch.py @@ -16,7 +16,9 @@ resolve_retry_config, run_batch_attempt, ) -from desloppify.app.commands.review.runner_process_impl.io import extract_payload_from_log +from desloppify.app.commands.review.runner_process_impl.io import ( + extract_payload_from_log, +) from desloppify.app.commands.review.runner_process_impl.types import ( CodexBatchRunnerDeps, FollowupScanDeps, @@ -95,6 +97,8 @@ def codex_batch_command(*, prompt: str, repo_root: Path, output_file: Path) -> l *prefix, "exec", "--ephemeral", + # Scans also support source archives and directories without Git metadata. + "--skip-git-repo-check", "-C", str(repo_root), "-s", diff --git a/desloppify/tests/commands/test_runner_modules_direct.py b/desloppify/tests/commands/test_runner_modules_direct.py index 083885ca8..c6452d0cb 100644 --- a/desloppify/tests/commands/test_runner_modules_direct.py +++ b/desloppify/tests/commands/test_runner_modules_direct.py @@ -174,7 +174,8 @@ def test_codex_batch_command_uses_sanitized_reasoning_effort(monkeypatch, tmp_pa assert any(c.endswith("codex") or "codex" in c for c in command[:3]) assert "exec" in command assert "--ephemeral" in command - assert f'model_reasoning_effort="high"' in command + assert "--skip-git-repo-check" in command + assert 'model_reasoning_effort="high"' in command assert str(tmp_path) in command monkeypatch.setenv("DESLOPPIFY_CODEX_REASONING_EFFORT", "invalid") @@ -183,7 +184,7 @@ def test_codex_batch_command_uses_sanitized_reasoning_effort(monkeypatch, tmp_pa repo_root=tmp_path, output_file=tmp_path / "out.json", ) - assert f'model_reasoning_effort="low"' in command + assert 'model_reasoning_effort="low"' in command def test_codex_batch_command_uses_sandbox_env_override(monkeypatch, tmp_path: Path) -> None: