[codex] Add Binance dispatch retry guard#50
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d972dbc8e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| is_retryable_http_status() { | ||
| case "$1" in | ||
| 000|500|502|503|504) return 0 ;; |
There was a problem hiding this comment.
Avoid retrying ambiguous dispatch successes
When GitHub creates the workflow_dispatch run but the client receives a transient 500/502/503/504, retrying this POST sends another dispatch because the request has no idempotency key; I checked .github/workflows/main.yml and it does not define a concurrency guard, so this can start overlapping live Runtime jobs after a single ambiguous server-side success, contrary to the runbook's scheduler-overlap warning. Consider verifying whether a run was created before retrying, or adding workflow-level concurrency before treating these statuses as retryable.
Useful? React with 👍 / 👎.
Summary
Root Cause
The 2026-06-02 16:00 UTC alert happened before a Runtime Actions run was created: GitHub returned HTTP 500 from the workflow dispatch API. The existing guard treated every non-204 response as final, so one transient API error could skip that hour.
Validation
git diff --checkpython -m unittest tests.test_dispatch_guard_workflow -vdispatch-runtime.shfrom the workflow and ranbash -n