From cc08eb7a3885fb517b94e1e0eda9ed7f46e8a2c2 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 31 Jul 2026 10:29:52 -0700 Subject: [PATCH 1/2] 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. 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) --- scripts/README.md | 16 +++++---- scripts/pr_review.py | 35 ++++++++++++++++-- scripts/test_pr_review.py | 75 +++++++++++++++++++++++++++++++++++++-- 3 files changed, 114 insertions(+), 12 deletions(-) diff --git a/scripts/README.md b/scripts/README.md index b4ab767d..3ad927fb 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -2,11 +2,11 @@ Local checks and tooling this repo runs by hand, with the deterministic ones also gating CI. Each one exists because the CI linters pass on the failure it catches: `markdownlint`, `cspell`, `actionlint`, and `editorconfig-checker` all report clean on prose that breaks a documented [`GOVERNANCE.md`][governance] rule. Doc linters stay out of the pre-commit hook, which runs language formatting only so it stays fast. -**Hub-only, not carried.** These are not declared in [`spec/files.json`][files], so the audit does not expect a downstream repo to ship them - the same footing as `spec/audit.py`. Promoting one to fleet-carried is a deliberate act: declare it in the baseline and vendor it, per [`spec/section-model.md`][section-model]. +**Hub-only, not carried.** These are not declared in [`spec/files.json`][files], so the audit does not expect a downstream repo to ship them, the same footing as `spec/audit.py`. Promoting one to fleet-carried is a deliberate act: declare it in the baseline and vendor it, per [`spec/section-model.md`][section-model]. Python only, standard library only, no third-party packages. Every script is read-only and exits non-zero on a finding. -Each script has a `test_