ci: combine AI issue triage with a maintainer rotation as the responsible reviewer - #1260
Draft
alexhancock wants to merge 1 commit into
Draft
ci: combine AI issue triage with a maintainer rotation as the responsible reviewer#1260alexhancock wants to merge 1 commit into
alexhancock wants to merge 1 commit into
Conversation
…ner on weekly rotation as the responsible human reviewer
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.
Motivation and Context
Supersedes #1257 and #1254, which solved two halves of the same problem: #1257 added AI classification for new issues, #1254 added a maintainer rotation. Landing them separately would have meant two workflows racing to triage the same issue with no defined relationship between them.
This combines both into a single
triage.ymlwith two stages:The key property is that stage 2 does not depend on stage 1.
assignruns underalways()gated only on preflight, so if Codex is unconfigured, times out, or returns garbage, the issue still lands on a human — the AI pass accelerates triage and never decides it. Missing secrets degrade a stage to a skip rather than a red X on the issue.Codex classification is scoped to issues only. PRs already get their
T-*labels from the diff viaauto-label-pr.yml, so running the model over them would just be a second, worse source of the same labels.Addressing @DaleSeo's feedback on #1254
read:orgwon't be enough to calladdAssigneesandcreateComment. Correct.ROTATION_TOKENis now documented as needingread:orgplus write on issues and pull requests, in the workflow header and in the docs table.actions/github-scriptis now v9.0.0, pinned to373c709c.docs/CONTRIBUTE.MDunder "Triage" (the two stages, rotation mechanics, response-time expectations, secret table, dry-run instructions) and linked from the README's Development section. The workflow header points at the real file instead of aCONTRIBUTING.mdthat doesn't exist in this repo.Two things I fixed along the way
github.event.issue.user.type != 'Bot' || github.event.pull_request.user.type != 'Bot'— on any single event one of those contexts is empty, so that side is always true and the||always passed. Dependabot and release-plz PRs would have been assigned to the rotation. Now a single comparison on(issue.user.type || pull_request.user.type).${{ }}interpolation. The classification is passed intogithub-scriptthroughenvrather than interpolated into the script body, and each field is validated against its allowed set before it reaches a comment body. Codex output is untrusted input, and ci: triage new issues with Codex #1257's prompt already treats issue text that way.How Has This Been Tested?
actionlintclean. Both stages supportworkflow_dispatchwithdry_run(default true) which logs the verdict and the rotation pick and changes nothing — I'll exercise that against a real issue before this comes out of draft, since neither stage can be fully tested until the secrets are configured on the repo.Draft because it needs
ROTATION_TOKENcreated and @DaleSeo's read on folding his workflow into this one.Breaking Changes
None. Deletes
scripts/triage-new-issues.sh, the Bash triage script that has been dead since #714 disabled it withif: false— same removal #1257 made.Types of changes
Checklist