Skip to content

feat: add retry logic, config migration, and unit tests#2

Open
cosmicallycooked wants to merge 1 commit intomainfrom
feat/retry-and-migration-tests
Open

feat: add retry logic, config migration, and unit tests#2
cosmicallycooked wants to merge 1 commit intomainfrom
feat/retry-and-migration-tests

Conversation

@cosmicallycooked
Copy link
Copy Markdown
Owner

Summary

  • Add exponential backoff with jitter to the GraphQL client (src/lib/client.ts) for transient errors (5xx, 429, network failures) while failing fast on deterministic errors (4xx, GraphQL errors)
  • Add config migration path from single-account config.json to multi-account accounts.json format (src/lib/config.ts)
  • Set up Vitest test framework with pnpm test script
  • Add 27 unit tests covering retry behavior, backoff timing, transient vs deterministic error detection, and config migration edge cases

Test plan

  • pnpm test — all 27 tests pass
  • pnpm typecheck — no type errors
  • Verify tests pass in CI

🤖 Generated with Claude Code

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