Repository navigation
fix(ci): the freshness cron is shed 3-in-4, so trigger on the deploy instead (#3) - #6
Merged
Merged
Conversation
…instead (#3) The schedule DOES fire -- an earlier report of "zero scheduled runs" was wrong, and is corrected on the issue. What is true is that it fires far below the requested cadence. Measured on this repository: requested */30, every 30 minutes observed 3 runs between 21:51:05 and 03:42:38 (5h51m), ~12 expected gaps 2h02m and 3h49m The drift window that motivated the issue was FORTY MINUTES. A check with 2-to-4 hour gaps would most likely have missed it, so the criterion was met literally while the guard stayed too sparse to catch the event it was built for. A cron cannot be made reliable by asking harder, so the fix is not a cron tweak: - workflow_run on "pages build and deployment" completing. Event-driven, firing at the moment drift either resolves or becomes permanent -- including on a CANCELLED deploy, which is the case that holds a divergence open indefinitely and the one the Pages API mislabels as "Page build failed." - cron moves from */30 to '7,37 * * * *'. Same cadence, off the :00 and :30 minutes where every scheduled job on the platform collides and is shed first. Backstop now, not the primary mechanism. Whether workflow_run matches the dynamic pages workflow is UNVERIFIED and said so in the file: it is generated rather than a file in .github/workflows. The next deploy is the test. If no workflow_run run appears, the trigger is inert and the cron is all there is. Also adds a settle-retry before declaring drift. This check now runs ON deploy completion, and a just-finished deploy can still be served from cache for a few seconds, so the first mismatch after a healthy deploy is expected. Three re-fetches at 20s. Crying drift there would make the check noisy enough to ignore, which is worse than not having it -- the same lesson as the preconnect false positive. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 10, 2026
Closed
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.
First, a correction
I previously reported "zero scheduled runs — the guard is not watching". That was false, and it is corrected on #3. The schedule fires:
I published a strong negative from a single query that under-reported, when a second instrument was one call away. "Nothing found" versus "did not look" is the distinction this repository exists to enforce, and I collapsed a third case into it: looked with one tool that lied.
The real defect, which survives the correction
The schedule fires far below the requested cadence:
*/30— every 30 minutesGitHub sheds roughly three in four. That matters concretely: the drift window that motivated #3 was 40 minutes. A check with 2-to-4-hour gaps would most likely have missed it. The criterion was met literally while the guard stayed too sparse to catch the event it was built for — a more interesting failure than "it does not run", and a real one.
The fix is not a cron tweak
A cron cannot be made reliable by asking harder.
1.
workflow_runon the Pages deploy completing. Event-driven, firing at exactly the moment drift either resolves or becomes permanent — including on a cancelled deploy, which is the case that holds a divergence open indefinitely and the one the Pages API mislabels as"Page build failed."2.
cron: '7,37 * * * *'replaces*/30. Same cadence, off the:00and:30minutes where every scheduled job on the platform collides and is shed first. It is now a backstop, not the primary mechanism.One thing is unverified, and the file says so
Whether
workflow_runmatches the dynamicpages build and deploymentworkflow is unknown. It is generated (dynamic/pages/pages-build-deployment), not a file in.github/workflows, and I do not know whether that affects name matching. The comment in the workflow states it outright:The next deploy is the test, and I will report the result rather than assume. If it turns out inert, the honest outcome is that #3 stays open with the cron as a known-insufficient mechanism, not a ticked criterion.
Settle-retry, so it does not cry wolf
The check now runs on deploy completion, and a just-finished deploy can still be served from cache for a few seconds — so the first mismatch after a healthy deploy is expected. Three re-fetches at 20s intervals before concluding, with the distinction printed:
vs
Without this, every successful deploy would likely produce a drift alert. A checker that cries wolf on every deploy is worse than no checker, which is the same lesson the
preconnectfalse positive taught in #4 — and the reason that one was fixed before merge rather than tolerated.Verification
check_freshness.pyrun locally →IN SYNC, exit 0schedule,workflow_run,workflow_dispatch; cron7,37 * * * *Refs #3 — deliberately not
Closes. The criterion this addresses cannot be verified by merging it; it needs an observedworkflow_run-triggered run.🤖 Generated with Claude Code