Skip to content

[codex] Add Binance dispatch retry guard#50

Merged
Pigbibi merged 1 commit into
mainfrom
codex/binance-dispatch-retry
Jun 2, 2026
Merged

[codex] Add Binance dispatch retry guard#50
Pigbibi merged 1 commit into
mainfrom
codex/binance-dispatch-retry

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add bounded retry/backoff to the VPS Binance runtime dispatch guard
  • retry only transient curl failures and GitHub 000/500/502/503/504 dispatch responses
  • document the retry behavior and add a static workflow regression test

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 --check
  • python -m unittest tests.test_dispatch_guard_workflow -v
  • extracted generated dispatch-runtime.sh from the workflow and ran bash -n

@Pigbibi Pigbibi marked this pull request as ready for review June 2, 2026 17:26
@Pigbibi Pigbibi merged commit 868e697 into main Jun 2, 2026
2 checks passed
@Pigbibi Pigbibi deleted the codex/binance-dispatch-retry branch June 2, 2026 17:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant