Skip to content

Commit 145ba75

Browse files
os-zhuangclaude
andauthored
fix(devx): assert that a published README's repo-relative targets exist (#10813) (#10892)
`check:published-readme-links` read the docs-site URLs a published README carries and said nothing about its repo-relative paths. `packages/runtime/README.md` linked six targets that are not in the tree, and a census across the whole published population found nine, in four packages. Nothing read them: the assertions above this one read ABSOLUTE urls, `check:published-readme-exports` reads fenced import lines, and the lychee lane never sees `packages/**/README.md`. Adds assertion 5 — a repo-relative destination must name something in the tree — to the existing gate rather than a second script, so it reuses that gate's population, extractor and classifier bucket. The gate's own header had already named this omission ("a different claim, owned by nothing here yet"). Deliberately only the decidable half. Whether a relative href means anything to a reader on npmjs.com is a separate question: npm renders the README outside the repo, so EVERY relative link is unresolvable there, including the 101 that are correct in-tree. Failing them all would be a ruling on link rewriting, not a scan, and this repo's published READMEs lean on the relative form throughout. Assertion 5 says GITHUB in its message for that reason. Vacuity is refused at the population level, never the document level: 18 of the 60 published documents carry no relative link at all, so per-document silence proves nothing. `run()` throws when the whole scan classifies nothing relative, the same way it already throws on zero links, and the green line prints the resolved count so a classifier that stopped recognising the bucket shows up as a number that fell. The six runtime targets were each traced to where the content went rather than deleted: the three MINI_KERNEL_*.md docs were removed from the repo root in January (d709ecc, 5051 deletions, nothing added) and the kernel reference is the docs site now; `examples/host/` became app-host, then apps/server, then apps/objectos, then moved to objectstack-ai/cloud; `examples/msw-react-crud/` became app-react-crud, then apps/console, and ships as `@object-ui/console`; `test-mini-kernel.ts` was a root scratch script whose successor is this package's own 179-file suite under `src/` — which is what the truncated bullet with the unterminated backtick was reaching for. The other three packages: `../../plugins/driver-sql` is stale since the driver moved to `packages/drivers/` (#5618); `plugin-org-scoping`, `service-tenant` and `service-marketplace` are in no directory of this repo, so those links are dropped and the names kept as code spans — the spelling those same files already use for a package they cannot point at in-tree. Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt Co-authored-by: Claude <noreply@anthropic.com>
1 parent ee8f7c3 commit 145ba75

6 files changed

Lines changed: 322 additions & 28 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
"@objectstack/runtime": patch
3+
"@objectstack/hono": patch
4+
"@objectstack/plugin-security": patch
5+
"@objectstack/service-package": patch
6+
---
7+
8+
docs: repair the dead repo-relative targets in four published READMEs (#10813)
9+
10+
A published README ships inside the npm tarball, so a dead relative link in one
11+
is shipped to every reader who installs the package. Nine of them were measured
12+
across four packages, and nothing read them: `check:published-readme-links`
13+
checked docs-site URLs, `check:published-readme-exports` checked fenced import
14+
lines, and the lychee lane never sees `packages/**/README.md`.
15+
16+
`@objectstack/runtime` carried six dead targets. Each was traced to where the
17+
content actually went rather than deleted:
18+
19+
- `MINI_KERNEL_GUIDE.md`, `MINI_KERNEL_ARCHITECTURE.md` and
20+
`MINI_KERNEL_IMPLEMENTATION.md` were deleted from the repo root in January as
21+
"redundant markdown files" (d709ecce68 — 14 files, 5051 deletions, nothing
22+
added). The kernel reference they described is the docs site now, so the
23+
Documentation section is the same footer eight sibling READMEs already use.
24+
- `examples/host/` was renamed to `examples/app-host`, then `apps/server`, then
25+
`apps/objectos`, and finally split out to `objectstack-ai/cloud`. In-repo, an
26+
HTTP server in front of the runtime is `@objectstack/plugin-hono-server` plus
27+
the `@objectstack/hono` adapter, so the bullet points there.
28+
- `examples/msw-react-crud/` became `examples/app-react-crud`, then
29+
`apps/console`, and now ships as `@object-ui/console` from another repo.
30+
- `test-mini-kernel.ts` was a root-level scratch script; this package's suite is
31+
179 test files under `src/`.
32+
- The section also ended on a truncated bullet with an unterminated backtick
33+
(`` - `packages/runtime/src/ ``), which is now a real pointer to that suite.
34+
35+
The other three packages: `@objectstack/hono` and `@objectstack/service-package`
36+
still spelled `@objectstack/driver-sql` as `../../plugins/driver-sql`, stale
37+
since the driver moved to `packages/drivers/` (#5618). `@objectstack/plugin-security`
38+
and `@objectstack/service-package` linked three packages that are in no directory
39+
of this repo (`plugin-org-scoping`, `service-tenant`, `service-marketplace`);
40+
those links are dropped and the names kept as code spans, which is the spelling
41+
those same files already use for a package they cannot point at in-tree. Whether
42+
those three packages exist at all is a separate question, filed separately.

packages/adapters/hono/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ app.use('/api/*', objectStackMiddleware(kernel));
6666
## Edge runtime notes
6767

6868
- Hono adapter is the **preferred** adapter for Cloudflare Workers, Deno Deploy, Bun, and Vercel Edge.
69-
- Drivers differ by runtime: use [`@objectstack/driver-sql`](../../plugins/driver-sql) on Node. (Edge/multi-tenant turso driver ships in ObjectStack Cloud.)
69+
- Drivers differ by runtime: use [`@objectstack/driver-sql`](../../drivers/driver-sql) on Node. (Edge/multi-tenant turso driver ships in ObjectStack Cloud.)
7070
- Persist no long-lived state in module scope beyond the `kernel` instance.
7171

7272
## When to use

packages/plugins/plugin-security/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ await kernel.bootstrap();
3737

3838
`SecurityPlugin` is single-tenant by default. It enforces RBAC, owner-based RLS, and Field-Level Security regardless of mode.
3939

40-
For **multi-tenant** (logical row-level Organization scoping) install [`@objectstack/plugin-org-scoping`](../plugin-org-scoping/README.md) *before* SecurityPlugin:
40+
For **multi-tenant** (logical row-level Organization scoping) install `@objectstack/plugin-org-scoping` *before* SecurityPlugin:
4141

4242
```typescript
4343
import { OrgScopingPlugin } from '@objectstack/plugin-org-scoping';
@@ -92,7 +92,7 @@ Compilation output is a filter AST merged into every query's `where` clause, so
9292
## When to use
9393

9494
- ✅ Any multi-user deployment.
95-
- ✅ Enforcing tenant isolation (combine with [`@objectstack/service-tenant`](../../services/service-tenant)).
95+
- ✅ Enforcing tenant isolation (combine with `@objectstack/service-tenant`).
9696

9797
## When not to use
9898

packages/runtime/README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,18 @@ interface PluginContext {
256256

257257
## Examples
258258

259-
See the `examples/` directory for complete examples:
260-
- `examples/host/` - Full server setup with Hono
261-
- `examples/msw-react-crud/` - Browser-based setup with MSW
262-
- `test-mini-kernel.ts` - Comprehensive kernel test suite
263-
- `packages/runtime/src/
259+
Complete, CI-exercised examples live in the repo's [`examples/`](../../examples)
260+
catalog. The three that build on this package:
261+
262+
- [`app-todo`](../../examples/app-todo) — the smallest complete app; the fastest read of the `AppPlugin` conventions.
263+
- [`app-crm`](../../examples/app-crm) — relational modeling driven through the metadata loading pipeline.
264+
- [`app-showcase`](../../examples/app-showcase) — the kitchen-sink conformance fixture.
265+
266+
To put an HTTP server in front of one, see [`@objectstack/plugin-hono-server`](../plugins/plugin-hono-server)
267+
(boots the kernel behind Hono) and [`@objectstack/hono`](../adapters/hono) (the adapter itself).
268+
269+
This package's own behaviour is pinned by the test suite under [`src/`](./src)
270+
`pnpm --filter @objectstack/runtime test`.
264271

265272
## Benefits of MiniKernel
266273

@@ -640,9 +647,10 @@ Defaults are noop — zero overhead until you plug an adapter.
640647

641648
## Documentation
642649

643-
- [MiniKernel Guide](../../MINI_KERNEL_GUIDE.md) - Complete API documentation and patterns
644-
- [MiniKernel Architecture](../../MINI_KERNEL_ARCHITECTURE.md) - Architecture diagrams and flows
645-
- [MiniKernel Implementation](../../MINI_KERNEL_IMPLEMENTATION.md) - Implementation details
650+
- 📖 Docs: <https://objectstack.ai/docs>
651+
- 📚 API Reference: <https://objectstack.ai/docs/references/kernel>
652+
- 🛡️ Hardening: [`docs/HARDENING.md`](../../docs/HARDENING.md)
653+
- 📈 Observability: [`docs/OBSERVABILITY.md`](../../docs/OBSERVABILITY.md)
646654

647655
## License
648656

packages/services/service-package/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ CREATE INDEX IF NOT EXISTS idx_packages_latest
9494

9595
## Requirements
9696

97-
- A driver plugin that registers an `IDataEngine` under the service name `'objectql'` with `execute()` support — typically [`@objectstack/driver-sql`](../../plugins/driver-sql). `@objectstack/driver-memory` can be used for tests but does not persist across restarts. (ObjectStack Cloud additionally ships `@objectstack/driver-turso` for edge/multi-tenant.)
97+
- A driver plugin that registers an `IDataEngine` under the service name `'objectql'` with `execute()` support — typically [`@objectstack/driver-sql`](../../drivers/driver-sql). `@objectstack/driver-memory` can be used for tests but does not persist across restarts. (ObjectStack Cloud additionally ships `@objectstack/driver-turso` for edge/multi-tenant.)
9898

9999
## When to use
100100

@@ -105,13 +105,13 @@ CREATE INDEX IF NOT EXISTS idx_packages_latest
105105
## When not to use
106106

107107
- ❌ Not a package manager for npm/TypeScript source packages — use npm.
108-
- ❌ Not a runtime plugin loader — pair with [`@objectstack/service-marketplace`](../service-marketplace) or a custom loader for that.
108+
- ❌ Not a runtime plugin loader — pair with `@objectstack/service-marketplace` or a custom loader for that.
109109

110110
## Related Packages
111111

112112
- [`@objectstack/core`](../../core) — kernel hosting this plugin.
113113
- [`@objectstack/spec`](../../spec) — provides `ObjectStackManifest` and `IDataEngine` contracts.
114-
- [`@objectstack/driver-sql`](../../plugins/driver-sql) — supplies the `'objectql'` service. (ObjectStack Cloud also ships `@objectstack/driver-turso`.)
114+
- [`@objectstack/driver-sql`](../../drivers/driver-sql) — supplies the `'objectql'` service. (ObjectStack Cloud also ships `@objectstack/driver-turso`.)
115115

116116
## Links
117117

0 commit comments

Comments
 (0)