From 1b9f49b07f051fb1d8715468ca68985100b1b8d0 Mon Sep 17 00:00:00 2001 From: Scott Hall Date: Sat, 17 Oct 2026 16:31:13 -0500 Subject: [PATCH 1/2] wiki lint: an all-digit token of more than eight digits is unchecked, not a dead commit GitHub comment ids and Actions run ids (6117924849, 37118736851) matched the sha pattern and every one read as a dead commit. On the 2026-10-17 lint report 109 of 177 unique dead commit tokens were all digits, and none sampled resolved as a commit on GitHub (wiki event 20261017T191602866Z-e4idhk). They now count as unchecked, beside the eight-digit date case. A short hex sha and an eight-digit non-date are still looked up; a test controls both. Proposed PR title: wiki lint: count comment and run ids as unchecked, not dead evidence --- scripts/wiki/lint.ps1 | 11 ++++++++--- tests/test_wiki_lint.py | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/scripts/wiki/lint.ps1 b/scripts/wiki/lint.ps1 index 9160373..da962f7 100644 --- a/scripts/wiki/lint.ps1 +++ b/scripts/wiki/lint.ps1 @@ -26,9 +26,9 @@ repository the evidence can cite: a citation from a repository left off the list reads dead. EVIDENCE LINT CANNOT CHECK IS COUNTED AS UNCHECKED, never as passing and never as dead: an Owner - ruling, a `memory:` source, any citation when no -EvidenceRepo is given, and a pull request - without -Online. The report prints the count, so a zero dead count over nothing checked cannot - be read as clean. + ruling, a `memory:` source, any citation when no -EvidenceRepo is given, a pull request + without -Online, and an all-digit token of more than eight digits (a comment or run id). The + report prints the count, so a zero dead count over nothing checked cannot be read as clean. PROMOTION IS LISTED, NEVER ACTED ON. Drafting the playbook pull request is the scheduled Claude Code job's work. It opens that pull request as a DRAFT titled `wiki promotion: ` from a @@ -290,6 +290,10 @@ function Get-LintCitation { if ($v -match '^\d{8}$' -and [datetime]::TryParseExact($v, 'yyyyMMdd', [cultureinfo]::InvariantCulture, [System.Globalization.DateTimeStyles]::None, [ref]$d) -and $d.Year -ge 1990 -and $d.Year -le 2100) { & $take $m @{ Kind = 'ambiguous'; Text = $v } + } elseif ($v -match '^\d{9,}$') { + # More than eight digits and no letter is a GitHub comment or Actions run id far more often + # than a commit: 109 of 177 dead commit tokens in the 2026-10-17 report, none sampled a commit. + & $take $m @{ Kind = 'digitid'; Text = $v } } else { & $take $m @{ Kind = 'commit'; Text = $v } } @@ -404,6 +408,7 @@ foreach ($c in $cites) { 'owner' { Add-Unchecked 'Owner ruling'; continue } 'url' { Add-Unchecked 'URL that names no pull request or commit'; continue } 'ambiguous' { Add-Unchecked 'eight digits that read as a date as well as a commit'; continue } + 'digitid' { Add-Unchecked 'more than eight digits, read as a comment or run id rather than a commit'; continue } 'ledger' { Add-Unchecked 'a ledger or ADR number, not a pull request'; continue } 'unrecognised' { Add-Unchecked 'no citation lint can parse'; continue } 'commit' { diff --git a/tests/test_wiki_lint.py b/tests/test_wiki_lint.py index 93e4d42..2d29f25 100644 --- a/tests/test_wiki_lint.py +++ b/tests/test_wiki_lint.py @@ -335,6 +335,20 @@ def test_an_all_digit_date_is_not_called_a_dead_commit(self): doc = self.lint_json() self.assertEqual((1, 0, 1), (doc["evidence"]["resolved"], doc["evidence"]["dead"], doc["evidence"]["unchecked"])) + def test_a_comment_or_run_id_is_unchecked_not_a_dead_commit(self): + """Measured 2026-10-17: 109 of 177 dead commit tokens were all digits, none a commit.""" + self.log(2, key="d/ids", evidence="comment 6117924849, run 37118736851, see " + self.sha) + doc = self.lint_json() + self.assertEqual((1, 0, 2), (doc["evidence"]["resolved"], doc["evidence"]["dead"], doc["evidence"]["unchecked"])) + self.assertEqual(2, sum(n for why, n in doc["evidence"]["unchecked_by_reason"].items() if "run id" in why)) + + def test_control_a_missing_short_hex_sha_and_eight_non_date_digits_are_still_dead(self): + e = self.log(2, key="d/hex", evidence=f"{MISSING_SHA[:9]} and 12345678") + doc = self.lint_json() + self.assertEqual(sorted([f"dead-evidence:{e['id']}:{MISSING_SHA[:9]}", f"dead-evidence:{e['id']}:12345678"]), + sorted(f["id"] for f in doc["findings"])) + self.assertEqual(0, doc["evidence"]["unchecked"]) + class Online(_LintCase): """-Online asks `gh pr view`. A stand-in `gh` first on PATH answers CLOSED for 13, MERGED for From 57cb58bbaf149dda7278b2d5696be38f6766b03d Mon Sep 17 00:00:00 2001 From: Scott Hall Date: Sat, 17 Oct 2026 16:44:53 -0500 Subject: [PATCH 2/2] wiki lint: still look up an all-digit token, and call it unchecked only when it resolves nowhere Review round 1 found the first cut skipped git for every nine-plus digit token. A real all-digit short sha then read unchecked, and the test fixture's ten-character sha is all digits about one run in a hundred, which made the suite flake. The token is now batch-checked like a commit: resolved when git finds it, unchecked (never dead) when not. An all-digit ref in a ref:path is no longer called a dead commit either. Tests pin the nine-digit boundary, the ref:path case, and a tag named by digits that resolves. tests/README.md names the new case. Proposed PR title: wiki lint: count comment and run ids as unchecked, not dead evidence --- scripts/wiki/lint.ps1 | 25 ++++++++++++++++--------- tests/README.md | 2 +- tests/test_wiki_lint.py | 17 +++++++++++++---- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/scripts/wiki/lint.ps1 b/scripts/wiki/lint.ps1 index da962f7..fc4ed78 100644 --- a/scripts/wiki/lint.ps1 +++ b/scripts/wiki/lint.ps1 @@ -27,8 +27,9 @@ EVIDENCE LINT CANNOT CHECK IS COUNTED AS UNCHECKED, never as passing and never as dead: an Owner ruling, a `memory:` source, any citation when no -EvidenceRepo is given, a pull request - without -Online, and an all-digit token of more than eight digits (a comment or run id). The - report prints the count, so a zero dead count over nothing checked cannot be read as clean. + without -Online, and an all-digit token of more than eight digits that resolves as no commit + (a comment or run id). The report prints the count, so a zero dead count over nothing checked + cannot be read as clean. PROMOTION IS LISTED, NEVER ACTED ON. Drafting the playbook pull request is the scheduled Claude Code job's work. It opens that pull request as a DRAFT titled `wiki promotion: ` from a @@ -237,6 +238,10 @@ foreach ($k in $byKey.Keys) { # ------------------------------------------------------------------------------------ 2. dead evidence $shaRx = [regex]'\b(?=[0-9a-f]*[0-9])[0-9a-f]{7,40}\b' +# More than eight digits and no letter is a GitHub comment or Actions run id far more often than a +# commit (wiki event 20261017T191602866Z-e4idhk). It is still looked up, so a real all-digit short +# sha resolves; one that resolves nowhere is unchecked rather than dead. +$digitIdRx = [regex]'^\d{9,}$' $refPathRx = [regex]'(?