Repository navigation
feat: count pushes after a blocked head for the seam trigger - #24520
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change only advises ( Notes
[DESIGN-REVIEWED] c25afe8 Description read[DESCRIPTION-READ] 86bdc90c03c849b759f02f2bafca7098bcf72527f7b0ab30f571ed19e688bdb6 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) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Each item traces to the stated reach gap (10 of 15 spiral PRs carry no marker). It stays advisory while Notes
What this change shipsInventory (9 items) — 8 justifiedIntent: a PR that keeps getting blocked is told to change approach even when no disposition marker was written. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] c25afe8 Description read[DESCRIPTION-READ] 2b3666e72978a19acfd20087e231d32ec16984444e908f2576e79c75a05b221c That sha256 names the PR description this verdict read. Recompute it with |
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: |
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: |
82b3a3e to
7eb0a97
Compare
7eb0a97 to
b1040fe
Compare
b1040fe to
b3bff5c
Compare
The D5 seam trigger counted only writer disposition markers, so it never fired on 10 of the 15 PRs with 10+ review loops. Add blocked_push_count(repo, number, run) to the shared review contract: it reads the PR timeline (GET only) and counts pushes whose previous head had a failed review-lane check run or a CHANGES_REQUESTED review. A rebase or a red test shard on a green head counts nothing. pr_findings.py --rounds prints SEAM REPEAT (pr-level) and exits 30 from 3 such pushes, SEAM LIMIT (pr-level) from 5, when no span is a marker seam. sweep_check.py applies the same count in its seam rules and when there is no sweep file. SWEEP_ENFORCED stays False. The prose lives in references/seam-protocol.md.
b3bff5c to
c25afe8
Compare
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Review findings that are still true on main after this merged are tracked in #25065 (two files past the 1,600-line split rule, and a second blocked-push count that disagrees with |
Problem / Motivation
Goal: A pull request that keeps getting blocked is told to change its approach after the 3rd blocked push, whether or not its author wrote any disposition marker.
The D5 seam rule counts only writer
<!-- ai-review-disposition -->comments. Replaying the shipped functions on the 15 PRs with 10+ review loops showed that 10 of them have no usable marker, so the rule could not fire on them (they hold 148 of the 218 loops). Authors answered in plain text, or a human requested changes by review.Why it matters
The spiral PRs are 51.1% of all review loops in the latest-150 study. A trigger that reads pushes instead of bookkeeping reaches every one of them.
Not a goal
SWEEP_ENFORCEDstaysFalse; nothing newly fails a PR's checks.AGENTS.md,codex-review.ymlor any lane prompt.SKILL.md(it is near its 56,000-byte budget). The prose is inreferences/seam-protocol.md.What changed (motivation → approach → change)
The marker count stays first. Only when it finds no seam, the PR's own history is counted.
_review_contract.blocked_push_count(repo, number, run): readsissues/{n}/timelineand each earlier head's check runs. A push counts once when the head it replaced had a failed lane check run (Opus, GPT, Design, UX, First Principles) or a CHANGES_REQUESTED review. GET only;runis injected, so tests need no network. It returnsNonewhen GitHub cannot be read, never0.pr_findings.py --rounds: 3 such pushes printSEAM REPEAT (pr-level)and exit 30; 5 printSEAM LIMIT (pr-level). Aresolution:line in a disposition restarts the count from that round's head.sweep_check.py: the same count feeds_seam_problems(existing finding text, "push of this PR after a blocked head" in place of "fix of one span") and the no-sweep-file path.references/seam-protocol.md: a "PR-level count" section.The helper is in
_review_contract.pyas the design asks. That file was already 1,801 lines and is now 1,930, under the 2,000 cap.Backwards compatibility
Compatible:
run()insweep_check.pygains an optional argument;rounds_viewprints one extra line (blocked pushes (pr-level): N) and can exit 30 where it exited 0 before. Both only advise. A newgh apiread (timeline, check runs) can fail or be slow; it then reads as unknown and changes nothing.Removes nothing: no flag, key, function or output line is removed or renamed.
Tests
test/test_prepare_pr_rounds_view.py: the helper against a fakerun(counting, green head, red test shard, each lane name, cancelled/timed-out/skipped, review states and dismissal,committedevents, repeated head, multi-commit push,since,stop_at, paging, GET-only, unreadable reads areNone), and the view (exit 30 at 3,SEAM LIMITat 5, nothing at 2 or unknown, no markers at all, marker seam wins,resolution:restart).test/test_sweep_check.py: thresholds and text, table and resolution answers, marker count first, the no-file path in warn and enforced mode, and four end-to-end cases through the fakegh(timeline and check runs added to it)._check,_wire) now inject the push count so no test reachesgh.Proof: not provable -- other: a feature change, not a fix, so there is no failing-before test to revert to
Manual verification
False-positive check. The saved thread data in
code-quality/latest150/design/raw/holds issue comments only (lane comments are edited in place, no timeline, review or check-run data), so it cannot feed this helper. I replayed the helper with live read-onlygh apicalls on the same 15 PRs (313 calls, none failed):Counts per PR: 23563: 28, 23716: 13, 23719: 8, 23717: 8, 23697: 8, 23538: 8, 23606: 5, 19628: 1, 10925: 8, 23321: 3, 22149: 2, 20459: 3, 21618: 4, 23333: 15, 23223: 10.
These are the spiral PRs themselves, so this shows reach, not the false-positive rate. The rate on the other 135 PRs was not measured. #19628 (12 loops) counts 1, which may be older check names or purged check data; not checked.
Screenshots / video
N/A — no user-visible UI.
Related Issues
None.
Sibling sweep
Swept: git grep -nE "SEAM_(REPEAT|LIMIT)_FIXES|fix_rounds(|fix_counts_from" -- src
Sibling: src/kiro_crew/builtin_skills/kirocrew-dev/kirocrew-prepare-pr/scripts/pr_findings.py -- changed here
Sibling: src/kiro_crew/builtin_skills/kirocrew-dev/kirocrew-prepare-pr/scripts/sweep_check.py -- changed here
Sibling: src/kiro_crew/builtin_skills/kirocrew-dev/kirocrew-prepare-pr/scripts/_review_contract.py -- changed here
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)