From 167a38887a252f5978ff688cbc825c77cb13d484 Mon Sep 17 00:00:00 2001 From: Aaron Stainback Date: Fri, 15 May 2026 16:15:12 -0400 Subject: [PATCH 1/2] fix(otto-279): role-refs not persona-names in tools/hygiene/audit-*.ts (9 hits) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up batch #3 to PR #3570 (.claude/ surfaces) and PR #3572 (docs/ surfaces). Same Otto-279 fix pattern applied to tools/hygiene/audit-*.ts code comments. Files: - tools/hygiene/audit-backlog-items.ts:505 (1 hit) - tools/hygiene/audit-lost-files.ts:103, 145, 166, 313 (4 hits) - tools/hygiene/audit-promotion-ledger.ts:551 (1 hit) - tools/hygiene/audit-trajectories.ts:204, 271, 363, 369 (4 hits — 3 flagged by audit + 1 line-wrapped variant audit didn't catch via regex) Pattern: `Per Codex 2026-05-06 review[ on PR #1702]: "..."` → `Per [PR #1702 ]review 2026-05-06: "..."`. Drops persona/tool name attribution; preserves PR-thread reference + temporal anchor. Per Otto-279 carve-out: "Per 2026-MM-DD" belongs on history surfaces only. Code-comment review attributions in tools/* count as code-surface, not history surface. Auditor verification: `bun tools/hygiene/audit-orphan-role-refs.ts` re-run shows 0 `Per Codex` hits in tools/hygiene/audit-*.ts after fix. Remaining (next-batch candidates): - tools/github/poll-pr-gate-batch.test.ts:9 `Per Aaron` (test comment) - tools/peer-call/append-identity-receipt.ts:307 `Per Copilot` (sibling class — Copilot is also tool-name-as-persona) - src/Core/Maji.fs + tests (orphan-ferry-refs — different fix pattern) Composes with: PR #3570 (.claude/ batch), PR #3572 (docs/ batch), tools/hygiene/audit-orphan-role-refs.ts (the detection tool), Otto-279 carve-out. Co-Authored-By: Claude Opus 4.7 (1M context) --- tools/hygiene/audit-backlog-items.ts | 2 +- tools/hygiene/audit-lost-files.ts | 8 ++++---- tools/hygiene/audit-promotion-ledger.ts | 2 +- tools/hygiene/audit-trajectories.ts | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/hygiene/audit-backlog-items.ts b/tools/hygiene/audit-backlog-items.ts index c5693ea7d..f3d459e49 100644 --- a/tools/hygiene/audit-backlog-items.ts +++ b/tools/hygiene/audit-backlog-items.ts @@ -502,7 +502,7 @@ async function reportMergedCandidates( "--json", "number,title", ]); - // Per Codex 2026-05-06 review on PR #1702: never silently swallow + // Per PR #1702 review 2026-05-06: never silently swallow // a non-zero exit. A failed gh call would otherwise scan zero PRs // and report no candidates -- identical to genuine cleanliness -- // hiding auth/network breakage. Surface the failure as a SKIP. diff --git a/tools/hygiene/audit-lost-files.ts b/tools/hygiene/audit-lost-files.ts index eed362ace..d6a87aa53 100644 --- a/tools/hygiene/audit-lost-files.ts +++ b/tools/hygiene/audit-lost-files.ts @@ -100,7 +100,7 @@ async function classClosedNotMergedPRs(ghAvailable: boolean): Promise { "--json", "number,title,closedAt,mergedAt,headRefName", ]); - // Per Codex 2026-05-06 review: never silently swallow a non-zero + // Per PR-review 2026-05-06: never silently swallow a non-zero // exit. A failed gh call would otherwise produce "Count: 0", which // looks identical to genuine cleanliness and hides auth/network // breakage. Surface the failure as a SKIP with the gh stderr. @@ -142,7 +142,7 @@ async function classOrphanBranches(ghAvailable: boolean): Promise { "--format=%(refname:short)", "refs/remotes/origin/", ]); - // Per Codex 2026-05-06 review on PR #1702: surface git failures + // Per PR #1702 review 2026-05-06: surface git failures // explicitly so the orphan-branch class isn't silently reported as // empty when origin/main is missing or the local repo is bare. if (refsResult.exitCode !== 0) { @@ -163,7 +163,7 @@ async function classOrphanBranches(ghAvailable: boolean): Promise { console.log(""); return; } - // Per Codex 2026-05-06 review: orphan-branch detection wants the + // Per PR-review 2026-05-06: orphan-branch detection wants the // OPEN-PR set ("which branches still have a live PR keeping them // attached"), not all-states. Closed/merged PRs do not block a // branch from being orphaned -- in fact, a closed-not-merged PR is @@ -310,7 +310,7 @@ async function classDraftPRs(ghAvailable: boolean): Promise { "--json", "number,title", ]); - // Per Codex 2026-05-06 review on PR #1702: never silently swallow + // Per PR #1702 review 2026-05-06: never silently swallow // a non-zero exit. A failed gh call would otherwise print "Count: 0" // -- identical to genuine cleanliness -- masking unreliable data. if (r.exitCode !== 0) { diff --git a/tools/hygiene/audit-promotion-ledger.ts b/tools/hygiene/audit-promotion-ledger.ts index 27c15645f..741fb5667 100644 --- a/tools/hygiene/audit-promotion-ledger.ts +++ b/tools/hygiene/audit-promotion-ledger.ts @@ -548,7 +548,7 @@ async function main(): Promise { console.log(` - line ${pf.lineNo}: ${pf.reason}`); } console.log(""); - // Per Codex 2026-05-06 review on PR #1702: parse failures in + // Per PR #1702 review 2026-05-06: parse failures in // an existing ledger MUST gate CI. The header documents exit // code 2 for an unparseable ledger; previously this branch only // returned 2 when the file was missing, so JSONL syntax corruption diff --git a/tools/hygiene/audit-trajectories.ts b/tools/hygiene/audit-trajectories.ts index a9e65efc0..512b1da15 100644 --- a/tools/hygiene/audit-trajectories.ts +++ b/tools/hygiene/audit-trajectories.ts @@ -201,7 +201,7 @@ async function axisCadenceWorkflows(ghAvailable: boolean): Promise { "--json", "conclusion,createdAt,status", ]); - // Per Codex 2026-05-06 review on PR #1702: surface gh failures + // Per PR #1702 review 2026-05-06: surface gh failures // explicitly so auth/network breakage doesn't masquerade as // "no recent runs" cleanliness. if (r.exitCode !== 0) { @@ -268,7 +268,7 @@ async function axisLintWorkflows(ghAvailable: boolean): Promise { "--json", "conclusion", ]); - // Per Codex 2026-05-06 review on PR #1702: surface gh failures + // Per PR #1702 review 2026-05-06: surface gh failures // so a non-zero exit isn't reported as "0 failures" cleanliness. if (r.exitCode !== 0) { console.log( @@ -360,13 +360,13 @@ async function axisRazorCadence(ghAvailable: boolean): Promise { "open", // Default page size is 30; explicit --limit prevents truncation // when the razor-cadence backlog grows past the default. Per - // Codex 2026-05-06 review on PR #1702. + // PR #1702 review 2026-05-06. "--limit", "200", "--json", "number,title,createdAt", ]); - // Per Codex 2026-05-06 review on PR #1702: never silently swallow + // Per PR #1702 review 2026-05-06: never silently swallow // a non-zero exit. A failed gh call would otherwise print "Count: 0" // -- identical to genuine cleanliness -- masking real cadence skips. if (r.exitCode !== 0) { From ba0c9f3779b147e8ee9d7d61212c587b5591c2ff Mon Sep 17 00:00:00 2001 From: Aaron Stainback Date: Fri, 15 May 2026 16:30:44 -0400 Subject: [PATCH 2/2] fix(otto-279): add PR #1702 number to ambiguous attribution comments (2 hits) Copilot thread PRRT_kwDOSF9kNM6Cd-oR: 'Per PR-review 2026-05-06' lacked the concrete PR number used elsewhere in the file. Normalised to 'Per PR #1702 review 2026-05-06' on lines 103 and 166 so grep-ability and traceability are consistent across all four occurrences. Co-Authored-By: Claude --- tools/hygiene/audit-lost-files.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hygiene/audit-lost-files.ts b/tools/hygiene/audit-lost-files.ts index d6a87aa53..97220b870 100644 --- a/tools/hygiene/audit-lost-files.ts +++ b/tools/hygiene/audit-lost-files.ts @@ -100,7 +100,7 @@ async function classClosedNotMergedPRs(ghAvailable: boolean): Promise { "--json", "number,title,closedAt,mergedAt,headRefName", ]); - // Per PR-review 2026-05-06: never silently swallow a non-zero + // Per PR #1702 review 2026-05-06: never silently swallow a non-zero // exit. A failed gh call would otherwise produce "Count: 0", which // looks identical to genuine cleanliness and hides auth/network // breakage. Surface the failure as a SKIP with the gh stderr. @@ -163,7 +163,7 @@ async function classOrphanBranches(ghAvailable: boolean): Promise { console.log(""); return; } - // Per PR-review 2026-05-06: orphan-branch detection wants the + // Per PR #1702 review 2026-05-06: orphan-branch detection wants the // OPEN-PR set ("which branches still have a live PR keeping them // attached"), not all-states. Closed/merged PRs do not block a // branch from being orphaned -- in fact, a closed-not-merged PR is