Commit f91cd8d
committed
fix(runtime,client): split the ledger guard along the package boundary — CI has no client dist in runtime's test task
Test Core failed on the first push: the conformance test imported the built
client (`../../client/dist/index.mjs`), assuming the dist exists whenever
tests run. Wrong assumption — turbo's per-package test tasks build only their
own dependency closure, and runtime deliberately has no edge to client (the
reverse edge exists, so adding one is a build cycle turbo rejects). In CI the
dist therefore never exists for runtime's suite.
The fix is structural, not a skip: each package now verifies its own half.
- runtime keeps the dispatcher directions (registry domain ↔ ledger, both
ways) plus ledger hygiene and the gap ratchet — no client import at all.
- client gains `route-ledger-coverage.test.ts`, which instantiates the real
ObjectStackClient and asserts every ledger-named method resolves to a
function. The ledger is imported as a relative SOURCE file: it is pure data
with zero imports, and it lives in runtime because that is where routes are
declared.
- the now-unneeded @objectstack/core/logger vitest alias is reverted.
Skipping when the dist is missing was rejected: Test Core would never
exercise the client direction, and the guard's whole point is that this
failure mode cannot go quiet again.
Verified: phantom-method negative check bites in the new home; client suite
117 passed, runtime suite 653 passed; eslint clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv51 parent 5ae4a77 commit f91cd8d
3 files changed
Lines changed: 52 additions & 27 deletions
File tree
- .changeset
- packages
- client/src
- runtime/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 24 | | |
33 | 25 | | |
34 | 26 | | |
| |||
73 | 65 | | |
74 | 66 | | |
75 | 67 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
92 | 75 | | |
93 | 76 | | |
94 | 77 | | |
| |||
0 commit comments