Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA
TypeScript
A granted follow-up check that confirmed its blockers fixed now counts once the rest are ruled (GST-3501) (#4691)
Garry Tan82cc62d829d0
diff --git a/changelog.d/fixed-findings-no-longer-block-the-follow-up-check.md b/changelog.d/fixed-findings-no-longer-block-the-follow-up-check.mdnew file mode 100644index 000000000..8ffde467d--- /dev/null+++ b/changelog.d/fixed-findings-no-longer-block-the-follow-up-check.md@@ -0,0 +1 @@+**A granted fix-check that confirmed its blockers fixed now counts once the remaining findings are ruled.** /ship's finish printed `FIX_CHECK: not counted (review has unresolved findings or did not finish clean)` whenever the fix-check row still listed the blockers it had just confirmed fixed: a finding the reviewer marked blocking held the row open even after it was fixed, and a fixed finding can't be ruled, so nothing could clear it (gbrain#10036). A blocking finding recorded as fixed or auto-fixed no longer needs a ruling; open, deferred, noted and skipped blockers still do. (GST-3501)diff --git a/docs/ship-policy.md b/docs/ship-policy.mdindex 728ff8190..513cc526a 100644--- a/docs/ship-policy.md+++ b/docs/ship-policy.md@@ -1858,7 +1858,9 @@ counts. That includes the usual order, where the fix-check finds a new CRITICAL,logs it `open` with `converged:false` and stops for the owner, and the owner rulesafterwards: the row's `incomplete` binding still names the one tree it read, soonce every blocking finding on it is ruled it binds at that tree as a clean read-(harness-evals#361, GST-2251). A CRITICAL with no ruling stays open, and while one+(harness-evals#361, GST-2251). A blocking finding the row records `fixed` or+`auto-fixed` needs no ruling, since a fixed finding cannot be ruled and already+reads resolved (gbrain#10036, GST-3501). A CRITICAL with no ruling stays open, and while onedoes, finish prints `FIX_CHECK_OPEN: <fingerprints> on the fix-check at <commit12>`naming the `gstack-approvals rule` command for each([troubleshooting](troubleshooting.md#fix-check-open)). On any stopped review row,@@ -1887,7 +1889,8 @@ file, not on the row, so `gstack-review-read` shows the file's findings on the r(`findings_from` names the file) while the file still derives the counts the rowrecorded. A Step 11 native row that lists no findings shows the findings of theStep 9 row of the same pass, commit and bound tree, because Step 9 carries Step-11's queued findings; rulings must then cover every blocker of that pass. A file+11's queued findings; rulings must then cover every blocker of that pass that is not recorded `fixed` or+`auto-fixed`. A filethat is missing or changed attaches nothing, and any row that claims issues butlists no findings reads `it lists no findings (fcount 0) but claims …` with thecause (harness-evals#515, GST-3296).diff --git a/docs/troubleshooting.md b/docs/troubleshooting.mdindex d735861ea..aa5abfc74 100644--- a/docs/troubleshooting.md+++ b/docs/troubleshooting.md@@ -7649,7 +7649,9 @@ through land. See [gate dispositions](ship-policy.md#gate-dispositions).**Meaning.** `gstack-ship-release finish` did not count a granted fix-checkbecause it still has findings no owner has ruled on that still hold it open. The line lists-their fingerprints and the fix-check's commit. A fix-check that found a new+their fingerprints and the fix-check's commit. A blocking finding the row+records `fixed` or `auto-fixed` never holds it open and needs no ruling+(GST-3501). A fix-check that found a newCRITICAL logs it `open` with `converged:false`, so `FIX_CHECK: not counted`reads `missing start capture or incomplete/nonconverged pass` until therulings exist. A `--review-loop-exception` does not help here: it acceptsdiff --git a/lib/review-evidence.ts b/lib/review-evidence.tsindex 9bcc11345..e18542087 100644--- a/lib/review-evidence.ts+++ b/lib/review-evidence.ts@@ -339,8 +339,12 @@ export const unresolvedFinding = (f: unknown) => record(f) && (f.action === 'ope((f.action === 'deferred' || f.action === 'noted') && (f.blocking === true || isCriticalFinding(f))) ||(!f.gate && isCriticalFinding(f) && isOpenByAction(f)));export const RULABLE = new Set(['open', 'skipped', 'noted', 'deferred']);-/** What a ruling must cover before rulings can clear a row: every unresolved finding and every one the reader marked blocking, whatever its action. */-export const holdsOpen = (f: unknown) => !record(f) || unresolvedFinding(f) || f.blocking === true;+/**+ * What a ruling must cover before rulings can clear a row: every unresolved finding and every one the reader marked blocking,+ * unless the reader recorded it fixed or auto-fixed. A fixed finding cannot be ruled, and a row with no rulings already reads it as resolved,+ * so holding it open left a fix-check that confirmed its blockers fixed uncountable (GST-3501, gbrain#10036).+ */+export const holdsOpen = (f: unknown) => !record(f) || unresolvedFinding(f) || (f.blocking === true && f.action !== 'fixed' && f.action !== 'auto-fixed');/*** GST-1537: the row (claimed, or derived with its file's findings shown, GST-3296) with each finding the owner ruled a disclosed note (`ruled`: fingerprints from approveddiff --git a/test/review-fixed-finding-ruled-row.test.ts b/test/review-fixed-finding-ruled-row.test.tsnew file mode 100644index 000000000..cffe2c9ce--- /dev/null+++ b/test/review-fixed-finding-ruled-row.test.ts@@ -0,0 +1,45 @@+/**+ * A fix-check row that read its granted fixes clean still read UNVERIFIED once the owner ruled its deferred findings+ * (GST-3501, gbrain#10036 at 8e0159ab): the blockers it confirmed fixed (action fixed, blocking true) held the row open, and a+ * fixed finding cannot be ruled, so finish printed FIX_CHECK: not counted forever. The row below is GBRA-732's own+ * review-fix-check row, trimmed to the fields reviewFreshness reads.+ */+import { describe, expect, test } from 'bun:test';+import { holdsOpen, reviewFreshness } from '../lib/review-evidence';++const TREE = '2a5e2ee1807a5ef0d58716dd3a45c01297bd92ab';+const finding = (fingerprint: string, action: string, extra: Record<string, unknown> = {}) =>+ ({ fingerprint, severity: 'CRITICAL', blocking: true, kind: 'defect', action, ...extra });+const fixCheckRow = (findings: Record<string, unknown>[]) => ({+ skill: 'review-fix-check', status: 'clean', issues_found: 0, critical: 0, informational: 0, status_source: 'claimed',+ completed: true, converged: true, commit: 'fa9a4537', commit_full: 'fa9a4537df7ad5fb4f05daeb160dd930f7df33be',+ range_base: '879d764c9e006c28e7799c99f7411a6a13939af0', grant: 'a-685e316454ff', tree: TREE, wtree: TREE,+ review_binding: { state: 'verified', start_wtree: TREE, end_wtree: TREE },+ findings,+});+const GBRA_732 = [+ finding('src/core/telemetry/client.ts:547:consent-race', 'fixed', { ledger_id: 'p3/outside-voice#1' }),+ finding('src/cli/main.ts:2864:telemetry-coverage', 'deferred', { ledger_id: 'p3/outside-voice#2' }),+ finding('src/core/telemetry/client.ts:349:attribution', 'deferred', { ledger_id: 'p3/outside-voice#3' }),+ finding('src/core/telemetry/endpoint.ts:18:env-trust', 'fixed', { ledger_id: 'p3/adversarial-native#2' }),+ { fingerprint: 'src/core/telemetry/client.ts:456:fix-check', severity: 'INFORMATIONAL', blocking: false, kind: 'defect', action: 'noted' },+];+const DEFERRED = new Set(['src/cli/main.ts:2864:telemetry-coverage', 'src/core/telemetry/client.ts:349:attribution']);++describe('a fixed blocker no longer holds a ruled fix-check row open (GST-3501)', () => {+ // Value: protects=a granted fix-check that confirmed its blockers fixed counts once the owner rules the deferred ones;+ // fails_when=holdsOpen keeps a fixed blocking finding open, so withoutRuledNotes never clears the row and it reads+ // UNVERIFIED (gbrain#10036: FIX_CHECK: not counted after every finding was fixed or ruled); why_new=no ruled-row case+ // mixed fixed and deferred blockers; seam=reviewFreshness -> withoutRuledNotes -> holdsOpen; no_claim=finish's chain walk+ test("GBRA-732's fix-check row reads CURRENT once its two deferred blockers are ruled", () => {+ expect(reviewFreshness(fixCheckRow(GBRA_732), TREE, DEFERRED)).toEqual({ status: 'CURRENT', reason: 'completed clean pass on unchanged content' });+ });++ // Value: protects=rulings still have to cover every blocker that is not fixed; fails_when=dropping the fixed exemption's+ // action check lets an unruled deferred or open blocker clear with the rest; seam=holdsOpen; no_claim=gate findings+ test('an unruled deferred blocker still holds the row open, and an open or skipped blocker still needs a ruling', () => {+ expect(reviewFreshness(fixCheckRow(GBRA_732), TREE, new Set(['src/cli/main.ts:2864:telemetry-coverage']))?.status).toBe('UNVERIFIED');+ for (const action of ['fixed', 'auto-fixed']) expect(holdsOpen(finding('a.ts:1:x', action))).toBe(false);+ for (const action of ['open', 'deferred', 'noted', 'skipped']) expect(holdsOpen(finding('a.ts:1:x', action))).toBe(true);+ });+});