You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(devx): give check:llms-txt the population it re-derives, not the artifact it guards (#13302)
check:llms-txt verifies packages/spec/llms.txt against trees elsewhere - the
*.zod.ts counts under packages/spec/src, the api-surface/ shards, the manifest
exports keys, and the non-private @objectstack/* workspace set - but reached
every one of them through join(PKG, ...), so the only repo-relative literal it
spelled was llms.txt itself.
scripts/pm/dispatch-gates.mjs derives a card's gate family by scanning each
gate's source for path literals, so it could name this gate only AFTER the
artifact had been edited, while every edit that falsifies it lands somewhere
else. Measured on PR #13186 across two rounds of one branch: deleting a src/
schema module moved src/kernel/ 32 -> 31 and the summed total 208 -> 207, the
derived family did not contain the gate, and the red reached CI instead of the
local sweep. The direction is the bad one - over-matching costs a wasted run,
this under-matched silently and the tool's output gave no signal.
Each input is now spelled repo-relative and joined onto ROOT, so the literals
stay load-bearing: the file opens exactly the paths it declares. The repo-root
workspace file and the per-package manifests, which cannot be spelled as
literals this file opens, are declared in the established <file>/** form that
check-doc-anchors and the pm line ratchet already use.
Case 21 of the gate's own self-test binds the declaration to the reads, and
earned that immediately: the first draft declared only packages/, and the case
caught apps/* and examples/* being workspace roots this gate also opens. It
derives the roots from the real pnpm-workspace.yaml rather than repeating a
list, so the next new root fails at the gate that reads it.
Thirteen pinned cases in the register's self-test hold both halves - the four
trees are reached, and nothing else is. Priced over the 232 commits this
checkout holds: the whole declared population matches 47 of them (20.3%), where
a blanket packages/** would have bought the "22 leads is the same as none"
failure the derivation's own header refuses.
Claude-Session: https://claude.ai/code/session_01KX8wnyjStaZcuMyAMNsy3N
Co-authored-by: Claude <noreply@anthropic.com>
// The reproduction, as a case: the falsifying edit alone names the gate.
7898
+
t('check:llms-txt reaches the schema tree its counts are derived from', llmsReaches('packages/spec/src/kernel/cluster.zod.ts'));
7899
+
// …and by a route that is NOT the artifact hint. This is the reproduction
7900
+
// itself: before this declaration the only hint covering anything was
7901
+
// `packages/spec/llms.txt`, so a src-only diff derived nothing.
7902
+
t('and by a route that is not the guarded artifact — the #13207 reproduction', llmsHints.some((h) => h !== 'packages/spec/llms.txt' && hintCovers(h, 'packages/spec/src/kernel/cluster.zod.ts')));
7903
+
t('it still reaches the artifact it guards', llmsReaches('packages/spec/llms.txt'));
7904
+
t('it reaches the api-surface shards every NAMED claim resolves against', llmsReaches('packages/spec/api-surface/data.json'));
7905
+
t('it reaches the manifest whose exports keys the SUBPATH claims resolve against', llmsReaches('packages/spec/package.json'));
7906
+
t('it reaches the repo-root workspace file it opens', llmsReaches('pnpm-workspace.yaml'));
7907
+
t('and the workspace manifests whose set is the package-ecosystem denominator', llmsReaches('packages/drivers/driver-mongodb/package.json'));
7908
+
// The negative half, and the load-bearing one. A population this broad is
7909
+
// one respelling away from the "22 leads is the same as none" failure the
7910
+
// header prices: `packages/spec` or `packages/**` would have bought the flip
7911
+
// too, and named this gate on nearly every card in the repo. These pin that
7912
+
// it bought the four trees it reads and NOTHING else — including the sibling
7913
+
// directories inside its own package.
7914
+
t('but claims no other file in its own package', !llmsReaches('packages/spec/docs/anything.md'));
7915
+
t('nor a sibling package source', !llmsReaches('packages/rest/src/analytics-dataset-dimension-gate.test.ts'));
7916
+
t('nor a content page', !llmsReaches('content/docs/deployment/cli.mdx'));
7917
+
t('nor an app source', !llmsReaches('apps/docs/components/ui/card.tsx'));
7918
+
t('nor an example', !llmsReaches('examples/app-crm/src/objects/lead.object.ts'));
7919
+
// A workspace manifest is reached; a workspace SOURCE file is not. This is
7920
+
// the pair that separates `packages/**\/package.json` from `packages/**`.
7921
+
t('and a package manifest is reached where its source is not', llmsReaches('packages/qa/dogfood/package.json') && !llmsReaches('packages/qa/dogfood/test/two-factor-lockout.dogfood.test.ts'));
7922
+
7872
7923
// The DIRECTORY half of the same class (#10107). A gate whose population is a
7873
7924
// top-level DIRECTORY spelled as a bare word is invisible for the same reason
7874
7925
// a root file is — `looksPathy` finds no separator, so the extractor builds no
0 commit comments