Report the suppressed findings the thread poll cannot see - #477
Merged
Conversation
The merge gate counts a review body's collapsed low-confidence block as an outstanding finding, but the digest read reviewThreads alone, where that block never appears, so the one command written to answer "is this PR clean" reported clean while findings stood. The gate depended on remembering to run a second query by hand, which is what failed the last time it mattered. Q_FULL now carries each review's body, and the digest reports suppressed=N for the blocks on the current head, so a finding answered before a push does not re-open after it. Q_LIVE is untouched: a liveness poll still fetches two scalars. Each block prints whole where a thread body truncates at 160, since a thread can be re-read at its id and a suppressed finding has no thread, and it prints under a marker naming what closing it takes. The pattern is the runbook's alternation rather than one phrasing, and a case asserts it is the published one rather than a copy that can drift. A body naming the block outside a details wrapper reports whole, because reporting zero when the markup moves is the same false clean one level up. Verified against the real bodies on PR #473, whose per-file summary block sits beside the suppressed one and is not reported as a finding. The scripts README's own spaced hyphens are corrected in passing, per the rule that a warn-only class leaves a hub-only file as it is next edited. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the repo’s Copilot PR-review polling tooling by extracting and reporting “suppressed / low confidence” findings that appear only inside review-body <details> blocks (and therefore are invisible to reviewThreads polling), aligning the script’s behavior with the PR review etiquette/runbook expectations.
Changes:
- Extend
scripts/pr_review.pyto fetch review bodies in the full query and emit suppressed-finding blocks in the digest output (scoped to reviews on the current head SHA). - Add targeted unit tests covering suppressed-block detection, scoping to head, and non-finding
<details>blocks. - Document the new
suppressed=digest behavior inscripts/README.md(plus small prose formatting fixes).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/pr_review.py | Adds review-body parsing to detect and print suppressed findings in the digest output. |
| scripts/test_pr_review.py | Adds test coverage for suppressed findings parsing and reporting behavior. |
| scripts/README.md | Documents suppressed-findings reporting and updates related prose/list formatting. |
Copilot's review found the first half: suppressed= counted blocks, so a body heading "Suppressed comments (2)" reported 1 and read as a single finding. The count now comes from the heading's (N), summed across the rounds on the head, floored at one so a block never reports as zero and reads as a clean pass. Running the tool on its own PR found the second half. The match was against the whole body, so this PR's review, whose overview prose discusses suppressed and low confidence findings while carrying none, reported suppressed=1. The match is now on the block's heading, taken from its <summary>. Prose that merely names the phrase is not a finding, and a field that cries wolf trains the reader to skim it. The markup-moved fallback survives, since reporting zero when the wrapper changes is the same false clean, but it now reads only the text outside the details blocks and requires a heading carrying a count. Verified against the live bodies on both PRs: #473 reads one finding from its real block, and #477 now reads zero. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ptr727
added a commit
that referenced
this pull request
Jul 31, 2026
…479) Forward promotion of four commits. `main` carries no content beyond the merge-base (`f7c77d8`, #473), so this is a clean forward merge with no conflicts. ## What promotes - **#475 - Gate US English spelling where cspell does not reach.** The cspell gate reads README and HISTORY only, so a British spelling anywhere else in the tree had nothing checking it. The `spelling` rule generates its banned words from stems rather than listing them one by one, since an inflected spelling is as wrong as its base and a hand-listed family drifts. - **#476 - Sweep the spaced-hyphen prose class out of the carried docs.** All seven carried documents to zero: `GOVERNANCE.md` 219, `CODESTYLE.md` 53, `WORKFLOW.md` 51, `.github/copilot-instructions.md` 40, `AUDIT.md` 29, `repo-config/README.md` 20, `AGENTS.md` 3. The remaining ~538 are hub-only (`reports/`, `docs/`, `spec/*.md`, `STANDUP.md`, `catalog/`), stay warn-only, and are corrected as each file is next edited, which works because nothing vendors them. - **#477 - Report the suppressed findings the thread poll cannot see.** The merge gate counts a review body's collapsed low-confidence block as an outstanding finding, but the digest read `reviewThreads` alone, where that block never appears, so the one command written to answer "is this PR clean" reported clean while findings stood. - **#478 - Sweep the semicolon prose class out of the carried docs.** The exemption is fixed first (list-wide comma, per-table-cell scoping, bullet-label colon), then 44 genuine clause joins recast across five files. All six remaining carried files reach zero, the bar `GOVERNANCE.md` already met. ## Verification on the merged `develop` Both prose classes report zero across all seven carried documents. The full 180-case script suite, `scripts/repo_gate.py`, `spec/validate.py`, and `spec/audit.py --selftest` pass. The blocking prose run (charset, dupword, spelling) is clean tree-wide, markdownlint reports 0 issues over 39 files, and editorconfig-checker is clean. cspell's gated scope (README + HISTORY) is clean; the tree-wide backlog is unchanged. ## Release A human merge never auto-publishes, so this fires no release, as designed. The latest release stays `2.0.108`. ## Re-vendor debt This promotion changes prose in all seven carried documents, so every downstream repo goes further out of date against canonical. That debt is pre-existing and still untracked - no issue covers it and filing one has not been authorized. `spec/audit.py --branch <ref>` checks a repo's convergence before it promotes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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 free
to 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.
What
scripts/pr_review.pynow reads each review's body and reports the collapsed low-confidence findings thereviewThreadspoll cannot see.Q_FULLcarriesbodyon each review.Q_LIVEis untouched, so a liveness poll still fetches two scalars.suppressed=N, counting the blocks carried by a review on the current head, so a finding answered before a push does not re-open after it.SUPPRESSED:marker naming what closing it takes, because a suppressed finding has no thread to reply on or resolve.Why
GOVERNANCE.md merge-gate condition 3 counts these as outstanding findings, and the runbook says to read them, but the one command written to answer "is this PR clean" polled threads only. That made the gate depend on remembering to run a second query by hand.
Details worth reviewing
Suppressed comments|low confidence) rather than one phrasing, since the heading has already appeared two ways. A contract case asserts the script's pattern is the alternation the runbook publishes, rather than a copy that can drift.<details>wrapper is reported whole. Reporting zero because the markup moved would be the same false clean, one level up.<details>sits beside the suppressed one and is correctly not reported.scripts/README.mddocuments the behavior, and its own six spaced hyphens are corrected in passing, per the rule that a warn-only class leaves a hub-only file as it is next edited.Checks
python3 -m unittest discover -s scripts= 175 pass (test_pr_review.py18 -> 25).scripts/prose_lint.py --diff origin/develop,scripts/repo_gate.py,spec/validate.py,spec/audit.py --selftest, editorconfig-checker and markdownlint all clean.