Skip to content

feat: retry op read with exponential backoff for flaky wifi#52

Merged
smartwatermelon merged 2 commits into
mainfrom
claude/op-read-backoff
May 9, 2026
Merged

feat: retry op read with exponential backoff for flaky wifi#52
smartwatermelon merged 2 commits into
mainfrom
claude/op-read-backoff

Conversation

@smartwatermelon
Copy link
Copy Markdown
Owner

Summary

  • Replaces single-timeout op read with retry loop using 2s/4s/8s exponential backoff
  • Fast connections succeed on first attempt unchanged; flaky wifi gets 3 chances across ~14s
  • Fixes intermittent could not retrieve GH_TOKEN warnings on slow networks

Test plan

  • shellcheck passes
  • All 59 tests pass
  • Both code-reviewer and adversarial-reviewer PASS (2 commits)
  • Manual: verify with CLAUDE_DEBUG=true claude on slow wifi — debug log should show retry attempts
  • Manual: verify fast wifi still resolves on first attempt with no delay

🤖 Generated with Claude Code

Claude Code Bot and others added 2 commits May 9, 2026 14:53
Single timeout fails on slow connections; retrying with 2s/4s/8s
backoff gives 3 chances across ~14s without penalizing fast networks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Addresses review feedback: variable leaked into function scope,
and "retrying…" was misleading on the final attempt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented May 9, 2026

The change adds a retry loop with increasing timeouts (2s → 4s → 8s) for op read in _load_gh_token(). No BLOCK criteria met:

  • Logic is correct: if "${has_timeout}" is valid bash (evaluates true/false as commands).
  • No silent failure path: the existing post-loop token check still handles all retries exhausted.
  • No security regression: credentials handling is unchanged.

VERDICT: PASS

@smartwatermelon smartwatermelon merged commit 0226f7f into main May 9, 2026
4 checks passed
@smartwatermelon smartwatermelon deleted the claude/op-read-backoff branch May 9, 2026 22:19
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