You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hardcoded 300-second (5-minute) refresh threshold was causing the
github-token-refresh test to fail. With a 2-second token lifetime, fresh
tokens were immediately considered "expiring" (2s < 300s threshold),
triggering unnecessary refreshes on every getClient() call.
Changes:
- Add githubTokenRefreshThresholdSeconds to Settings (default: 300)
- Read TASKRUNNER_GITHUB_TOKEN_REFRESH_THRESHOLD_SECONDS env var
- Use configurable threshold in getClient and loadOrRefreshClient
- Set threshold to 1 second in github-token-refresh test
This allows the test to verify proper token refresh behavior:
- Fresh tokens (2s remaining >= 1s threshold) are reused
- Expired tokens trigger refresh
- Test now passes with 2 token requests instead of 4
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments