Repository navigation
fix(update): while CI is still running, auto-update checks again in about 30 minutes instead of waiting the full interval - #788
Merged
Conversation
…bout 30 minutes instead of waiting the full interval On a day of frequent merges every regular check landed mid-CI, so a box could go a whole day without updating. After a tick that skips because CI is still running, one retry is scheduled about 30 minutes later (plus a per-machine offset), repeated while CI keeps running and never past the next regular check. A red result, a commit without the required checks and an unreachable GitHub wait for the regular interval, so an outage still takes several regular checks to ring the paused bell. Claude-Session: https://claude.ai/code/session_015Vve3soBJ9qTcyeCCLyYyh
…ler never leaks a timer Review follow-ups: a retry and a regular tick never run a check together; startAutoUpdate stops any previous timers first; the retry tests wait for the event instead of a fixed sleep, and cover the interval-edge bound and the budget reset on a regular tick; the guide points the next-check rows at the retry paragraph. Claude-Session: https://claude.ai/code/session_015Vve3soBJ9qTcyeCCLyYyh
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.
Audit N4-3.
Auto-update checks every 6 hours by default, and the CI gate skips a check while CI on the newest commit of
mainis still running. On a day of frequent merges every regular check landed mid-CI, so a paired box went a whole day without updating.Change. After a scheduled check that skips with
ci-pending, one retry is scheduled about 30 minutes later, plus a small per-machine offset (CI_RETRY_DELAY_MS,instanceJitterMs).ceil(interval / 30 min) - 1times, so a retry never runs past the next regular check.stopAutoUpdateclears it.tickCheck, so the disabled and collection-install guards still apply, and it catches its own rejection.Only
ci-pendingretries. A red result, a commit without the required checks, and GitHub being unreachable (ci-unavailable) all wait for the regular interval. Each unreadable check counts toward the three-in-a-row "updates paused" bell, so retrying an outage every 30 minutes would ring that bell after about an hour instead of after several regular checks.The auto-update guide (en and es) describes the retry.
Tests (
tests/auto-update-ci-retry.test.js, through the real scheduler with the retry delay and check stubbed):ci-pending, stopping on success;ci-red,ci-unavailable,ci-gate-unavailable,no-ciornot-on-main;stopAutoUpdateclears it;Host: 690 pass, 0 fail across the auto-update, update, CI-gate, satellite, docs and public-hygiene files.
https://claude.ai/code/session_015Vve3soBJ9qTcyeCCLyYyh