ci: stop maintenance watch from counting stale registry runs - #172
Merged
Merged
Conversation
Issue #171 reported "2 of the last 7 scheduled runs failed" while the actual last 7 scheduled registry-update runs (Sep 22-28) all succeeded. The `runs?event=schedule&per_page=7` query intermittently serves a stale result: one sampled response had total_count=78 (vs 209), newest run 2026-09-08, and included the 2026-08-03 and 2026-07-31 failures - exactly the "2 failed, latest success" the watch reported. The page was descending, so re-sorting alone would not fix it; the server-side event filter is the unreliable part. Fetch 100 unfiltered runs, select event=="schedule" client-side, sort by created_at, and take the 7 newest; derive `latest` from the same list. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UX3uvgjRrv9uYuZxKjNF4o
|
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.
Before: the maintenance watch sometimes reported "2 of the last 7 scheduled runs failed" for the nightly registry update when all 7 had passed. It opened #171 on 2026-09-28 this way, and the same false alarm appeared around 2026-09-25.
After: the watch counts the 7 most recent scheduled runs and reports 0 failures today, matching the Actions history.
The
runs?event=schedule&per_page=7query intermittently returns a stale result. One of several identical requests came back with total_count 78 instead of 209, newest run 2026-09-08, and it included the 2026-07-31 and 2026-08-03 failures. That is exactly the "2 of 7, latest success" in #171, and its log line reads "2 of the last 7 scheduled registry runs failed (latest: success)". Unfiltered queries returned current data every time.How: fetch
runs?per_page=100without the event filter, keepevent == "schedule"in jq, sort bycreated_at, take the newest 7, and derivelatestfrom that same list. No other section depends on run order. YAML parses, actionlint passes, and the new pipeline returnsfailed=0 latest=successagainst the live API.🤖 Generated with Claude Code
https://claude.ai/code/session_01UX3uvgjRrv9uYuZxKjNF4o
Generated by Claude Code