Repository navigation
ci(issue-gate): gate on tier + triaged labels and pause it until the Captain scan runs - #16697
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Before anyone sets [DESIGN-REVIEWED] 843d473 Description read[DESCRIPTION-READ] bf80f1b5c5aa980bb99af1e0faf5c48b8f5b135df8757241651083150193ff79 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 |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The T3/T4 "carries both Not justified as shipped
What this change shipsInventory (7 items) — 5 justifiedIntent: let a PR whose issue was filed with it pass Issue Gate, and keep the gate off until the Captain is labelling issues. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 843d473 Description read[DESCRIPTION-READ] 17bdb1ad4a506a838674ec3ab6d37e5f6ac1d21d71572228c9fbdcf3b207d268 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed 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: |
…Captain scan runs Part of #16696
62e1cee to
843d473
Compare
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: Issue Gate asks the right question (is this PR's issue sized, and has a person read the big ones?) and stays switched off until the Captain's triage scan is running.
Issue Gate requires a verdict label (
auto-fixable,needs-investigation,needs-human) on every issue a PR names. Those labels belong to the Issue Radar dispatch pipeline, which skips an issue that already has a PR. An issue filed together with its PR therefore never gets a verdict and its PR stays red. The gate also ignores the tier scheme (tier:T1..tier:T4) the Captain now writes. Separately, the Captain's scheduled scan is not running yet, so nothing would label new issues and every fork PR would be stuck red.Why it matters
As written, the gate forces "file the issue, wait for triage, only then open the PR", and it reds every PR whose issue was filed alongside it. Switching it on before the Captain runs would block all outside contributors.
Not a goal
.github/.What changed (motivation → approach → change)
Gate reads labels nobody writes yet → read the Captain's tier labels instead, add a pause switch → change:
.github/workflows/issue-gate.yml:GATE_ENFORCEDenv, set to"false". Paused: the job logs a notice and passes before any API read. A value other than"true"/"false"fails closed.tier:T*label;tier:T1/tier:T2are green on their own;tier:T3/tier:T4are red until the issue carriestriaged(and nopending-triage).needs-triageare no longer read.issue-gate: waivedlabel is now documented and logged as the maintainer manual override for any PR.pending-triageandtriaged(created on GitHub; they are not in the tree).docs/ci/ci-and-reviews.md,CONTRIBUTING.md,prepare-pr/SKILL.md, thepr_status.pynotice: describe the new rule, the pause and the override.test/test_issue_gate_refs.py: pins the label sets and the switch, and runs the workflow's own step script against a stubbedghfor every row of the rule.Backwards compatibility
The gate is less strict in effect: it is paused, so no PR goes red on it after this merges. The stricter rule (a
tier:T3/tier:T4issue needstriaged) only applies once someone setsGATE_ENFORCED: "true".Reader: .github/workflows/pr-readiness.yml:workflow_specs "issue-gate.yml|Issue Gate" -- entry: release -- still reads the same job name and conclusion; while paused the job always passes
Reader: src/kiro_crew/builtin_skills/kirocrew-dev/prepare-pr/SKILL.md:Issue Gate section -- entry: chat -- updated here to describe the new rule and the pause
Reader: test/test_ai_review_workflows.py:"issue-gate.yml|Issue Gate" -- entry: release -- lane name unchanged, test passes
Tests
pytest test/test_issue_gate_refs.py test/test_prepare_pr_status.py test/test_ai_review_workflows.py: 1060 passed, 394 skipped.TestGateStepDecisionsruns the shipped step script under bash with a stubbedgh: T1, T2, T3+triaged green; no tier, two tiers, T3/T4 pending or unlabelled, both labels, not-planned red; old verdict labels ignored; waiver overrides every red case; paused passes without reading; unknown switch value fails closed. The class needs bash and jq and skips on Windows runners; I ran all 70 tests in the file locally on Windows with Git bash and jq 1.8.2.tier:T3toTIER_PASS_LABELSreddens 3 tests (the partition test and two red-case rows).Manual verification
Ran the step script directly as above. This PR's own Issue Gate run is the live check of the current (still enforced) rule: #16696 carries
needs-humanandtier:T1.Related Issues
Closes #16696
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement