fix: feed Codex prompts through stdin

This commit is contained in:
2026-05-06 15:47:15 +08:00
parent 631dc2ce3d
commit 9cc8055020
6 changed files with 14 additions and 17 deletions

View File

@@ -15,8 +15,8 @@ def make_config(tmp_path: Path, **overrides: object) -> AppConfig:
"scheduler": {"interval_seconds": 1, "concurrency": 1, "lease_seconds": 60},
"workspace": {"root": tmp_path / "workspaces", "cleanup_on_success": False},
"agents": {
"implementer": {"command": ["implementer", "{prompt_path}"]},
"reviewer": {"command": ["reviewer", "{prompt_path}"]},
"implementer": {"command": ["implementer", "-"]},
"reviewer": {"command": ["reviewer", "-"]},
},
}
data.update(overrides)

View File

@@ -18,8 +18,8 @@ def make_config(tmp_path: Path, **overrides: object) -> AppConfig:
"scheduler": {"interval_seconds": 1, "concurrency": 1, "lease_seconds": 60},
"workspace": {"root": tmp_path / "workspaces", "cleanup_on_success": False},
"agents": {
"implementer": {"command": ["implementer", "{prompt_path}"]},
"reviewer": {"command": ["reviewer", "{prompt_path}"]},
"implementer": {"command": ["implementer", "-"]},
"reviewer": {"command": ["reviewer", "-"]},
},
}
data.update(overrides)
@@ -144,8 +144,9 @@ class FakeRunner:
def __init__(self, *, fail_role: str | None = None):
self.fail_role = fail_role
def run(self, command, cwd):
def run(self, command, cwd, *, stdin=None):
role = command[0]
assert stdin
if role == self.fail_role:
return AgentResult(exit_code=1, stdout="", stderr="failed")
if role == "implementer":