fix: make execGh's gh-failure backoff cap configurable per caller - #6349
Merged
Conversation
updateChecker's 30-min scheduler interval always exceeds the 15-min backoff cap #6345 hardcoded, so the cooldown from a failed release check expires before every subsequent tick and never actually suppresses a retry -- a silent no-op for its only production caller. execGh now takes an optional backoffMaxMs override; branch-reconcile and the other pollers keep the default (appropriate for their much faster tick rate), and updateChecker passes 3x its own interval so repeated failures actually widen the gap between real attempts.
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
backoffKeytoexecGh()so a caller polling the sameghread on every scheduler tick doesn't re-fire it after a failure with no cooldown — but hardcoded a 15-min cap.updateChecker's scheduler ticks every 30 minutes, which always exceeds that 15-min cap — the cooldown from a failed release check expires before the next tick every time, so the backoff there was a silent no-op for its only production caller.execGh()now takes an optionalbackoffMaxMsoverride.branchReconcile/prWatcher/issueReconcile/blockedIssueReconcilekeep the default (appropriate for their much faster tick rate);updateCheckerpasses 3x its own interval so repeated failures actually widen the gap between real attempts.Test plan
cd server && NODE_ENV=test npx vitest run services/github.test.js services/updateChecker.test.js services/branchReconcile.test.js routes/update.test.js services/prWatcher.test.js services/issueReconcile.test.js services/blockedIssueReconcile.test.js— 448 passed, including a new regression test pinning the exact cap-vs-interval defect.eidoverseWorld.runtime.test.js, passes in isolation).