Filed on landing #197 (6505ac1, PR #281). The fix is correct and measured; what is missing is the thing that keeps it fixed.
The gap, stated as a failure mode rather than a worry
The pin is keyed to an exact version: pnpm.patchedDependencies names fumadocs-core@16.8.12. Two outcomes on a version change, and only one of them is loud:
| change |
what happens |
| the patch file no longer applies to the same version |
pnpm install exits 1, ERR_PNPM_PATCH_FAILED. Loud. CI red. |
| the version moves |
the pin simply does not match, no patch is applied, install succeeds, and 67 numeric character references plus 4 malformed link targets come back into the served bodies with nothing red anywhere |
The second is not hypothetical and it is not distant: #239 is open right now, bumping this exact package 16.8.12 → 16.15.2, and the defect is present in 16.15.2 (measured on the card, by unpacking the tarball). Merging it on green would silently undo #197.
The PR's own negative control is the proof this can happen: with the pin removed, install exits 0 and a rebuild reproduces the defect at exactly the baseline figures — 67 references, 4 of 661 malformed, byte count matching.
What the gate should assert
Read the built bodies — apps/docs/.next/server/app/llms-full.txt.body and the 79 .body files under llms.mdx/ — and fail on either:
- any HTML numeric character reference, and
- any malformed markdown link target (an opener whose target does not close with a literal
) before whitespace).
Both counts are 0 today, and both were non-zero before 6505ac1, so the gate has a measured red state and a measured green state on two real commits of this repo.
Assert both, not only the references. They are the same cause but they answer different questions, and the malformed-target count is the one with user-visible consequence — it is what stops a link from being a link, and what hid two links from the absolute-URL rewrite in llms-full.txt/route.ts.
⛔ The gate must be able to fail, and must prove it
This repo's standing rule: a probe that cannot fail is indistinguishable from one that passed. The four gates already in ci.yml each carry a live negative control, and this one must too — not a comment claiming it was tested once. Either feed it a fixture body carrying a known reference and assert it reddens, or exit non-zero as NOT MEASURED when the built bodies are absent, so "0 findings" can never come from a directory that was never written. Say in the log which of the two happened.
Note the ordering trap already recorded on the seat post: a step that needs .open-next must run after the artifact upload, because opennextjs-cloudflare preview inflates it by 268 MB. This gate reads .next, not .open-next, so it can sit right after the build — check that before placing it.
Scope
.github/scripts/ (new check) and .github/workflows/ci.yml (one step). ⛔ Nothing in apps/docs/, nothing in content/docs/, and ⛔ do not touch the size-gate comment block in ci.yml — it is a frozen snapshot (#277).
⚠️ Every edit to ci.yml publishes the production site on merge.
Sequencing
Ahead of #239. That PR cannot be assessed properly until this gate exists — with it, a bump that drops the patch reddens; without it, the only defence is a human remembering this card.
Filed on landing #197 (
6505ac1, PR #281). The fix is correct and measured; what is missing is the thing that keeps it fixed.The gap, stated as a failure mode rather than a worry
The pin is keyed to an exact version:
pnpm.patchedDependenciesnamesfumadocs-core@16.8.12. Two outcomes on a version change, and only one of them is loud:pnpm installexits 1,ERR_PNPM_PATCH_FAILED. Loud. CI red.The second is not hypothetical and it is not distant: #239 is open right now, bumping this exact package 16.8.12 → 16.15.2, and the defect is present in 16.15.2 (measured on the card, by unpacking the tarball). Merging it on green would silently undo #197.
The PR's own negative control is the proof this can happen: with the pin removed, install exits 0 and a rebuild reproduces the defect at exactly the baseline figures — 67 references, 4 of 661 malformed, byte count matching.
What the gate should assert
Read the built bodies —
apps/docs/.next/server/app/llms-full.txt.bodyand the 79.bodyfiles underllms.mdx/— and fail on either:)before whitespace).Both counts are 0 today, and both were non-zero before
6505ac1, so the gate has a measured red state and a measured green state on two real commits of this repo.Assert both, not only the references. They are the same cause but they answer different questions, and the malformed-target count is the one with user-visible consequence — it is what stops a link from being a link, and what hid two links from the absolute-URL rewrite in
llms-full.txt/route.ts.⛔ The gate must be able to fail, and must prove it
This repo's standing rule: a probe that cannot fail is indistinguishable from one that passed. The four gates already in
ci.ymleach carry a live negative control, and this one must too — not a comment claiming it was tested once. Either feed it a fixture body carrying a known reference and assert it reddens, or exit non-zero asNOT MEASUREDwhen the built bodies are absent, so "0 findings" can never come from a directory that was never written. Say in the log which of the two happened.Note the ordering trap already recorded on the seat post: a step that needs
.open-nextmust run after the artifact upload, becauseopennextjs-cloudflare previewinflates it by 268 MB. This gate reads.next, not.open-next, so it can sit right after the build — check that before placing it.Scope
.github/scripts/(new check) and.github/workflows/ci.yml(one step). ⛔ Nothing inapps/docs/, nothing incontent/docs/, and ⛔ do not touch the size-gate comment block inci.yml— it is a frozen snapshot (#277).ci.ymlpublishes the production site on merge.Sequencing
Ahead of #239. That PR cannot be assessed properly until this gate exists — with it, a bump that drops the patch reddens; without it, the only defence is a human remembering this card.