feat: add retry logic, config migration, and unit tests#2
Open
cosmicallycooked wants to merge 1 commit intomainfrom
Open
feat: add retry logic, config migration, and unit tests#2cosmicallycooked wants to merge 1 commit intomainfrom
cosmicallycooked wants to merge 1 commit intomainfrom
Conversation
Add exponential backoff with jitter to the GraphQL client for transient errors (5xx, 429, network failures) while failing fast on deterministic errors (4xx, GraphQL). Add config migration path from single-account config.json to multi-account accounts.json format. Set up Vitest and add 27 unit tests covering retry behavior, backoff timing, transient vs deterministic error detection, and config migration edge cases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/lib/client.ts) for transient errors (5xx, 429, network failures) while failing fast on deterministic errors (4xx, GraphQL errors)config.jsonto multi-accountaccounts.jsonformat (src/lib/config.ts)pnpm testscriptTest plan
pnpm test— all 27 tests passpnpm typecheck— no type errors🤖 Generated with Claude Code