Commit 951e43d
committed
fix(plugin-dev,runtime): retire the data and ui dev stubs; /ui discovery gates on the protocol service (#4093)
The A-tier continuation of #4126, closing out the two items whose
prerequisites are now met (#4130 landed the data-slot discovery fix; this
change carries the ui-route prerequisite itself). `auth` stays untouched,
blocked on #4113.
data: in any boot with the objectql toggle on — the default — ObjectQLPlugin
registers the real engine and the stub never fired. In an engine-less boot it
was strictly harmful: both consumers of the slot carry a DELIBERATE empty-slot
degradation the stub silently replaced with fabrication. service-automation's
CRUD nodes document "no data engine → no-op success", but the stub's insert()
minted a `dev-<ts>` record id for data it discarded, which downstream flow
nodes then referenced as if stored; runtime's default-datasource plugin treats
an absent engine as "nothing to wire". The /data HTTP domain never reads the
slot (it resolves through callData), and discovery reads the occupant's
self-description since #4130 — an empty slot is answered honestly everywhere.
ui: the slot was pure fiction. Nothing in the platform registers or consumes a
`ui` service — the shapeless placeholder was its only occupant ever, and
domains/ui.ts serves /ui off the `protocol` service, 503ing without it. The
placeholder's only observable effect was advertising /ui in boots where the
route could only 503 (e.g. objectql disabled, or @objectstack/rest embedders
with enableUi off reading the builder's discovery).
Discovery now reads what /ui reads: routes.ui and services.ui gate on
`typeof protocol?.getUiView === 'function'` — handleUiRequest's own guard,
byte for byte, the same rule hasMcp already follows. That fixes both
directions: a placeholder-but-no-protocol boot no longer advertises a route
that can only 503, and a production boot (where the vestigial slot is always
empty but the protocol serves) no longer hides a route that works. The
unavailable message names the actual remedy — register MetadataPlugin — instead
of svcUnavailable's "install a ui plugin", which names a plugin that does not
exist.
With ui retired, the registration loop's shapeless-placeholder fallback is
dead code and is gone too: a slot this plugin has no implementation for is a
slot it must leave empty, not occupy with a nothing. A config-drift pin in the
tests asserts every core service name is either implemented or deliberately
listed in NO_DEV_STUB_SERVICES, so the placeholder cannot silently regrow.
Verified: plugin-dev 12, runtime 927 (4 new: route advertised + served with a
protocol; not advertised without one, with the remedy named; the old dev-boot
shape — ui occupant, no protocol — stays un-advertised AND 503s; wrong-shaped
protocol mirrors the domain), metadata-protocol 110, service-automation 457
pass; build 71/71; eslint clean. The two dispatcher↔builder parity tests
(metadata, data) pass against freshly built packages.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018UNGqBQcdJ2RYHtWgntJ9B1 parent 4dc14cc commit 951e43d
7 files changed
Lines changed: 182 additions & 56 deletions
File tree
- .changeset
- docs/adr
- packages
- plugins/plugin-dev
- src
- runtime/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
261 | | - | |
262 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
292 | 294 | | |
293 | | - | |
294 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
295 | 305 | | |
296 | 306 | | |
297 | 307 | | |
| |||
0 commit comments