docs(specs): serve parents_count on the manifest detail only

Why

Counting a child's parents means reading every index entry that child has, so no statement shape reaches the 100 ms query budget at the ceiling: measured on a hundred-child page at 2,500,000 edges, an unbounded parents_count costs 386 ms whether it comes from a window function, a lateral subquery, or a query of its own, against 3 ms on that same fixture for the bounded preview alone.

The ruling takes parents_count off the manifests list and leaves it on the detail, where it is the length of the parent_digests the same response carries and costs nothing. The list keeps parents_preview, now ten index entries per manifest with no count beside it, which is what the Referenced-by link on a child's row needs.

Two alternatives were rejected and are recorded with their figures. A count capped at 1,001 per manifest costs 26 ms and clears the budget, and it turns the field into "1,000 or more" for every manifest past the cap. A maintained counter is a write on the relationship table on every index push and every manifest delete, for a number one list row renders.

Test plan

mise run lint:docs. markdownlint and lychee report no errors, and Vale's alert set over the file is unchanged from main's, 0 errors and 264 warnings on both sides.

🤖 Generated with Claude Code

Related to #1150

Edited by Hayley Swimelar

Merge request reports

Loading
Loading