Repository navigation
docs(cli): state the package-docs search as the any-depth rule it is - #21013
Conversation
The ADR-0130 paragraph in deployment/cli.mdx described per-package docs collection as one level under src/. The collector now finds each package's directory from the packages the artifact registers, at any depth: restate the depth rule, where the search stops, the no-packages case, and the three cases that end in the uncollected-directory warning (none, more than one, and one package answering to more than one docs directory). Claude-Session: https://claude.ai/code/session_01JAhu8u8QfBvRjVZDox7CP9 Co-authored-by: Claude <noreply@anthropic.com>
"stops at the first directory that names one" read as one package only; a directory naming two declared packages stops the search as well, so say "any of them". Reflow the paragraph. Claude-Session: https://claude.ai/code/session_01JAhu8u8QfBvRjVZDox7CP9 Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: PR #21013 (card #19525), head ① Derived judgmentsAccept set and public surface: no code, schema, export or CLI behaviour moves. The published surface that moves is the page's description of what
Removed or narrowed text — nothing true is lost. The old closing sentence (none / more than one is still not read; the warning names the files it skipped and the spellings it tried; never a silent Over-claims — none found. Every sentence of the new paragraph names behaviour the collector performs. The page says nothing about The card's table had two rows the collector does not support (row 3: the warning is not only "when the search finds nothing" — an intermediate directory's own Page gates: the placeholders stay inside inline code throughout; the new bullet list is set off by a blank line. On the head, ② Semver level
Check-runs on the head: 36 — 26 Governed surfaces: none in the file list. ③ Boundary flags
Dispatch surface check: the claim ( The dev report's Implemented-by: VERDICT: PASS |
Fixes #19525
Clause-②: no
What changed
Docs only:
content/docs/deployment/cli.mdx, the ADR-0130 paragraph underos compile(one paragraph; no code, nocontent/docs/releases/**, no governed surface).The paragraph described per-package docs collection as
src/PKG/docs/, one level undersrc/. Since PR #19492 (0e671d20) the collector finds each package's directory from the packages the artifact registers, at any depth. No sentence on the page was false; it was narrower than the rule. The rewrite:id/ last-dot-segment matching, and the displaynamenot being a directory key;src/PKG/docs/andsrc/packages/PKG/docs/are one case);node_modules) and stops at the first one that names any of them. Everything under that root is the package's own source, so a deepersrc/PKG/components/docs/is neither read nor reported;packages[]case: nothing to search for, so docs are read fromsrc/docs/alone and a one-levelsrc/DIR/docs/is reported, not read;src/packages/included), a directory naming more than one, and the new refusal of one package that answers to more than one docs directory (neither is read; each warning names the others).Each behaviour against the source, not the card
Read at
origin/maina5bce40888(packages/cli/src/utils/collect-docs.ts), then measured.packageDirectoryCandidatesdocblock: "derived from the packages the artifact REGISTERS rather than from a fixed depth undersrc/";walkrecurses only into a directory with no owners, and only when the artifact declares packagessrc/a/b/orders/docscollected)node_modulesentry.name !== 'node_modules'on the descent conditionsrc/node_modules/orders/docs: nothing collected, no issue)docs/neither read nor reportedowners.length === 0issuesis[]); probe P4 (an ambiguous directory stops the search too)packages[]⇒ one level, reported not readrefs.length === 0branch emitsuncollectedDocsMessageidand its last dot segment, notnamedocsPackageRefsnameis not a resolution spelling"owners.length === 0message: "Declared packages: …"src/packages/docsreported whilesrc/packages/orders/docsis collected)locationsOfrefusal insweepPackageDocsDirectoriesThe probe was a one-off
tsxscript overcollectDocsFromSrcagainst temp trees, run from the built dependency closure. It is not committed.Verification, at head
32d0a0178cpnpm --filter @objectstack/cli exec vitest run --maxWorkers=2 src/utils/collect-docs.package-docs.test.ts:Tests 40 passed (40)(code unchanged; this confirms the behaviours the page now states are the ones the landed tests pin).node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands(no paths) derived 41 commands from the 1-path change set. All 41 were run, and--rananswered41 derived famil(ies) accounted for — 41 run, 0 NOT-MEASURED. They includepnpm check:doc-authoring(exit 0),pnpm check:docs-transcript-drift(exit 0: "4 declared transcript value(s) across 408 page(s)… equal what the registry derives today"),pnpm check:nul-bytes(exit 0) andpnpm --filter @objectstack/spec run check:docs(exit 0).check:skill-examplesfirst exited 3 (PREREQUISITE NOT MET: noclient-reactdeclarations). After building@objectstack/client-react...and@objectstack/client...under the verify lock it exited 0 ("259 prose examples type-check across 3 surface(s)").@mdx-js/mdx3.1.1: compiles at HEAD and at base.Build Docsjob (ci.yml), which this path schedules. It is left to CI.Changeset: none.
content/docs/**ships in no package'sfiles[](apps/docsis private), so the PR takes theskip-changesetlabel.Acceptance notes
src/packages/docs/*.mdis reported even whilesrc/packages/orders/docs/is collected beneath it (probe P1). Row 4 merges two cases. A directory name matching more than one package (named in the warning by package) is a different case from the new refusal of one package answering to more than one directory (named in the warning by directory). The page states both separately.node_modules, or under an ambiguous directory's subtree is neither collected nor reported. With nopackages[], adocs/two levels down is not reported either. This is the ruled design (packageDirectoryCandidatesproperty 1) and is pinned by tests. The module header's "Absence" bullet ("Markdown under aDIR/docs/that no registered package claims is … REPORTED") reads wider than that; the function docblocks are exact. Comment precision only, not filed. Carrier: none.doc-pages.mdx,skills/objectstack-ui/rules/pages.mdand ADR-0046 are untouched: the card records them as a separate, older gap.Generated by Claude Code