fix(issue-34): merge review - the remote runner's deadline wording counts as an unconfirmed close

remote.py closes a job whose end it could not see with
`error --detail "deadline_timeout (remote runner)"`; the sub-job table
matched the reason exactly and filed it as a plain failure, losing the
unconfirmed count and the late-write warning (merge review, codex R2).
The kind is the first word of the reason now. Test T14 replays the
remote runner's close through the real registry and producer; it fails
without the fix.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
This commit is contained in:
GodopuandClaude Fable 5.1 committed 2026-09-25 16:23:06 +09:00
1 parent 8a9101ed30
commit e80186f560
2 files changed
+24 -1

No files matched your search

+4 -1
View File
@@ -691,7 +691,10 @@ class LoopRunner:
events=("completed", "error", "cancelled")) or ""
if status == "completed":
return "completed", reason or "-"
if reason in ORCHESTRATOR_CLOSED or (status == "error" and not reason):
# merge review R2 (codex): the remote runner phrases its deadline as
# "deadline_timeout (remote runner)", so the kind is the first word
closed_kind = reason.split(" ", 1)[0] if reason else ""
if closed_kind in ORCHESTRATOR_CLOSED or (status == "error" and not reason):
# no recorded reason is not the agent's own report either
return "CLOSED-UNCONFIRMED", reason or "-"
if status == "cancelled" and (reason in ("session_busy", "target_not_found") or reason.startswith("rolled back")):