Skip to content

ci(issue-gate): gate on tier + triaged labels and pause it until the Captain scan runs - #16697

Merged
bolichen97 merged 2 commits into
mainfrom
ci/issue-gate-tier-triage-paused
Oct 4, 2026
Merged

bolichen97 merged 2 commits into
mainfrom
ci/issue-gate-tier-triage-paused

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

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

  • Running the Captain or writing any label from this repository. The Captain runs outside .github/.
  • Switching the gate on. It ships paused; turning it on is a separate one-line change.
  • Backfilling tiers on existing issues.

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:
    • New GATE_ENFORCED env, set to "false". Paused: the job logs a notice and passes before any API read. A value other than "true"/"false" fails closed.
    • New rule: exactly one tier:T* label; tier:T1/tier:T2 are green on their own; tier:T3/tier:T4 are red until the issue carries triaged (and no pending-triage).
    • The verdict labels and needs-triage are no longer read.
    • The issue-gate: waived label is now documented and logged as the maintainer manual override for any PR.
  • New repository labels pending-triage and triaged (created on GitHub; they are not in the tree).
  • docs/ci/ci-and-reviews.md, CONTRIBUTING.md, prepare-pr/SKILL.md, the pr_status.py notice: 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 stubbed gh for 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:T4 issue needs triaged) only applies once someone sets GATE_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.
  • TestGateStepDecisions runs the shipped step script under bash with a stubbed gh: 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.
  • Negative control: adding tier:T3 to TIER_PASS_LABELS reddens 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-human and tier:T1.

Related Issues

Closes #16696

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

@bolichen97
bolichen97 requested a review from a team as a code owner October 4, 2026 06:50
@bolichen97
bolichen97 requested a review from CrysisDeu October 4, 2026 06:50
@bolichen97
bolichen97 enabled auto-merge (squash) October 4, 2026 06:50
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 843d4736a1570b2b7119d3f9783b66af1cd23d07 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Before anyone sets GATE_ENFORCED: "true", check that the Captain writes exactly tier:T* and pending-triage, and that the triaged label it relies on exists.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🟡 CONCERNS

Premise-level review of 843d4736a1570b2b7119d3f9783b66af1cd23d07 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: CONCERNS

The T3/T4 "carries both pending-triage and triaged" red row blocks a PR whose issue a person has already read, and no harm is named for it.

Not justified as shipped

  • Item 4 — inherited: the description only says "red until the issue carries triaged (and no pending-triage)", and the diff adds problems+="- #$n carries both ... remove \$PENDING_LABEL`.". A stale leftover label does not mean the issue went unread. triagedalone already shows that a person read it. Subtraction: delete thependingvariable, the both-labels branch and its table row and test rows. Check onlytriagedon T3/T4. Clears when: the branch is deleted, or the description names a case wheretriagedplus a stalepending-triage` means nobody read the issue.
  • Item 2 — inherited framing: the description says "The gate also ignores the tier scheme", but base already required "exactly one tier label from TIER_LABELS". The new part is only that T3/T4 also need triaged.
    Clears when: the description sentence is corrected to say what is actually new.

What this change ships

Inventory (7 items) — 5 justified

Intent: 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.

  1. Issue Gate passes every PR (paused by GATE_ENFORCED: "false") — justified
  2. Verdict labels and needs-triage are no longer required — justified
  3. T3/T4 issues need triaged; T1/T2 pass on their tier alone — justified
  4. T3/T4 issue carrying both triage labels goes red — inherited, no named harm
  5. Any GATE_ENFORCED value other than "true"/"false" fails the job — justified
  6. The waiver label is now described as a general maintainer override (no code change) — rides along
  7. Docs, skill text and the pr_status.py notice mention the pause — justified

[FIRST-PRINCIPLES-REVIEWED] 843d473

Description read

[DESCRIPTION-READ] 17bdb1ad4a506a838674ec3ab6d37e5f6ac1d21d71572228c9fbdcf3b207d268

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 843d4736a1570b2b7119d3f9783b66af1cd23d07 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 843d473

Verdict parsed from the review's SHA-scoped output markers for commit 843d4736a1570b2b7119d3f9783b66af1cd23d07.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 843d4736a1570b2b7119d3f9783b66af1cd23d07: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 843d4736a1570b2b7119d3f9783b66af1cd23d07 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 843d473

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 843d4736a1570b2b7119d3f9783b66af1cd23d07: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 4, 2026
@bolichen97
bolichen97 disabled auto-merge October 4, 2026 08:02
@bolichen97
bolichen97 merged commit cd67019 into main Oct 4, 2026
97 of 98 checks passed
@bolichen97
bolichen97 deleted the ci/issue-gate-tier-triage-paused branch October 4, 2026 08:03
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Oct 4, 2026
bolichen97 added a commit that referenced this pull request Oct 5, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(issue-gate): gate on tier + triaged labels and pause it until the Captain scan runs

2 participants