Resolve Runner issue, runner refused to launch
All checks were successful
ci / test (pull_request) Successful in 35s
ci / publish (pull_request) Has been skipped

This commit is contained in:
Space-Banane
2026-05-23 13:53:26 +02:00
parent d6a9397914
commit c3925f37e1
9 changed files with 17 additions and 112 deletions

View File

@@ -91,15 +91,18 @@ def test_build_install_command_chatgpt_mode_sets_git_checkout_and_review(monkeyp
assert f"codex exec review --base {pr.base_sha}" in command
assert "--output-schema /tmp/codex-review-schema.json" in command
assert "-o /tmp/codex-review-result.json" in command
assert "npm install -g @openai/codex@latest" in command
assert "codex --version >/tmp/codex-version.log" in command
assert " - " not in command
assert f'echo "{RESULT_START_MARKER}"' in command
assert f'echo "{RESULT_END_MARKER}"' in command
def test_build_install_command_can_disable_reasoning_effort_flag() -> None:
def test_build_install_command_does_not_include_reasoning_effort_flag() -> None:
settings = get_settings()
pr = _sample_pr()
command = _build_install_and_run_command(settings, pr=pr, include_reasoning_effort=False)
command = _build_install_and_run_command(settings, pr=pr)
assert "--reasoning-effort" not in command
@@ -220,7 +223,7 @@ def test_run_review_ephemeral_api_key_mode_does_not_fallback_to_host(monkeypatch
assert "API-key auth runner failed" in result["summary"]
def test_run_review_ephemeral_retries_without_reasoning_effort_when_unsupported(monkeypatch: pytest.MonkeyPatch) -> None:
def test_run_review_ephemeral_single_attempt_success(monkeypatch: pytest.MonkeyPatch) -> None:
get_settings.cache_clear()
settings = get_settings()
@@ -239,16 +242,6 @@ def test_run_review_ephemeral_retries_without_reasoning_effort_when_unsupported(
def _fake_run(cmd, *args, **kwargs):
calls.append(cmd)
if len(calls) == 1:
return type(
"Completed",
(),
{
"returncode": 2,
"stdout": "",
"stderr": "error: unexpected argument '--reasoning-effort' found",
},
)()
return type(
"Completed",
(),
@@ -274,11 +267,9 @@ def test_run_review_ephemeral_retries_without_reasoning_effort_when_unsupported(
)
assert result["verdict"] == "correct"
assert len(calls) == 2
assert len(calls) == 1
first_shell = calls[0][-1]
second_shell = calls[1][-1]
assert "--reasoning-effort" in first_shell
assert "--reasoning-effort" not in second_shell
assert "--reasoning-effort" not in first_shell
def test_parse_review_result_from_stdout_artifact() -> None:

View File

@@ -68,7 +68,7 @@ def test_format_result_comment_appends_missing_config_note_for_system_layout() -
},
repo_configured=False,
)
assert body.endswith(".codex-review.yml is not configured")
assert body.endswith("> .codex-review.yml is not configured")
def test_format_result_comment_does_not_append_missing_config_note_to_agent_markdown() -> None:
@@ -79,4 +79,4 @@ def test_format_result_comment_does_not_append_missing_config_note_to_agent_mark
},
repo_configured=False,
)
assert ".codex-review.yml is not configured" not in body
assert "> .codex-review.yml is not configured" not in body

View File

@@ -36,7 +36,6 @@ def test_run_review_for_pr_uses_openai_http_error_in_fallback(monkeypatch) -> No
assert result["summary"].startswith("OpenAI review failed. Error: OpenAI API HTTP 429:")
assert result["findings"][0]["title"] == "OpenAI review request failed"
assert "rate_limited" in result["findings"][0]["body"]
assert any(finding["title"] == "TODO marker in diff" for finding in result["findings"])
def test_build_prompt_includes_trigger_message() -> None: