Repository navigation
Add hourly auditor for recurring agentic workflow failures - #75695
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection results could not be parsed. Review the workflow run logs to troubleshoot the error.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ 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.
|
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ 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.
|
|
✅ 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.
|
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical issues can stall checkpoint advancement, leave failures uninvestigated, and expose the shell-capable agent to contributor text that bypasses integrity checks.
9 open issues
Apply integrity policy to PR and run-report free text · New Bound run queries by creation time and paginate fully · New Treat obsolete PR exclusions as seen without backlogging · New Persist pending first-evidence handoffs across batches · New Reserve audit capacity or persist pending audits · New Include timed-out runs in collection and validation · New Fetch diagnostic logs for representative audits · New Prune query directories for entries removed from the backlog · New Publish deduplication fingerprints outside stripped comments · New
What changed in this PR
Adds an hourly gh-aw auditor to investigate recurring agentic workflow failures and propose one focused, deduplicated draft fix PR.
Changes:
- Adds cached, attempt-aware collection with API budgets and deferred-run tracking.
- Defines representative audits, root-cause fingerprints, all-author PR deduplication, and generated lock-file exclusion.
- Adds collector regression tests to
make test-scripts.
Validation included source inspection and isolated collector checks; workflow compilation and live execution were not performed.
| File | Description |
|---|---|
scripts/auditor-workflow.test.cjs |
Tests collection, checkpointing, pagination, batching, and activation guards. |
Makefile |
Includes auditor tests in the script test target. |
.github/workflows/auditor.md |
Defines collection, diagnosis, deduplication, and restricted PR publication. |
.github/workflows/auditor.lock.yml |
Generates the executable Actions jobs and security configuration. |
Review effort: Max (auto)
| openPRs.push(...response.data.map(pr => ({ | ||
| number: pr.number, title: pr.title, body: pr.body, url: pr.html_url, | ||
| head: pr.head.sha, base: pr.base.ref, draft: pr.draft | ||
| }))); |
| report = cli(['aw', 'logs', (run.path || '').split('@')[0], | ||
| '--repo', repository, '--after-run-id', String(run.id - 1), | ||
| '--before-run-id', String(run.id + 1), '--count', '2', |
| Date.parse(report.runs[0].updated_at) !== Date.parse(run.updated_at)) { | ||
| throw new Error('Selected run missing or changed during collection'); | ||
| } | ||
| if (!report.runs[0].intentional_failure) { |
| b.members.length - a.members.length || | ||
| Number(b.signal_role === 'failure_boundary') - Number(a.signal_role === 'failure_boundary') || | ||
| a.id.localeCompare(b.id)); | ||
| const newFailures = fresh.filter(r => backlog.some(m => m.key === identity(r))).length; |
| if (currentRate.used >= ceiling - 25 || currentRate.reset !== rate.reset) { | ||
| throw new Error('Shared API budget exhausted or reset; checkpoint unchanged'); |
| if (!Number.isSafeInteger(r.id) || !Number.isInteger(r.run_attempt) || | ||
| !Number.isFinite(Date.parse(r.updated_at))) throw new Error('Invalid run identity'); | ||
| } | ||
| const eligible = agentic.filter(r => r.status === 'completed' && r.conclusion === 'failure'); |
| const audited = cli(['aw', 'logs', (member.run.path || '').split('@')[0], | ||
| '--repo', repository, '--after-run-id', String(member.run.id - 1), | ||
| '--before-run-id', String(member.run.id + 1), '--count', '2', | ||
| '--artifacts', 'info,usage', '--audit', '--json', '--verbose', |
| // Complete metadata/PR scope; evidence may be a declared FIFO batch. | ||
| // Never mark deferred attempts seen. Cache save must also succeed. |
| messages, or query-local cluster IDs. Include the canonical tuple and | ||
| `<!-- auditor-root-cause:v1:<sha256> -->` in the PR body. Match exact fingerprints |
|
🎉 This pull request is included in a new release. Release: |


Add an hourly auditor that investigates new failing agentic runs and proposes a fix for the largest unresolved cluster. Avoid duplicate PRs and bound GitHub API usage through cached collection.
**/*.lock.ymlfrom generated fix PRs.