Repository navigation
Commit f985b3f
* fix(spec,core,cloud-connection,metadata): one HTTP contract, one canonical slot name (#4251)
packages/core/src/contracts/ was a dead near-copy of the real contracts --
zero importers (no relative import, no subpath export, not a tsup entry;
core's barrel has re-exported the spec versions all along) -- and it had
already DIVERGED (spec's IHttpResponse grew write?/end?, IHttpRequest grew
rawBody?; the copy never did). Anyone who grepped into it read a stale
contract nothing enforces -- the both-humans-and-AI failure mode behind
the false http.server exemption (#4382). Deleted; zero-risk by
construction.
`http.server` is the canonical slot name and the ledger now says so:
ServiceSlotContracts gains 'http.server': IHttpServer plus the deprecated
'http-server' alias entry (same instance -- hono-plugin, qa node-plugin
and cloud's two server entrypoints all register both, alias commented
"backward compatibility"). Canonical is the only name on EVERY provider
path -- runtime's config.server path registers no alias, so the three
cloud-connection plugins reading the alias alone found an empty slot
there. All readers now go canonical-first with the alias as a fallback
that dies with the alias registrations; registrations untouched this
release, both sites carry the deprecation note.
getRawApp?(): any joins IHttpServer -- the deliberate framework-handle
escape, declared once with the rationale; four consumers declared it
locally before (cloud-connection x2, metadata HMR, cloud node-server),
and the local RawAppHost / HttpServerWithRawApp types are deleted.
IMetadataService.bulkRegister/bulkUnregister declare the write options
their implementation always accepted (bulkRegister's contract dropped the
MetadataWriteOptions half it intersects in; bulkUnregister declared no
options at all). Same shape as B2's IDataEngine read-methods gap.
Baseline 168 -> 167 (marketplace-install-local's lookup typed while
touched). Ledger test pins both slot entries and the alias equality.
Verified: spec build (dts) + 7192 tests / 281 files; core, metadata,
cloud-connection, plugin-hono-server dts builds; runtime 1001/69, rest
539/36, plugin-auth 579/26, plugin-sharing 226/11, service-settings
196/14, metadata 281/13, hono-server 135/12, http-conformance 46/2;
ratchet holds 167/36 none new; eslint clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(cloud-connection,metadata): the canonical-first read needs a per-name try -- getService throws on an empty slot (#4251)
CI caught the shape my local run could not (I built cloud-connection but ran
only metadata's tests -- cloud-connection's own suites mock a kernel that
registers ONLY the alias): `getService` THROWS for an unregistered slot, so
try { a = getService('http.server') ?? getService('http-server'); } catch {...}
never reaches the alias -- the first name's throw exits the whole try. Split
into a per-name try (readServer helper) in all four readers.
Worth recording: the pre-existing alias-first read in metadata/plugin.ts had
the SAME shape, so its `?? getService('http.server')` fallback never once
fired either -- a decorative fallback, the declared-vs-actual gap this work
line keeps finding, now actually implemented in both directions.
Verified serially (the earlier 6-file FAIL was local vitest concurrency noise
while spec's dts build ran in parallel -- single-file and serial reruns green):
cloud-connection 64/12, metadata 281/13, both dts builds, eslint clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 8b50cb3 commit f985b3f
15 files changed
Lines changed: 183 additions & 346 deletions
File tree
- .changeset
- packages
- cloud-connection/src
- core/src/contracts
- metadata/src
- plugins/plugin-hono-server/src
- qa/http-conformance/src
- spec/src/contracts
- scripts
| 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 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
127 | 134 | | |
128 | 135 | | |
129 | 136 | | |
130 | | - | |
| 137 | + | |
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
| |||
Lines changed: 12 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 38 | | |
52 | 39 | | |
53 | 40 | | |
| |||
196 | 183 | | |
197 | 184 | | |
198 | 185 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
203 | 197 | | |
204 | 198 | | |
205 | 199 | | |
206 | | - | |
| 200 | + | |
207 | 201 | | |
208 | 202 | | |
209 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 46 | | |
60 | 47 | | |
61 | 48 | | |
| |||
196 | 183 | | |
197 | 184 | | |
198 | 185 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
203 | 196 | | |
204 | 197 | | |
205 | 198 | | |
206 | | - | |
| 199 | + | |
207 | 200 | | |
208 | 201 | | |
209 | 202 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments