fix(athena): add termination guards to non-interactive retry loop

This commit is contained in:
ismeth
2026-03-04 01:36:43 +01:00
committed by YeonGyu-Kim
parent 9d284accce
commit 11f6712dde
+4 -3
View File
@@ -67,9 +67,9 @@ Track every task_id from the response for use in Step 5.
- Parse returned metadata JSON for member states.
- If a member's elapsed runtime exceeds {MEMBER_MAX_RUNNING_SECONDS}, mark as failed (timeout).
- If a member is idle and last_activity_s > {STUCK_THRESHOLD_SECONDS}, mark as failed (stuck).
- If retry_failed_if_others_finished is false AND any members are failed while at least one other member is still non-terminal, jump to Step 9 immediately for opportunistic retries, then return to Step 5.
- If retry_failed_if_others_finished is true, continue until ALL members reach terminal state before Step 6.
- If retry_failed_if_others_finished is false and no retry candidates exist yet, continue tracking until more status updates arrive.
- If ALL members are now terminal (completed/error/cancelled/marked failed), proceed to Step 6 immediately.
- If retry_failed_if_others_finished is false AND retry_on_fail > 0 AND any members are failed while at least one other member is still non-terminal, jump to Step 9 immediately for opportunistic retries, then return to Step 5.
- Otherwise, continue tracking until one of the above conditions is met.
### Step 6: Collect results with council_finalize.
- Call: council_finalize(task_ids=[...], name="{topic-slug}", intent="{intent}", question="{original question}", prompt_file="{path from Step 4.1}", mode="non-interactive")
@@ -100,6 +100,7 @@ If retry_on_fail > 0 and failed members exist:
- If retry_failed_if_others_finished is false, retry opportunistically as soon as failures are detected while others are still running.
- If retry_failed_if_others_finished is true, only retry after all non-failed members have completed.
- If cancel_retrying_on_quorum is true, stop retrying once quorum (2+ successful) is met.
- If retry_on_fail is 0, no failed members remain, or retry budget is exhausted, do NOT re-launch members; proceed to Step 10.
### Step 10: Synthesize using council_finalize runtime guidance.
- Read every member's archive_file with Read tool.