Repository navigation
ci(issue-gate): require exactly one tier label on the issue - #16634
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Check that the out-of-repo triage pipeline really writes What this change shipsInventory (5 items) — 5 justifiedIntent: a maintainer wants every merged PR to point at an issue whose size someone has settled. ADDITION: a stricter CI gate.
[FIRST-PRINCIPLES-REVIEWED] 9e23ab4 Description read[DESCRIPTION-READ] bf720234a41dee943dc5afe0a4de238fde68534cb402e0e296c521eb8a0817ae That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Before merging, check that the out-of-repo triage pipeline writes the tier at the same time as the verdict. If it writes it later, [DESIGN-REVIEWED] 9e23ab4 Description read[DESCRIPTION-READ] 15269ccd7651aa35888e63bf0512f59a622ba53f1cc087d560fb2eb5ab8d2b8e That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsAdvisory only: when just the tier label is missing, the failure summary gives the wrong recovery instruction. FINDING — .github/workflows/issue-gate.yml:373 — if an issue already has its verdict label but no tier label (or two of them), the summary still says "Once the verdict label lands," so the author waits for a label that's already on the issue, and in the two-tier case waiting will never fix it → Fix: change it to "Once the verdict and tier labels are in place," and add that a maintainer must remove the extra tier label when there are two. [OPUS-REVIEWED] 9e23ab4 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
iamwhatever
left a comment
There was a problem hiding this comment.
Reviewed (read-only check of diff, tests and CI). Security looks fine. The workflow is still pull_request with read-only permissions. Label names are only compared with grep -F against a fixed list, never run as shell. Approving. Before merge, please confirm that triage writes the tier at the same time as the verdict, otherwise auto-fixable bot PRs fail in the gap between the two. Please also change the summary line "Once the verdict label lands" to name both labels, and say that a second tier label must be removed by a maintainer. The 41 open issues with no tier will make some PRs go red until triage adds one or a maintainer applies the waiver.
PR Readiness reads main's lane list, which waits on an Issue Gate check. Issue Gate is a pull_request workflow, so GitHub reads it from the PR's merge ref, and release/0.8.0 has no issue-gate.yml. Every PR into the release branch therefore waits on a check that never starts. Copy .github/workflows/issue-gate.yml from main unchanged. Its grammar script is read from a checkout of the default branch at run time, so the workflow file is the only piece the release branch needs. Source: origin/main 2359397 (file last changed there in #16740; introduced by #16241, #16634, #16697). Fixes #16868
Problem / Motivation
Goal: A PR can only pass Issue Gate when every issue it points at has a settled size, meaning exactly one
tier:T1..tier:T4label.Issue Gate (#16241) checks that a referenced issue carries a triage verdict (
auto-fixable,needs-investigation,needs-human), but never its tier. Triage already writes a tier on almost every issue, yet a PR can still merge against an issue whose size nobody settled, or whose size is ambiguous (two tiers).Why it matters
The tier decides how much process the work needs (T3 needs a one-pager, T4 a design review). Without the gate, a T3/T4-sized change can be built and merged as if it were a small fix, and nothing records that anyone sized it.
Not a goal
What changed (motivation → approach → change)
Gap: the gate reads each issue's labels but only checks the verdict set → approach: reuse that same label read and add one more check beside the verdict check, so no extra API call → change:
.github/workflows/issue-gate.yml: newTIER_LABELSenv (tier:T1 tier:T2 tier:T3 tier:T4). For each declared issue, after the verdict check, count exact-match tier labels: zero → finding "has no tier label", two or more → finding "carries more than one tier label". Header rule text and both job-summary messages name the new requirement.docs/ci/ci-and-reviews.md: "The rule, in full" names the tier requirement and what each tier means.test/test_issue_gate_refs.py:TestLabelContractpins the tier label set, like it pins the verdict labels.src/kiro_crew/builtin_skills/kirocrew-dev/prepare-pr/SKILL.md: the gate's failure conditions now name the tier requirement (Opus review advisory).Backwards compatibility
Breaking: a PR whose referenced issue has no tier label (or two) now goes red on Issue Gate where it passed before. Writer sweep on origin/main @ a60fda2: tier labels are written only by the out-of-repo triage pipeline; of 1,482 triaged open issues, 41 have no tier and 0 have two. A PR pointing at one of those 41 turns green once triage adds a tier and the PR description is edited (the
editedtrigger re-runs the gate); theissue-gate: waivedlabel is unchanged.Reader: .github/workflows/pr-readiness.yml:workflow_specs "issue-gate.yml|Issue Gate" -- entry: release -- still reads the same job name and conclusion; the verdict can now be red in one more case
Reader: src/kiro_crew/builtin_skills/kirocrew-dev/prepare-pr/SKILL.md:Issue Gate section -- entry: chat -- updated in this PR to name the tier requirement; grammar and waiver unchanged
Reader: test/test_ai_review_workflows.py:"issue-gate.yml|Issue Gate" -- entry: release -- lane name unchanged, test passes
Tests
test/test_issue_gate_refs.py::TestLabelContract::test_verdict_and_pending_labels_are_the_documented_setnow also pinsTIER_LABELSto exactlytier:T1..tier:T4, so a rename on either side reds a test instead of every PR.pytest test/test_issue_gate_refs.py test/test_ai_review_workflows.py: 738 passed.Manual verification
Ran the new tier check in bash against label sets: no tier → "no tier label";
tier:T1→ pass;tier:T1+tier:T3→ "more than one tier label"; look-alikestier:T10/tier:T→ "no tier label" (exact-line match). This PR's own Issue Gate run is the live check: #16633 carriesneeds-humanandtier:T1.Related Issues
Closes #16633
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement