diff --git a/tests/unit/check-docs-symbols.test.ts b/tests/unit/check-docs-symbols.test.ts index eab0d442ac..40ae9b7b40 100644 --- a/tests/unit/check-docs-symbols.test.ts +++ b/tests/unit/check-docs-symbols.test.ts @@ -156,8 +156,11 @@ test("collectRouteFiles finds the real route tree (non-empty, all route.ts)", () for (const f of files) assert.match(f, /route\.tsx?$/); }); -test("KNOWN_STALE_DOC_REFS is a frozen, documented allowlist (non-empty)", () => { - assert.ok(allowlist.size > 0); +test("KNOWN_STALE_DOC_REFS is a frozen, documented allowlist (/api/ paths; may be empty)", () => { + // The allowlist legitimately empties once every previously-stale ref is fixed — v3.8.46 + // removed the last two entries (/api/chat, /api/settings/tunnels) because the gate's + // stale-enforcement flagged them as no longer suppressing a live miss. The structural + // invariant is only that any present entry is an /api/ path (not a minimum count). for (const p of allowlist) assert.match(p, /^\/api\//); }); @@ -183,7 +186,8 @@ test("stale-enforcement: all current KNOWN_STALE_DOC_REFS entries look like /api // Structural invariant: every allowlist entry must be an /api/ path, not a file path // or a prose snippet. Live staleness is enforced at gate runtime by assertNoStale(). const al = allowlist as Set; - assert.ok(al.size > 0, "KNOWN_STALE_DOC_REFS should be non-empty"); + // May be empty once all stale refs are fixed (v3.8.46); the invariant is structural — + // any present entry is an /api/ path — not a minimum count. for (const entry of al) { assert.match(entry, /^\/api\//, `every allowlist entry must start with /api/: ${entry}`); }