Skip to content

Refresh live GitHub quota before honoring paused daemon state#275

Merged
nicobistolfi merged 1 commit intomainfrom
fix-rate-limit-stale-pause
Mar 21, 2026
Merged

Refresh live GitHub quota before honoring paused daemon state#275
nicobistolfi merged 1 commit intomainfrom
fix-rate-limit-stale-pause

Conversation

@nicobistolfi
Copy link
Copy Markdown
Collaborator

Summary

  • refresh the GitHub rate-limit snapshot on each scan instead of letting cached daemon pause state short-circuit the scan loop
  • keep using the cached pause snapshot only as a fallback when the live rate-limit query fails
  • add a regression test for the stale cached core_remaining=0 case where the live GitHub quota has already recovered

Root cause

The daemon cached an in-memory GitHub low-quota pause and treated it as authoritative on later scans. If that cached state drifted from the live GitHub quota, the daemon could keep pausing scans even though vigilante status showed healthy quota from a fresh rate-limit call.

Validation

  • go test ./internal/app ./internal/github

@nicobistolfi nicobistolfi merged commit aa61fda into main Mar 21, 2026
1 check passed
@nicobistolfi nicobistolfi deleted the fix-rate-limit-stale-pause branch March 21, 2026 22:00
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