Read a suppressed section nested inside the review-details wrapper - #564
Merged
Conversation
The reviewer moved the suppressed-findings section from its own <details> wrapper to a markdown heading inside the Review details wrapper, and the parse missed it twice over. The primary path matched the heading against the wrapper's <summary>, which now reads 'Review details', and the fallback for a moved wrapper scanned the body with every <details> block deleted, which deletes the region the heading sits in. The digest then reported suppressed=0 over a body carrying two findings, the false clean the whole gate exists to prevent. Each region is now scanned line by line for the heading, so the section is found inside a wrapper, nested in another wrapper's contents, or bare in the body, and a block starts at its own heading so the count is the heading's (N) rather than the wrapper's. Replayed over the reviewer's bodies on the last seventeen pull requests, this recovers six findings across five rounds that read as clean and changes no count that was already right. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the PR-review digest parser so it reliably detects and counts Copilot’s “suppressed / low confidence” findings even when the section is nested inside another <details> wrapper, preventing false “clean round” reports.
Changes:
- Teach
suppressed_blocks()to scan all non-overlapping regions (each<details>body plus the outside text) for suppressed headings, including nested markdown headings. - Make
heading_of()andfinding_count()operate on a block that starts at the finding’s own heading so counts come from the correct(N). - Add focused unit tests covering the nested shape, correct counting, coexistence with the legacy wrapper shape, and avoiding false positives from file-summary tables.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/pr_review.py | Fix suppressed-section detection by scanning each region for headings and counting from the finding’s own heading. |
| scripts/test_pr_review.py | Add regression tests for nested suppressed sections and correct counting/printing behavior. |
| .github/copilot-instructions.md | Document that the suppressed section can move (including nesting) and must be matched wherever it appears. |
Uh oh!
There was an error while loading. Please reload this page.
ptr727 added a commit
that referenced
this pull request
Aug 6, 2026
…574) Promotes the nine commits `develop` has carried since the previous promotion (#555) to `main`. Merge commit only, no squash, and `develop` is not deleted. ## What lands - **#560** Standardize the static-site-deploy repo type and its destination, including the deploy-verification guarantee and a retention rule that records which side owns the prune. - **#561** Ask for a blocked decision instead of reporting it, and scope the clickable-link rule to a surface that renders markdown. - **#564** Read a suppressed section nested inside the review-details wrapper, so `scripts/pr_review.py` stops reporting a clean round over findings that reach no thread. - **#566** Settle Markdown capitalization in `CODESTYLE.md`, and fix the two `TODO.md` prose defects the digest defect had hidden. - **#568** Check a `driftNote` on every run rather than only on an otherwise clean audit, and state what the audit does not evaluate. - **#569** Name who trips the production ref gate, and state that a harness refusal is a different thing from the maintainer's permission and is not lifted by it. - **#571** Re-audit `ptr727/Blog` against the hugo type and bump the conformance matrix. - **#573** Scope the semicolon exemption to the sentence its list lives in, with the 44 newly reported occurrences recorded on #519 rather than swept here. - **#572** Exempt a verbatim section from the coordination-reference scan. ## Issues closed Fixes#562. Closes#565. The closing keywords sit on this promotion rather than on the feature pull requests, because GitHub fires them only on a merge into the default branch. #456, #558, #563, #567, and #570 are already closed against their merged fixes. ## Verification `git merge-tree` reports no conflict between `origin/main` and `origin/develop`, so this promotion needs no throwaway resolution branch. Every constituent pull request merged green with its review loop closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the false clean reported in #562:
scripts/pr_review.pyprintedsuppressed=0over a review body carrying### Suppressed comments (2), so the gate that decides whether a review round is answered reported a clean round over findings no thread will ever surface.Cause
The reviewer moved the section from its own
<details>wrapper to a markdown heading nested inside theReview detailswrapper, andsuppressed_blocks()missed it twice over:<summary>, which now readsReview details.DETAILS.sub('', body), which deletes every<details>block, including the one the heading now sits in.Fix
Each region (every wrapper's contents, plus what is left outside them all) is scanned line by line for the heading, so the section is found as its own wrapper's
<summary>, as a markdown heading nested inside another wrapper, or bare in the body. Neither old shape is retargeted away, since both appear across the rounds of a single pull request. A block now starts at its own heading, sofinding_count()reads the heading's own(N)rather than the wrapper's, which would have floored two findings to one.Verification
python3 -m unittest discover -s scriptspasses (247 tests), with four cases added for the nested shape: that it reports at all, that the count is the heading's own, that both shapes report together in one run, and that the neighbouring file-summary wrapper is still not read as a finding.Replayed over the reviewer's own bodies on the last seventeen pull requests of this repository, the new parse recovers 6 findings across 5 rounds that previously read as clean (on #546 and #561), and changes no count that was already right.
The runbook section in
.github/copilot-instructions.mdgains the same fact, since its rule to match more than one phrasing did not say the section also moves, and a filter reading a wrapper's<summary>reports zero on the nested shape.Related: #562