Repository navigation
Conversation
…gs Line (#1709) Answers #1692 and #1699, the two defects in how `pr_review.py` reads a `ccr-overview-v2` review body. ## #1692, the unclearable coverage block Five of ten rounds in that format state no file coverage at all, so exit 45 fired on a state no re-request has ever cleared, and the maintainer waived it every time. A round that states none now carries the newest round that states some. **The carry is bounded on the change set.** It carries only where the pull request changes the same set of files at both commits, which is the condition measured on this fleet for the reviewer's own marker carrying: one pull request in a promotion chain held its marker across a push whose change set stayed the same three files, and the next lost it when its change set grew from one file to three. It refuses where either compare cannot be read, because a bound that falls open when it cannot be measured is no bound. Exit 45 therefore now covers three states, and its own message says which the run reached: nothing ever stated coverage, the change set moved since the round that did, or the comparison could not be read. `changed_at` is memoized for the run. The digest and the verdict each compute the bound, and unmemoized they did so from four independent network reads, so a transient failure in one pair and not the other printed a carried block beside an exit code that refused the carry, and the reverse. The reverse is the fail-open direction, since a wait keys on the exit code. ## #1699, the per-severity findings line The line was read as its first number, so a round stating two of one severity and three of another reported two findings and `unlisted_findings` computed a shortfall of zero. Every count the markup did not swallow is now summed. Summing overstates and never understates. A line stating a grand total and then the severities it decomposes into is summed with its own parts, and `12 findings across 4 files` sums to sixteen. That is the named cost of the direction: an overstated shortfall prints a block a reader checks against the body and blocks no merge, where a suppressed one closes the gate over findings nobody answered. The markup is masked to one sentinel before any count is read, so a badge's own attribute digits and a link's anchor id are not counts. Under the mask, a run of more than four digits is an identifier rather than a count, which is the second guard for a mask that terminates early on a bracket a URL carries itself, and which also stops `int` being handed a digit run long enough to raise. ## Prose these changed `.github/copilot-instructions.md` still required the head round to state coverage itself, which the carry made false. The Merge Gate in `pr-review-conduct` and `GOVERNANCE.md` "PR Review Etiquette" were never updated for the carry at all. ## Verification Three adversarial local review passes, each on the strongest tier this session reaches, raising 9, 13 and 8 findings, every one dispositioned. The second pass is the one worth naming: the first fix had the digest and the verdict each compute the bound from their own network reads, so a transient failure in one and not the other let a carry the digest had just refused read as clean through the exit code a wait keys on. The full suite is green at 1604 tests, and the two bound cases were confirmed to fail with the bound reverted. `ruff format`, `ruff check`, `mypy`, `repo_gate --check eol`, `spec/validate.py` and `build_dist.py --check` all pass. The prose gate reports `comment-added` alone, which the `comments` label on this pull request clears. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Review completion now correctly carries coverage from an earlier round only when the changed files remain identical. * Reviews are blocked when coverage cannot be verified, the change set has moved, or findings and coverage data are incomplete. * Finding totals are parsed more accurately across severity counts, markup, links, and “none” values. * **Documentation** * Updated review guidance and script documentation to explain carried coverage, blocking conditions, and revised exit statuses. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It changes merge-gating logic and parsing of untrusted review bodies in pr_review.py, so a human should do a final risk check despite the strong test coverage.
Review effort: Lite
Findings: 1
What changed in this PR
This promotion PR brings develop to main, carrying the ccr-overview-v2 reader fixes that make pr_review.py (a) carry forward the newest stated coverage when the head round states none, bounded by an unchanged changed-file set, and (b) sum multi-severity finding counts instead of reading only the first number. It also updates the review guidance docs and adds/strengthens tests to keep the new behavior off the network and order-independent.
Changes:
- Update
scripts/pr_review.pyto (1) bound carried coverage on a REST-verified unchanged change set and (2) sum findings totals across severity splits while masking markup/identifiers. - Expand
scripts/tests/test_pr_review.pywith coverage-carry and findings-summing cases, plus a basesetUpinvariant that prevents accidental REST/network reads. - Update review-loop documentation (
scripts/README.md,GOVERNANCE.md,.github/copilot-instructions.md, and thepr-review-conductskill text) to describe the new carry behavior and exit-code semantics.
| File | Description |
|---|---|
| scripts/tests/test_pr_review.py | Adds comprehensive regression tests for carried coverage, summed findings parsing, and enforces test isolation from REST reads. |
| scripts/README.md | Documents updated status/wait semantics for carried coverage and summed findings interpretation. |
| scripts/pr_review.py | Implements bounded coverage carry via REST compare + memoization and robust findings total parsing for ccr-overview-v2. |
| GOVERNANCE.md | Updates PR review etiquette to allow bounded coverage carry when the head round states none. |
| .github/skills/pr-review-conduct/SKILL.md | Generated skill copy updated to reflect the bounded-coverage-carry rule. |
| .github/copilot-instructions.md | Updates Copilot review completion guidance to match bounded carry and new blocking conditions. |
| .claude-plugin/fleet-skills/skills/pr-review-conduct/SKILL.md | Generated plugin skill copy updated to reflect the bounded-coverage-carry rule. |
| .claude-plugin/fleet-skills/.source-digests/pr-review-conduct | Updates the source digest for the regenerated skill distribution. |
| .agents/skills/pr-review-conduct/SKILL.md | Source skill text updated to describe bounded-coverage carry for head rounds that state no coverage. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Answers the one finding on the `develop` -> `main` promotion #1712, which cannot take the fix on its own head. ## The finding, and why the first remedy was wrong The sentence "Re-run the loop after every fix push" was split across two lines, with `push.` opening a line under an eight-column `finding.` The break predates #1709, but #1709 rewrapped every line of that paragraph around it and left it, which is what turned the original spacing into something that reads as an accidental hard wrap. The first attempt here reflowed that paragraph to a consistent column width. The reviewer pointed out that this is backwards. `comment-and-doc-style` states the rule plainly, **one logical paragraph per line, no hard-wrap line-length limit**, and `GOVERNANCE.md`, `AGENTS.md`, `CODESTYLE.md`, `README.md` and `WORKFLOW.md` all follow it, running from 980 to 4096 columns. This file was the only hard-wrapped document in the fleet, and the orphaned break was a symptom of that rather than the defect. Reflowing to a fixed width made the file tidier and left it non-conformant. ## What this does Unwraps the whole file to one logical paragraph per line. Fixed as the class rather than the one paragraph, since fifteen blocks were wrapped and leaving fourteen means the next edit to any of them meets this finding again. The file goes from 114 lines to 77, and its longest line from 756 columns to 989, which sits inside the band the sibling documents occupy. No column width is enforced or intended, and no line is wrapped. A list item's own indent is structure rather than wrapping, so it is kept and only continuation lines are folded. An earlier revision of this branch stripped it, flattening the eighteen `Disproved by`, `Proved against` and `Delete when` sub-bullets out of their parent claims, which the `copilot-instructions-keeper` Skill carries as part of this section's shape. ## No word changes, asserted rather than eyeballed The net diff against the merge base is checked on four properties, each compared against the base: | Property | Result | | --- | --- | | Whitespace-normalised token sequence | identical | | Per-paragraph text, so no word crossed a blank line | identical, 28 blocks | | Every list item with its indent and folded text | identical, 29 items | | Heading list, so anchors are unchanged | identical | The file is `intent` fidelity in `spec/files.json`, so it is never hashed against downstream copies and no verbatim check can trip. Joining lines cannot split a substring, so the raw-text assertions recorded in #1714 are unaffected. ## Verification Full suite green at 1605 tests, `ruff format`, `ruff check`, `mypy`, `prose_lint --diff` at zero violations, `repo_gate --check eol`, `spec/validate.py`, and `build_dist.py --check` all pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It changes fleet-wide merge gating behavior (pr_review.py) and its governing contracts, so it warrants final human verification despite strong test coverage.
Review effort: Lite
Findings: None

Promotes
developtomain, carrying two changes.#1709, the
ccr-overview-v2readerThe coverage statement now carries forward, bounded on the change set. A round in that format states no file coverage five times in ten, so exit 45 fired on a state no re-request reliably clears. A round that states none now carries the newest round that states some, and only where the pull request changes the same set of files at both commits, which is the condition measured on this fleet for the reviewer's own marker carrying. It refuses where either compare cannot be read, because a bound that falls open when it cannot be measured is no bound. Exit 45 now names three states rather than one, and its own message says which the run reached.
The per-severity findings line is summed rather than read as its first number. A round stating two of one severity and three of another reported two findings, so
unlisted_findingscomputed a shortfall of zero and a withheld finding went unreported. Summing overstates and never understates, and the named cost is that12 findings across 4 filessums to sixteen. An overstated shortfall prints a block a reader checks against the body and blocks no merge, where a suppressed one closes the gate over findings nobody answered.#1713, the runbook's line wrapping
.github/copilot-instructions.mdwas the only document in the fleet that was hard-wrapped, againstcomment-and-doc-style's "one logical paragraph per line, no hard-wrap line-length limit", whichGOVERNANCE.md,AGENTS.md,CODESTYLE.md,README.mdandWORKFLOW.mdall follow. It is unwrapped: 114 lines to 77, longest line 756 columns to 989. No word changes, asserted against the merge base on the token sequence, the per-paragraph text, every list item with its indent, and the heading list.Review record
This promotion raised one finding, an orphaned line break in the runbook, which #1713 answers and which is resolved above.
On #1709, four Copilot rounds and one CodeRabbit round, ending at
coverage=full, "Approval recommended", zero findings. CodeRabbit raised one body-only nitpick that opened no thread and it was real: two test classes overrodesetUpwithout chaining, so neither installed the patch that keeps a case off the network nor the memo clear that change adds. Fixed as a class invariant rather than in the two instances.On #1713, two Copilot rounds. The first established that the fixed-width reflow was the wrong remedy, which is why the whole file is unwrapped rather than one paragraph. The second caught the pull request description still describing the reflow.
Six adversarial local review passes across the two branches. Two caught defects introduced by an earlier fix on the same branch: a fail-open where the digest and the verdict each computed the coverage bound from their own network reads, and a list indent stripped by the unwrap, which flattened eighteen nested sub-bullets out of their parent claims.
Closes #1692
Closes #1699
🤖 Generated with Claude Code