Repository navigation
Make Auditor collection resilient to health timeouts - #77439
Conversation
Preserve incomplete discovery diagnostics and bounded adaptive retry state without advancing successful checkpoints. Allow completed failure discovery despite success-sampling timeouts, and defer evidence queries durably before the job deadline. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟡 Changes recommended
Critical auditor state-handling defects can discard unresolved failures while marking evidence complete and lose completed audit progress, leaving later clusters pending indefinitely.
4 open issues
What changed in this PR
Makes Auditor’s hourly collection more resilient to health-discovery timeouts by preserving diagnostics and retry state without advancing the successful checkpoint when failure discovery is incomplete.
Changes:
- Increases retry budgets from 5 to 10 to 15 minutes, resetting after successful collection.
- Adds an 18-minute script-relative admission deadline for logs and audits, with pending-state preservation and cached-report reuse.
- Expands regression coverage and updates operational documentation and the generated workflow.
| File | Description |
|---|---|
scripts/auditor-workflow.test.cjs |
Adds coverage for retry escalation, deferred bootstrap, checkpoint preservation, and evidence deferral. |
.github/workflows/auditor.md |
Implements adaptive budgets and deadline-aware collection; documents retry and persistence behavior. |
.github/workflows/auditor.lock.yml |
Regenerates the executable workflow and metadata from the updated source. |
Review effort: Max (dynamic)
| (discovery.reason === 'time_budget' && | ||
| discovery.failure_listing_complete === true && discovery.failure_pass_complete === true)))) || |
| if (Date.now() + 120000 > evidenceDeadline) { | ||
| // Cached reports survive, but these failures must remain new until audits can finish. |
| })); | ||
| const discovery = health.collection; | ||
| if (discovery?.partial === true && discovery.reason === 'time_budget' && | ||
| Array.isArray(health.workflows) && |
| return report; | ||
| }; | ||
| for (const run of batch) { | ||
| if (Date.now() + 120000 > evidenceDeadline) break; |
|
🎉 This pull request is included in a new release. Release: |


Auditor's hourly collection repeatedly exhausted its five-minute health-discovery budget, leaving the checkpoint unchanged and preventing downstream failure analysis.
This change preserves incomplete diagnostics and retry state in the existing cache, increases subsequent health budgets from 5 to 10 to at most 15 minutes, and resets the budget after successful collection. Time-budget results can proceed only when both failure inventory and representative verification completed; incomplete failure discovery never advances the successful checkpoint or activates the agent.
Logs and audits use an 18-minute script-relative admission deadline. Deferred audit work keeps failures pending and unseen, reuses cached reports, and avoids duplicate backlog entries. The generated workflow and operational documentation are updated together. Credentials, permissions, recovery authorization, and publication safeguards remain unchanged.
Validation: all 50 focused Auditor tests passed, workflow recompilation succeeded, and
make agent-report-progresspassed. Static security review passed. An earlier diagnostic dry-run gate remained blocked by pre-existing compiler warnings; no workflow was dispatched. The evidence deadline reserves persistence headroom but is not a hard whole-job deadline because setup and awaited API calls also consume time.