Repository navigation
fix(prepare-pr): bound the table rows in --check-body's What changed - #22089
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
6dfc9f8 to
647194f
Compare
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] b4c02b6 Description read[DESCRIPTION-READ] 251e1655b4f2d27da72a837eedbca386e4894724b75bac8f45dce987d84d13e0 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 |
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: |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Check one thing: the limit adds up rows across every table in What this change shipsInventory (6 items) — 6 justifiedIntent: stop prepare-pr's
[FIRST-PRINCIPLES-REVIEWED] b4c02b6 Description read[DESCRIPTION-READ] daf387a0429a61285fccf8b122eebe73f0a0d636364939fc9bff6609c95fe1ec 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: |
647194f to
b4c02b6
Compare
|
|
|
|
|
|
Problem / Motivation
Goal: The prepare-pr body check stops a PR body whose
What changedit cannot judge, instead of letting it through with exit 0.diff_signals.py --check-bodymade theWhat changedword count a hard gate in #10992, but two routes still pass it with exit 0. A body with no## What changedsection only gets a WARN. Table rows are left out of the word count, so a per-file walkthrough moved into a table stays under the limit.Why it matters
The skill tells agents to lead with a table, and the word limit puts them under exit-21 pressure. Without a row bound, the cheapest way past the gate is to turn the recital into rows. A same-repo body with the section missing is never stopped by anything server-side either; only fork PRs have that check.
Not a goal
references/body-picture.md.What changed (motivation → approach → change)
## What changedThe missing-section route was already closed after this issue was filed: #14401 runs CI's template check inside
--check-body, and it fails that body with exit 22. This PR adds an end-to-end test that pins it rather than a second gate. The table route is new: rows inWhat changedare summed over every table there, not counting headers, separators or fenced blocks, and more than eight is exit 21. The limit is a constant,TABLE_ROW_LIMIT = 8, and a test keeps it equal to the eight rowsreferences/body-picture.mdalready sets for a picture. The Two checks, two strengths table and the Phase 1 reconcile step in the prepare-prSKILL.mdnow say exit 21 covers table rows.Backwards compatibility
Breaking: a
--check-bodyrun on a body with more than eight table rows inWhat changednow exits 21 instead of 0. Writer sweep on origin/main @ d8ff9e7: the only caller is the prepare-pr skill itself (SKILL.mdPhase 1 step 5, Phase 2 step 3, Phase 3 step 2), which tells the agent to fix the body on 21.docs/system-specs/common/take-away-changes.mdandreferences/rationale.mdonly mention the flag.Reader: src/kiro_crew/builtin_skills/kirocrew-dev/kirocrew-prepare-pr/SKILL.md:Phase 1 step 5 -- chat|subagent -- the step now names table rows as an exit-21 cause;
test_skill_wires_the_check_at_every_body_write_and_gates_both_checksTests
test/test_prepare_pr_diff_signals.py:TABLE_ROW_LIMITmatches the eight rows inreferences/body-picture.md;What changedexits 22 from the template check.All 39 tests in the file pass on this head.
Manual verification
N/A — unit coverage sufficient: the change is a pure function over the body text, tested directly and end to end.
Related Issues
Closes #11006
Follow-ups:
~~~and indented code fences (same gap on main; kept out of this PR).Pattern harvest
Not generalizable: the gap was a length gate that excluded a content type the same skill recommends; the fix bounds that type with the number the skill already uses.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)