From b2c23f724ba4503cba2907c2467a8317df342993 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Sun, 13 Sep 2026 08:46:08 +0000 Subject: [PATCH] spec-discovery test: accept a landing-page link in llms.txt, still require the docs URL Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01RZV4zJ2pDZLNN3kE5jFCmV --- apps/logicsrc-web/contract/spec-discovery.contract.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/logicsrc-web/contract/spec-discovery.contract.test.ts b/apps/logicsrc-web/contract/spec-discovery.contract.test.ts index de6519c..96ffca8 100644 --- a/apps/logicsrc-web/contract/spec-discovery.contract.test.ts +++ b/apps/logicsrc-web/contract/spec-discovery.contract.test.ts @@ -20,7 +20,12 @@ describe.each([ }); it("includes a reachable docs URL and the full contract in the LLM feeds", async () => { - expect(await llms().text()).toMatch(new RegExp(`\\[${name}\\]\\(https://[^)]+/docs/${slug}\\)`)); + // A spec with a landing page is linked there and cites its docs URL after + // it; a docs-only spec is linked straight to /docs/. Both must name + // the docs URL somewhere on the line. + const text = await llms().text(); + expect(text).toMatch(new RegExp(`\\[${name}\\]\\(https://[^)]+/(docs/)?${slug}\\)`)); + expect(text).toContain(`/docs/${slug}`); expect(await llmsFull().text()).toContain(readDoc(slug)!.trim()); });