|
| 1 | +--- |
| 2 | +"@objectstack/spec": major |
| 3 | +--- |
| 4 | + |
| 5 | +refactor(spec)!: retire `system/http-server.zod.ts`'s runtime vocabulary — the event, capability and status shapes nothing ever emitted (#5295) |
| 6 | + |
| 7 | +`ServerEventType`, `ServerEventSchema` / `ServerEvent`, `ServerCapabilitiesSchema` / |
| 8 | +`ServerCapabilities` / `ServerCapabilitiesParsed` and `ServerStatusSchema` / |
| 9 | +`ServerStatus` are REMOVED under ADR-0049 enforce-or-remove. This is the second and |
| 10 | +final pass over the file: #4938 removed its CONFIG half (`HttpServerConfigSchema`, |
| 11 | +nine keys, zero readers, zero authoring entry), and this removes the RUNTIME half — |
| 12 | +a 7-member lifecycle event union, an eight-boolean capability report and a |
| 13 | +five-state status record with connection and request counters. Nothing ever emitted, |
| 14 | +consumed or parsed any of them. |
| 15 | + |
| 16 | +FROM → TO: |
| 17 | + |
| 18 | +| removed | what actually decides it | |
| 19 | +|---|---| |
| 20 | +| `ServerEventType` / `ServerEvent(Schema)` | nothing emits a server event feed. Lifecycle is the transport plugin's own start/stop seam; observability is `system/metrics.zod.ts` + `system/logging.zod.ts`, and `OS_SERVER_TIMING` for timings | |
| 21 | +| `ServerCapabilities(Schema/Parsed)` | a transport plugin declares what it provides by implementing the kernel plugin contract — the seams it registers ARE the capability statement | |
| 22 | +| `ServerStatus(Schema)` | `/health` for liveness, the metrics surface for counters | |
| 23 | + |
| 24 | +**The fix:** delete the import. There is no replacement key, because there was |
| 25 | +never a key — none of the four was authorable on any shape. Server-level |
| 26 | +configuration that IS authorable is untouched: `defineStack({ server: { trustProxy, |
| 27 | +security } })` / `StackServerConfigSchema` (#5006) parses exactly as it did in 16.x, |
| 28 | +as does the route-registration half of the same module (`RouteHandlerMetadata`, |
| 29 | +`MiddlewareType`, `MiddlewareConfig`). |
| 30 | + |
| 31 | +**Why now, and what unblocked it.** The card was held rather than queued on a real |
| 32 | +doubt: a response/capability vocabulary can legitimately be a REFERENCE surface for |
| 33 | +host implementers, so "zero consumers in this repo" is weaker evidence for one of |
| 34 | +those than for an authorable key. It was lifted by measuring the reference reader |
| 35 | +itself — `plugin-hono-server`, the one in-tree host implementation, neither |
| 36 | +implements nor reports any of the three: it names no capability record, no status |
| 37 | +shape and no event union, and what it registers is routes and middleware. The |
| 38 | +control passed in the same sweep (`MiddlewareConfig`, twelve lines away, resolves to |
| 39 | +`packages/runtime/src/middleware.ts`). |
| 40 | + |
| 41 | +The retirement kit — route 3 of the retirement playbook, as #4938 was in this same |
| 42 | +file: **no `retiredKey()` tombstone and no D2 conversion**, because a prescription |
| 43 | +nobody can receive is noise and there is no authored document to rewrite. |
| 44 | +`RETIRED_DEFS_BY_MAJOR[17]` (4 defs) plus the D3 `SemanticMigration` |
| 45 | +`http-server-runtime-vocabulary-retired` are the declaration; the generated |
| 46 | +baselines (`json-schema.manifest/system.json`, `authorable-surface/system.json`, |
| 47 | +`api-surface/system.json`) lose their entries in the same change, deliberately. |
| 48 | + |
| 49 | +If host-implementer conformance becomes a real requirement it returns through the |
| 50 | +ENFORCE route: an adapter contract with a checker behind it, vocabulary second. |
| 51 | + |
| 52 | +<!-- adr-0087: registered http-server-runtime-vocabulary-retired --> |
0 commit comments