Repository navigation
Conversation
A reusable gh-aw workflow marks auditor drafts ready once their checks pass, and has an agent fix one whose checks fail; the auditors label their pull requests `auditor` for it.
Deploy previewBundle sizeTotal Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%) Show details for 79 more bundles@mui/internal-docs-infra/abstractCreateDemo parsed: 0B(0.00%) gzip: 0B(0.00%) PerformanceNo regressions in 12 benchmarks · precise to ±19.7% (±40.4% at worst) · ran 1m 24s · details Check out the code infra dashboard for more information about this PR. |
- Count the required checks through gh pr checks, which keeps the latest run of each, instead of mapping the status rollup by hand. - Decide in one jq program which pull requests to mark ready and which one to hand over. - Record fix attempts in the plain job, before the agent runs, so a failed or timed-out run still counts; cap them at three per PR. - Run activation and the agent only when a pull request fails: quiet hours are the pre-activation and plain jobs.
- Count every check, with cancelled ones as failing, and fail the step on a gh error instead of reading it as no checks. - Record fix attempts in a comment from a job after the agent, so a run skipped before it doesn't use one up and description rewrites by the auditors don't reset the count; the agent reports in a comment too. - Let fixes change manifests and the lockfile, which the Dependabot fix pull requests need. - Give the agent the pull request's own diff, keep CircleCI links in its report, keep failure logs apart per run and job, and warn instead of stopping when a pull request can't be marked ready. - US spelling in the README, for Vale.
- Skip hours without an open auditor pull request at a search in pre-activation, before any runner starts. - Decide once per pull request in jq, with the attempt limit as an input (max_attempts) and cancelled checks blocking in one place. - Hide earlier attempt comments as outdated, and pass the pull request's number and commit to the record job as outputs. - Drop the agent job's checks and statuses grants, the temp file and a prompt sentence on attempts the agent can't act on.
Leaves out the auditor label on mui-public's Dependabot fix workflow: the security auditors now run from mui-private, which labels their pull requests.
…e-infra/gh-aw-auditor-shepherd-update # Conflicts: # .github/workflows/ahrefs-audit-workflow.lock.yml
… label gh-aw v1.4.1 checks the author of the pull request a push goes to (required-author), so the auditor label isn't needed to select or guard pull requests. Pushes and comments also target the scanned pull request. Also from review: count distinct commits toward max_attempts, wait 15 minutes after a push before marking ready so CircleCI can report, keep going when GitHub doesn't serve the diff, stop when the branch moved, fix a lockfile that doesn't match its manifests, and don't try browser tests.
…ditor-shepherd-update
…marking ready A draft is ready once every check the base branch's rulesets require has reported and all checks pass. A required check still missing after check_timeout_minutes (120) counts as failing, so the agent looks into it. Also reads the head commit's date per pull request: requesting commits in the 100-pull-request list exceeds GitHub's GraphQL node limit.
One GraphQL search returns each pull request with its latest commit's checks and its comments, instead of three gh calls per pull request, and the decision logic is plain functions instead of a jq program in a shell string.
Run the scan and record jobs on ubuntu-slim, map a check from its conclusion alone and count skipped checks as passing, read the pull request number from the scan's output, and drop the agent's setup-node step: gh-aw's own Node.js setup runs after it and takes precedence.
A CircleCI check links to its job by ID; the branch's recent builds on API v1.1 give the job's number, and its failed steps' output is the log. Public projects serve both without a token.
The agent reads a failing CircleCI job's log with the hosted MCP server's get_job_logs, for private projects too. Its read-only token is a code-infra-auditor environment secret that only the MCP gateway gets, so the whole workflow now runs in that environment. The token-free prefetch for public projects goes: one path for both.
The scan extracts the job ID from a CircleCI check's link, so the agent passes it to get_job_logs as is, capped at 400 lines like the GitHub Actions logs. Drops get_job, which only led to the same log, and leftovers of the CircleCI prefetch.
The agent comments only when a person needs to act; a plain fix's commit message is its record. gh-aw's run-status comments, such as one per pushed commit, are off, and each fix attempt is recorded as an auditor-shepherd commit status, which links the run without notifying anyone, instead of a comment.
The record job now writes a commit status, and a called workflow can't get more than its caller grants.
…a PR's intent Reverting part of a pull request or changing its behavior to make the checks pass needs a reviewer's attention, so the agent comments on it.
GitHub rejects markPullRequestReadyForReview from an Actions token with only pull-requests: write (Resource not accessible by integration).
A reusable gh-aw workflow that looks after the pull requests the auditors open as the Code Infra - Auditor App, and mui-public's hourly caller.
reviewer_team) once every check the base branch's rulesets require has reported and all its checks pass. A required check still missing two hours after the last commit (check_timeout_minutes) counts as failing.auditor-shepherdcommit status linking the run, so a run skipped before the agent leaves the commit to a later one, and nothing notifies anyone.get_job_logs, read tools only). Its read-only token is aCIRCLECI_READ_TOKENsecret in thecode-infra-auditorenvironment that only the MCP gateway gets, so every gh-aw job now runs in that environment. gh-aw rejects sending a secret from a step before the agent (CTR-017), which rules out fetching the logs up front.required-author, Restrict push-to-pull-request-branch / update-pull-request to pull requests a given author opened github/gh-aw#81015).Accepted trade-offs
code-infra-auditorenvironment, the hourlypre_activationincluded, though only the agent and safe-output jobs use its secrets. gh-aw binds an environment to all its jobs or to safe outputs only. Withdeployment: falseand a branch rule alone that costs nothing; required reviewers or a wait timer on the environment would stall every run.get_job_logsreturns the log only as structured content, with a one-line text summary, and Claude Code passes the agent the text. The agent then reproduces the job, as it did in the smoke test. The wiring stays for when CircleCI's server includes the log in its text.package.json, not CI's exact version. The same goes for the other auditors; aligning all three is a separate change.