Skip to content

Commit 4ce4cc3

Browse files
os-zhuangclaude
andcommitted
fix(scripts): read the receivers a README BUILDS, and print the blind spot that remains (#9870)
`check:published-readme-exports` typed a receiver only when the fence had imported it, so its call-site half was checking 8 call sites while 262 across 39 of 60 published documents went unread — and the green line's `60 published document(s)` read as coverage of documents rather than of the import-bound receivers inside them. Measured with the gate's own `publishedDocs()`, the two escape routes the card named are not the same size: 109 of the 251 never-import-bound receivers are BUILT from a name the fence did import (`const kernel = new ObjectKernel()`, `const stack = await bootStack(app)`), while call-expression receivers have a population of zero with an import-bound base — so the first is implemented and the second deliberately is not, rather than shipping a rule that scans nothing. Call-site half: 8 → 78 checks. One finding in the 70 newly-read sites, and it is real: plugin-hono-server's README booted a kernel with `await kernel.start()` where `ObjectKernel` ships `bootstrap()`. Zero false positives — every ambiguity in `extractLocalBindings` rejects rather than guesses, because a wrong green leaves a site unread while a wrong red accuses a correct README on a merge-blocking gate whose baseline refuses to mute it. The green line now also states what it could NOT read (120 calls on 72 receivers), marked as visibility rather than a verdict. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
1 parent 2e39181 commit 4ce4cc3

3 files changed

Lines changed: 627 additions & 52 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
"@objectstack/plugin-hono-server": patch
3+
---
4+
5+
docs(plugin-hono-server): boot the kernel with the method it actually ships (#9870)
6+
7+
`packages/plugins/plugin-hono-server/README.md` is in the package's `files` array
8+
with `private` unset, so it is the page npm renders. Its Usage block ended:
9+
10+
```ts
11+
const kernel = new ObjectKernel();
12+
kernel.use(new HonoServerPlugin({ port: 3000, /* … */ }));
13+
await kernel.start();
14+
```
15+
16+
Measured against the built type surface: `ObjectKernel` (re-exported by
17+
`@objectstack/runtime` from `@objectstack/core`) declares `bootstrap()` and
18+
`shutdown()` and has **no** `start` member. A reader copying the block gets a
19+
compile error on its last line.
20+
21+
The line reads plausibly because the `IKernel` *interface* in
22+
`@objectstack/types` does declare `start()` — but the concrete class the fence
23+
constructs does not implement that name, and eight sibling READMEs
24+
(`objectql`, `rest`, `runtime`, `service-cache`, `service-job`,
25+
`service-automation`, `service-package`, `service-cluster-redis`) all spell the
26+
same step `await kernel.bootstrap()`. Fixed to match.
27+
28+
Found by the call-site widening in the same PR, not by hand: the receiver is
29+
never import-bound, so before that widening this call site was one of the 262
30+
`check:published-readme-exports` could not read.

‎packages/plugins/plugin-hono-server/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ kernel.use(new HonoServerPlugin({
2828
}
2929
}));
3030

31-
await kernel.start();
31+
await kernel.bootstrap();
3232
```
3333

3434
## CORS Configuration

0 commit comments

Comments
 (0)