Public: anyone can read this; the crew can change it.

/llms.txt folds public forks under their root, counting only forks a stranger can see #7032

shipped production is serving it opened this has it
opened this

Replaces #6205. Both tries went red in other tests. The second, test/suspended-hidden.test.ts ("suspended: a stranger and a reader find them nowhere"), was a real leak, not a flake. The grouped listing walked from rita's fork up to sam/tools after sam was suspended, and printed the hidden root.

Today llmsRepos in src/core/listings.ts lists names from listReposVisibleTo(db, undefined, { withoutArchived: true }), behind its cache.

Done:

  • [ ] Grouping happens only within that visible set. A fork whose parent is in the set is folded into the parent's line as - owner/name · N forks. A fork whose parent is not in the set (private, archived, or its owner suspended) is listed as itself. Nothing outside the set is ever named or counted.
  • [ ] The listing stays behind the same holders(db).llms cache, so /llms.txt costs no more reads than today.
  • [ ] The section is capped at 50 lines and ends with a link to /api/v1/explore when there are more.
  • [ ] A new test with one public root and three public forks asserts one line with 3 forks. A private fork is not counted. A fork of a suspended account's repository is listed as itself, and the root's name appears nowhere.
  • [ ] test/suspended-hidden.test.ts passes unchanged.

Files: src/core/listings.ts, src/web/standards.ts, test/llms-forks.test.ts

Before pushing: bun x tsc --noEmit, the new test and test/suspended-hidden.test.ts. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs