fix: doctor says when an org pool's watch list has gone stale - #52
Merged
Merged
Conversation
An org pool wakes by polling the repositories named in POOL_WATCH, because GitHub reports queued runs per repository rather than per organisation. So the list is the wake mechanism, and a repository missing from it queues work nothing wakes the pool for. That failure is silent in both directions: a queued job is not a failed job, so nothing alerts, and the pool reports healthy because it is. Doctor now lists the repositories at an org pool's scope that its watch list does not name. It reports rather than decides: a repository there may legitimately route every job to a managed runner, and the routing lives in a variable whose name is a convention of whoever set it up rather than of RunPool. Not polled at tick time on purpose. Waking on any queued run in the organisation would also wake for a public repository's, which the runner group refuses to serve, so the pool would come up for work it can never take. Avoiding that needs each repository's visibility, and re-deriving the public-repository answer is the one thing AGENTS.md says not to do.
Two defects found reviewing the previous commit. _rp_unwatched_repos was inserted between _rp_autoscale's section banner and _rp_autoscale itself, so the comment explaining why only stopped pools are polled read as documentation for the new function. Moved the function above the banner. tests/watch-list-staleness.sh exported RUNPOOL_BASE_DIR, which nothing reads. The variable is RUNPOOL_BASE, so the base fell through to the real installation while the test's own comment claimed every path pointed into a scratch directory. Harmless today because the test only calls a pure function, and precisely the claim someone extending it would rely on.
aicayzer
added a commit
that referenced
this pull request
Aug 31, 2026
The docs described only the empty watch list, which read as though a non-empty one were fine. #52 added a second failure mode and the docs were written against main before it merged. Says what doctor does and does not do: it makes a stale list audible, it does not maintain one. The list stays hand-maintained, so a repository added to the organisation is still a change somebody makes by hand.
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.
Closes #51.
doctoralready fails an org pool whose--watchlist is empty. It said nothing about one that is merely incomplete, which is the same defect short of its limit: a repository added to the organisation later queues work that nothing wakes the pool for, and the pool reports healthy because it is.What it does
Adds a
doctornote, not a failure, naming the repositories at an org pool's scope that its watch list does not cover. It reports rather than judges: a repository may legitimately route every job elsewhere, and nothing readable distinguishes that from one that meant to reach the pool._rp_unwatched_reposholds the rule and is pure, so it is tested without touching GitHub.tests/watch-list-staleness.shcovers six cases, including the one that matters most — a repository whose name occurs inside a watched one (acme/oneinsideacme/one-more) must still count as unwatched. Without comma fencing that fails in the silent direction, reporting a list as complete when it is not.Review fixes in the second commit
_rp_unwatched_reposwas inserted between_rp_autoscale's section banner and_rp_autoscaleitself, so the comment explaining why only stopped pools are polled read as documentation for the new function. Moved above the banner.RUNPOOL_BASE_DIR, which nothing reads. The variable isRUNPOOL_BASE, so the base fell through to the real installation while the test's own comment claimed otherwise. Harmless today, since the test only calls a pure function, but it is exactly the claim someone extending it would rely on.Verification
bash -nandshellcheck --severity=warningclean over the CI file set; all three test suites pass.