Skip to content

[finding] the docs sweep scans one level under src/, so a doc in this repo's own ADR-0130 reference fixture (src/packages/PKG/docs/) is dropped silently — exit 0, nothing printed #18965

Description

@os-support-ai

The docs sweep looks exactly ONE level under src/ — and this repo's own ADR-0130 reference fixture nests one level deeper

os build reads package docs from src/docs/ (flat). #18170 / PR #18428 made the loss audible: a Markdown file sitting in src/<pkg>/docs/ is not collected, but a warning names it. #18431 then made those directories collectable.

Both the diagnostic and the collection scan one level. packages/cli/src/utils/collect-docs.ts, uncollectedDocsDirectories (⭐ located from the symbol, not a line number):

entries = fs.readdirSync(srcDir, { withFileTypes: true });
const packageDirs = entries.filter((e) => e.isDirectory() && e.name !== COLLECTED_DOCS_DIR);
for (const entry of packageDirs) {
  const files = markdownFilesIn(path.join(srcDir, entry.name, COLLECTED_DOCS_DIR));
  
}

⇒ it asks, for each direct child of src/, whether src/<child>/docs holds Markdown.

This repo's own ADR-0130 D4 reference fixture does not have that shape. Measured on origin/main:

find examples/app-multi-package/src -maxdepth 3 -type d
  examples/app-multi-package/src
  examples/app-multi-package/src/packages          ← the only direct child
  examples/app-multi-package/src/packages/core
  examples/app-multi-package/src/packages/orders

Its packages live at src/packages/<pkg>/, two levels down. So for that layout the sweep's only question is "does src/packages/docs exist?" — it does not, and the loop yields nothing.

The failure, stated as a repro

  1. Follow examples/app-multi-package's layout (src/packages/<pkg>/).
  2. Put a doc at src/packages/orders/docs/ord_guide.md.
  3. Run os build.

Result: the doc is silently dropped. The artifact carries no docs[] entry for it, the command exits 0, and nothing is printed — not the docs/uncollected-directory warning either, because the sweep never looked there.

⇒ That is the #18170 defect verbatim, one level deeper — and after #18431 it is unreachable by both the diagnostic and the collection. #18170's stated minimum was to make the loss audible; at this depth it is inaudible again.

⛔ Why #18431 deliberately did not fix it, and why that was right

The maintainer's ruling on #18431 (batch #147 item 4, comment 5715694492) fences it: a single-package stack's existing behaviour must not move, and the source convention is src/<pkg>/docs/. Widening the scan depth is a convention decision that ruling did not make — it changes which directories the build claims to understand. #18431's deliverer measured this, named it, and left it alone. ⇒ ⛔ not a defect in #18431, and ⛔ not a reason to hold #18962.

What has to be settled, and by whom

Which depth the ADR-0130 convention actually means. The two candidate readings are not equivalent:

  • src/<pkg>/docs/ — what the code and the fix(cli): say what the ADR-0046 package-docs collector did not read (#18170) #18428 warning implement today, and what the ruling names. Then examples/app-multi-package is simply not in that convention, and the reference fixture disagrees with the convention it references.
  • any package directory the artifact registers — resolve the docs directory from packages[]/the assembled body rather than from a fixed depth. That reaches both layouts and stops the sweep guessing from the filesystem shape at all.

⚠️ This card ⛔ does not choose. It reports that the reference fixture and the convention currently disagree, and that the disagreement is silent.

Dedupe — complete enumeration, with controls

/search/* answers 403 for this session, so every open issue was enumerated (GET /issues?state=open&per_page=100&page=1..6) and scanned locally — 529 cards, not a sample:

needle hits
uncollected-directory 0
src/packages/ 0
docs … silently dropped/skipped 0
app-multi-package near docs 0
⭐ lit control ADR-0130 13
⛔ dark control 0

⇒ no open card covers this.

Dedupe words

src/packages/PACKAGE/docs · ADR-0130 nested package directory · uncollected-directory depth · app-multi-package docs layout · docs silently dropped · docs sweep depth

Refs

#18170 / PR #18428 (made the one-level loss audible) · #18431 / PR #18962 (made the one-level directory collectable; its deliverer measured and reported this) · #14122 (the ADR-0130 tracker) · objectstack-ai/hotcrm#1904, objectstack-ai/hotcrm#1910 (the external split the convention has to serve)

⛔ Not graded here — lane, kind and priority are triage's.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions