Commit 814db6d
`gen:docs` wrote `content/docs/references/<category>/meta.json` for every
category it iterated, including one whose page list came out empty. The result
was a directory holding a single `{ "title": …, "pages": [] }` and nothing else:
no reference page, no `index.mdx` (§2.5 already skipped that), and no entry in
the root `meta.json`, so the route could not resolve and the link checker never
saw it. Its one measurable effect was on whoever enumerated the tree — human or
agent — who counted one category more than the docs publish. That is exactly
how #7303 came to be filed.
`contracts/` was the standing case: it holds TypeScript service interfaces
rather than `.zod.ts` schemas, so `gen:schema` creates `json-schema/contracts/`
and leaves it empty. `conversions`/`migrations` have no schema directory at all
and `groupSchemasByPage` skips them outright, while `contracts` fell through to
the emit with zero pages. The `meta.json` emit is now guarded on the page list
being non-empty, mirroring the guard the category `index.mdx` emit already
carries, so all three now emit nothing and produce no directory.
The guard is on the page count, not on that schema-directory asymmetry, so a
future category in either shape lands the same way.
The directory is generated output (`content/docs/references/**` is routed
`merge=os-regen`), so it is removed here as the generator's output rather than
by hand: a hand delete alone reds `check:docs` with `+ .../contracts/meta.json
(missing — spec adds it)` and the next `gen:docs` restores it byte-for-byte.
The emitted file count goes 231 → 230 and `content/docs/references/` goes from
15 category directories to 14. `contracts/` is not `manageDir`'d (it has no
JSON Schema to regenerate from, so step 1 returns before claiming it), which is
why the generator cannot delete the file it no longer writes and the tracked
copy is dropped in this commit.
`contracts` stays declared in `scripts/lib/category-title.ts`: measured, not
assumed — `resolveCategoryTitles` is total over the directories under
`packages/spec/src/`, and removing the declaration stops the build while the
module's 84 source files exist.
Also drops the now-stale `contracts` row from the quick-reference
Categories-Without-a-Section table (leaving it reds
`check:quick-reference-counts` with "`contracts` is declared as having no
section, but content/docs/references/contracts/ does not exist") and the same
category from that gate's docblock prose. The Contracts Protocol pages
themselves are untouched — they live at `content/docs/kernel/contracts/`.
Fixes #7303
Claude-Session: https://claude.ai/code/session_017Mqbd23qE51QfBjgJv3Zsp
Co-authored-by: Claude <noreply@anthropic.com>
1 parent fe49d88 commit 814db6d
5 files changed
Lines changed: 59 additions & 14 deletions
File tree
- .changeset
- content/docs
- getting-started
- references/contracts
- packages/spec/scripts
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | 244 | | |
246 | 245 | | |
247 | 246 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
840 | 858 | | |
841 | 859 | | |
842 | | - | |
| 860 | + | |
843 | 861 | | |
844 | 862 | | |
845 | 863 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
0 commit comments