Repository navigation
audit: the idle line names waiters by role and PR, for open PRs only, with no state file names (#108) - #154
Merged
Merged
Conversation
…eaks at run time; no state file names (#108)
deanbot
marked this pull request as ready for review
November 2, 2026 02:03
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.
What changed and why
The auditor's "Measured, no finding" section listed every waiter state file in the state folder on the machine it ran on, by file name, ending in
-wait.json. That had three problems:scripts/audit.mjsnow reads each state file only to learn its waiter's kind and PR, and names no file:<slug>-pr-poll-<n>-wait.json: the executor's waiter on PR #n, counted only while that PR is open. The open PRs come from onegh pr list --state openread, inside the same gather step as every other read, so a failure exits 2 like they do.<slug>-pr-state[-<clone>]-wait.json: the reviewer's waiter. The clone name, a local name, is dropped.<slug>-pr-qa-state-wait.json: QA's waiter.The markdown line now reads, for example:
Wake-ups that found nothing: 4 waiters on this machine, for open PRs and the roles, with their idle streaks at the time of the run (not counts over the period): the executor's on PR #3 2, the executor's on PR #12 4, the reviewer's 1, QA's 5. What a wake-up catches isn't recorded, so there is no finding.--format jsongivesidle: [{ "waiter": "pr-poll", "pr": 3, "idle": 2 }, …, { "waiter": "pr-state", "idle": 1 }, { "waiter": "pr-qa", "idle": 5 }]. It no longer has afilekey: the JSON named files too.SPEC's Auditor section describes the new form. The test fake gh gains an
openPrskey, used only forpr list --state open. Other callers are unchanged.Done, and the checks that show it
All tests below are in
scripts/test/run.mjs, in the audit section, namedaudit idle (#108): ….-wait.json, no.agent-loop, no home path and no clone name ("the markdown names no state file, folder or clone").idlearray is checked, and the JSON text contains no file or clone name.Mutation-checked:
Calls a reviewer might push back on
Known limits
Restart note
None: no loop text changed, and
audit.mjsis read when it runs. Setup doesn't need re-running.Closes #108