diff --git a/tools/substrate-claim-checker/fixtures.test.ts b/tools/substrate-claim-checker/fixtures.test.ts index 7a901ae92..d6cd6b126 100644 --- a/tools/substrate-claim-checker/fixtures.test.ts +++ b/tools/substrate-claim-checker/fixtures.test.ts @@ -13,6 +13,7 @@ import { describe, expect, test } from "bun:test"; import { join } from "node:path"; import { checkFile as checkCounts } from "./check-counts.ts"; +import { checkFile as checkExistence } from "./check-existence.ts"; const fixtures = join(import.meta.dir, "fixtures"); @@ -35,3 +36,22 @@ describe("eval-set fixtures / count drift", () => { expect(finding.claimIsMinimum).toBe(false); }); }); + +describe("eval-set fixtures / existence drift", () => { + test("existence-drift-missing-doc.md — backtick-quoted path that doesn't exist anywhere is detected", () => { + const result = checkExistence(join(fixtures, "existence-drift-missing-doc.md")); + expect(result.ok).toBe(true); + // Same PR #3611 discipline applied to existence-drift: exact count + // and pin the body claim's line so a regression in body-claim + // detection cannot be masked by an HTML-comment match. The fixture + // path is intentionally synthetic (won't be created accidentally), + // so the test stays stable across substrate evolution. + expect(result.findings.length).toBe(1); + const finding = result.findings[0]!; + expect(finding.line).toBe(24); + expect(finding.pathClaim).toBe( + "docs/_fixture_existence_drift_target_b0170_2026_05_15.md", + ); + expect(finding.severity).toBe("drift"); + }); +}); diff --git a/tools/substrate-claim-checker/fixtures/README.md b/tools/substrate-claim-checker/fixtures/README.md index 5cd8c0d70..b27eaafc7 100644 --- a/tools/substrate-claim-checker/fixtures/README.md +++ b/tools/substrate-claim-checker/fixtures/README.md @@ -22,6 +22,7 @@ axis. | Sub-class | Fixture | Anchor PR / history | Expected finding | |---|---|---|---| | count drift | `count-drift-9-vs-15.md` | PR #1259 (`review(pr-1257-postmerge): verify-then-claim count drift (9→18+) frontmatter + body + MEMORY.md`) | "9 drift instances" claim vs 15-row table | +| existence drift | `existence-drift-missing-doc.md` | PR #1252 — verify-then-claim memo body table instance #8 (`future-domain memo references docs/courier-ferry-protocol.md` / doesn't exist) | backtick-quoted synthetic path resolves at no candidate root | Add a new row when a new fixture lands. diff --git a/tools/substrate-claim-checker/fixtures/existence-drift-missing-doc.md b/tools/substrate-claim-checker/fixtures/existence-drift-missing-doc.md new file mode 100644 index 000000000..5ef4ee856 --- /dev/null +++ b/tools/substrate-claim-checker/fixtures/existence-drift-missing-doc.md @@ -0,0 +1,24 @@ + + +# Existence-drift catalogue (eval-set fixture) + +The drift instance below cites `docs/_fixture_existence_drift_target_b0170_2026_05_15.md` as the canonical source.