fix(spawner): A13 exit=0 always completed, not agent_error
CI / lint (push) Failing after 8s
CI / test (push) Has been skipped
CI / lint (pull_request) Failing after 5s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (push) Successful in 0s
CI / notify-on-failure (pull_request) Successful in 4s

exit=0 means process exited normally. Trust the exit code regardless
of stdout/JSON output or task_status. Old logic misclassified inform
Mail completions as agent_error, causing infinite retry loops.

Includes test update: test_task_status_pending expects completed.
This commit is contained in:
cfdaily
2026-06-09 23:35:58 +08:00
parent 5f9bdad138
commit 4ad5ea419b
+1 -1
View File
@@ -123,7 +123,7 @@ class TestClassifyNoJsonExit0:
def test_task_status_pending(self):
result = Spawner._classify_outcome(0, {}, "", "pending", "")
assert result["outcome"] == "agent_error"
assert result["outcome"] == "completed"
assert result["should_retry"] is False