Skip to content

Commit 0425db9

Browse files
os-steveclaude
andauthored
fix(docs): published READMEs link to the docs site in a followable form, and a gate reads them (#9632) (#9662)
Nine links across seven published package READMEs pointed at a repo path rooted at `/` or at raw MDX source. A README in a package's `files` array with `private` unset renders on npm and on GitHub as well as here, where `/content/docs/...` resolves against npmjs.com / github.com and is not a docs-site route either (`apps/docs/lib/source.ts` mounts `loader({ baseUrl: '/docs' })` over `content/docs`). All nine now use the absolute `https://docs.objectstack.ai/docs/...` form, verified at the route level. The durable half: `scripts/check-published-readme-links.mjs` reads a published README's links, which nothing did before. It reuses rather than re-derives — the population from check-published-readme-exports (newly exported as `publishedDocs`), the page resolver from check-docs-redirects, heading ids from check-doc-anchors, fence/code-span stripping from check-adr-links. Two of those four ran `main()` at import and gained the entrypoint guard the other two already had. Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja Co-authored-by: Claude <noreply@anthropic.com>
1 parent 52182a6 commit 0425db9

13 files changed

Lines changed: 711 additions & 26 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
"@objectstack/service-automation": patch
3+
"@objectstack/service-analytics": patch
4+
"@objectstack/service-knowledge": patch
5+
"@objectstack/knowledge-ragflow": patch
6+
"@objectstack/service-cache": patch
7+
"@objectstack/service-i18n": patch
8+
"@objectstack/service-job": patch
9+
---
10+
11+
Published READMEs link to the docs site in the one form that works on npm, on GitHub and on the docs site (#9632)
12+
13+
**Seven docs links in these READMEs pointed nowhere.** They were spelled as a repo
14+
path rooted at `/` — `[Flows](/content/docs/automation/flows.mdx)` — and a README in a
15+
package's `files` array with `private` unset is rendered on the **npm package page** and
16+
on **GitHub**, not only in this repository. There a root-relative href resolves against
17+
`npmjs.com` and `github.com` respectively. It was not a docs-site route either:
18+
`apps/docs/lib/source.ts` mounts `loader({ baseUrl: '/docs' })` over `content/docs`, so
19+
the route for that first link is `/docs/automation/flows`, and `apps/docs/redirects.mjs`
20+
carries no `/content` source that would rescue the written form. Every target page
21+
existed and every one of them was reachable — only the links were not.
22+
23+
All seven now use the absolute form the repo had already established in
24+
`create-objectstack`'s published READMEs: `https://docs.objectstack.ai/docs/...`, with
25+
the path taken under `content/docs` and the page extension dropped, because the route
26+
carries none. Each target was re-verified at the route level rather than as a file — the
27+
two that named a **directory** (`/content/docs/automation/`,
28+
`/content/docs/references/automation/`) resolve only because those directories carry an
29+
`index.mdx`; a directory without one is a 404, not a section.
30+
31+
**Two more links in the same class were converted in the same pass.**
32+
`service-knowledge` and `knowledge-ragflow` pointed at
33+
`../../../content/docs/protocol/knowledge.mdx`. Those relative paths do resolve on both
34+
GitHub and npm, so they are a milder defect than the seven — but they land the reader on
35+
**raw MDX source** instead of the rendered page. They now point at the rendered page as
36+
well. `service-knowledge`'s link text changed with it: it was the source filename in a
37+
code span, which stops being an honest label once the destination is the page.
38+
39+
No API, behaviour or type surface changes — this is the published documentation these
40+
packages ship.

‎.github/workflows/lint.yml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,38 @@ jobs:
390390
- name: Docs redirect destinations resolve, and no chains
391391
run: pnpm check:docs-redirects
392392

393+
# #9632 published-README links: a README in a package's `files` array with
394+
# `private` unset is rendered on npm and on GitHub as well as here, and
395+
# NOTHING read its links. Measured before the gate was written: the lychee
396+
# lane globs `content/**` plus the ROOT README.md/ARCHITECTURE.md, never
397+
# `packages/**/README.md`; `check:doc-anchors` takes the same two
398+
# EXTRA_SOURCES; `check:adr-links` is scoped to docs/adr/;
399+
# `check:published-readme-exports` has exactly the right population but
400+
# reads FENCED CODE BLOCKS ONLY and has no notion of a link. So seven links
401+
# across five published service packages sat spelled `/content/docs/...` —
402+
# a form that resolves on none of the three surfaces — and shipped to npm
403+
# green. An npm tarball outlives any in-repo correction, which is why the
404+
# gate is worth more than the seven fixes that came with it.
405+
#
406+
# Strict, with no baseline: the census that sized it found 149 outbound
407+
# links across all 60 published markdown files, so per-link assertions are
408+
# affordable. It reuses rather than re-derives — the POPULATION comes from
409+
# check-published-readme-exports (`publishedDocs`), the page resolver from
410+
# check-docs-redirects (`pageCandidates`, including its
411+
# directory-without-an-index-is-a-404 subtlety), the heading ids from
412+
# check-doc-anchors (`headingIds`), and the fence/code-span stripping from
413+
# check-adr-links. Two gates deriving "published" separately would disagree
414+
# the first time a `files` array changed, silently, each still green.
415+
#
416+
# This job for the same reason check:docs-redirects is here: it is a
417+
# dependency-free filesystem check and this job carries "the whole check:*
418+
# gate family". Runs its own --self-test first, where all three assertions
419+
# are observed FAILING as well as silent — over the real tree the strict
420+
# assertion has a small population, so a green run cannot by itself
421+
# distinguish a working scanner from one that matches nothing.
422+
- name: Published-README links are followable off the docs site
423+
run: pnpm check:published-readme-links
424+
393425
# #9018 docs image tags: the same "example image tag N majors behind
394426
# packages/cli" staleness was found and hand-fixed TWICE, independently —
395427
# content/docs/deployment/self-hosting.mdx (#8911, PR #8960) and

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"check:type-source-resolution": "node scripts/check-type-source-resolution.mjs --self-test && node scripts/check-type-source-resolution.mjs",
100100
"check:published-files": "node scripts/check-published-files.mjs --self-test && node scripts/check-published-files.mjs",
101101
"check:published-readme-exports": "node scripts/check-published-readme-exports.mjs --self-test && node scripts/check-published-readme-exports.mjs",
102+
"check:published-readme-links": "node scripts/check-published-readme-links.mjs --self-test && node scripts/check-published-readme-links.mjs",
102103
"check:type-check-coverage": "node scripts/check-type-check-coverage.mjs --self-test && node scripts/check-type-check-coverage.mjs",
103104
"check:type-check-debt": "node scripts/check-type-check-coverage.mjs --self-test && node scripts/check-type-check-coverage.mjs --re-measure",
104105
"check:driver-conformance": "node scripts/check-driver-conformance.mjs --self-test && node scripts/check-driver-conformance.mjs",

‎packages/plugins/knowledge-ragflow/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[RAGFlow](https://github.com/infiniflow/ragflow) `IKnowledgeAdapter` for ObjectStack.
44

5-
Bridges the [Knowledge Protocol](../../../content/docs/protocol/knowledge.mdx) to a RAGFlow deployment via its HTTP API. RAGFlow handles chunking (DeepDoc), embedding, hybrid retrieval, and reranking; ObjectStack handles metadata-native sources and permission-aware filtering on top of the returned hits.
5+
Bridges the [Knowledge Protocol](https://docs.objectstack.ai/docs/protocol/knowledge) to a RAGFlow deployment via its HTTP API. RAGFlow handles chunking (DeepDoc), embedding, hybrid retrieval, and reranking; ObjectStack handles metadata-native sources and permission-aware filtering on top of the returned hits.
66

77
## Why RAGFlow?
88

‎packages/services/service-analytics/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,4 @@ Apache-2.0. See [LICENSING.md](../../../LICENSING.md).
191191

192192
- [@objectstack/objectql](../../objectql/)
193193
- [@objectstack/driver-memory](../../drivers/driver-memory/) — ships `InMemoryStrategy`
194-
- [Analytics Guide](/content/docs/data-modeling/analytics.mdx)
194+
- [Analytics Guide](https://docs.objectstack.ai/docs/data-modeling/analytics)

‎packages/services/service-automation/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ array of `{ field, operator, value }` triples; operator objects such as
175175
through `filter`. Unknown keys are rejected at `registerFlow()`.
176176

177177
For every other node's `config`, and for loops, parallel blocks, subflows, waits
178-
and error handling, see the maintained reference — **[Flows](/content/docs/automation/flows.mdx)**.
178+
and error handling, see the maintained reference — **[Flows](https://docs.objectstack.ai/docs/automation/flows)**.
179179
This README deliberately does not keep a second copy of that per-node reference.
180180

181181
## Expressions
@@ -456,5 +456,5 @@ Apache-2.0. See [LICENSING.md](../../../LICENSING.md).
456456
## See Also
457457

458458
- [@objectstack/spec/automation](../../spec/src/automation/)
459-
- [Flow Builder Guide](/content/docs/automation/)
460-
- [Trigger Reference](/content/docs/references/automation/)
459+
- [Flow Builder Guide](https://docs.objectstack.ai/docs/automation)
460+
- [Trigger Reference](https://docs.objectstack.ai/docs/references/automation)

‎packages/services/service-cache/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,4 @@ Apache-2.0. See [LICENSING.md](../../../LICENSING.md).
148148
## See Also
149149

150150
- [@objectstack/spec/contracts](../../spec/src/contracts/)
151-
- [Cache Service](/content/docs/kernel/contracts/cache-service.mdx)
151+
- [Cache Service](https://docs.objectstack.ai/docs/kernel/contracts/cache-service)

‎packages/services/service-i18n/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,4 @@ Apache-2.0. See [LICENSING.md](../../../LICENSING.md).
193193
## See Also
194194

195195
- [@objectstack/spec/system](../../spec/src/system/) — the `translation` metadata schema
196-
- [I18n Standard](/content/docs/protocol/kernel/i18n-standard.mdx)
196+
- [I18n Standard](https://docs.objectstack.ai/docs/protocol/kernel/i18n-standard)

‎packages/services/service-job/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,4 @@ Apache-2.0. See [LICENSING.md](../../../LICENSING.md).
183183

184184
- [@objectstack/spec/contracts](../../spec/src/contracts/)
185185
- [Cron Expression Generator](https://crontab.guru/)
186-
- [Queue Service](/content/docs/kernel/runtime-services/queue-service.mdx)
186+
- [Queue Service](https://docs.objectstack.ai/docs/kernel/runtime-services/queue-service)

‎packages/services/service-knowledge/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Orchestrator implementing `IKnowledgeService` over pluggable
55
— that's the job of adapter plugins (`knowledge-memory`,
66
`knowledge-ragflow`, …).
77

8-
See [`content/docs/protocol/knowledge.mdx`](../../../content/docs/protocol/knowledge.mdx).
8+
See [Knowledge Protocol](https://docs.objectstack.ai/docs/protocol/knowledge).
99

1010
## License
1111

0 commit comments

Comments
 (0)