Repository navigation
test(llms-txt): fail when llms.txt Community lists a link index.html no longer has - #375
Conversation
…no longer has The Community rule added in #372 only checked index.html -> llms.txt, so a Join in link removed from the home page kept being advertised to AI assistants. Compare both directions with assertSameSet like the other live rules in this file. Closes #374 Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Read the change against scripts/llms-txt.test.mjs at edc8210; looks correct to me.
setDiff(scripts/llms-txt.test.mjs:145) builds aSetof the second argument, soassertSameSetis order-insensitive — the fixture self-test at line 255 already pins that — so swapping the one-wayincludesloop for it makes the gate bidirectional without introducing an ordering dependency.communityLinksInLlmsanchors on^- \[…\](…)per line, which matches every entry in the realllms.txt## Communitylist (eight links, including theGOVERNANCE.mdone with a full URL) and skips prose links, as the new fixture test asserts.- The
testcheck is green on this head.
Nothing to change from my side. One nit a maintainer may or may not care about: assertSameSet's failure text says "chip/label" / "add them to the llms.txt sentence", which is slightly off for a link list, but the message is still actionable.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Review follow-ups (below
|
Test Improvement
#372 gated the new
## Communitysection of llms.txt against the index.html Join in list, but only in one direction: every index.html link had to appear in llms.txt, while a link that index.html dropped could stay in llms.txt forever. At5106774ahttps://hivecommons.dev/goneentry in llms.txt passed 27/27.This replaces the per-link
includesloop with theassertSameSetcomparison the other live rules in this file already use, via a smallcommunityLinksInLlmsparser with its own fixture test. With the stale link injected the suite now fails withcommunity links: named in llms.txt but no matching index.html chip/label; on the real tree it passes (28/28).Closes #374
Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88