You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6c33626
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cli): a --no-server boot no longer reports an unknown-hostname guard ordering fault
The unknown-hostname guard read the HTTP server with
getService?.('http.server') ?? getService?.('http-server'), the same trap as
the datasource admin routes: the kernel's getService throws on a name nothing
registered, so on a boot with no server (OS_ROOT_DOMAIN set, --no-server) the
throw landed in the install catch and printed "install failed" with the
kernel's "composition/ordering fault" text. init now reads the server through
readComposedHttpServer, so that boot takes the guard's own degrade line, and
an install that throws on a composed server still warns "install failed".
Pins in serve-unknown-hostname-guard.test.ts: a real ObjectKernel boot with no
server (the degrade line once, no "install failed", no "ordering fault"), its
composed control (installed, and refusing an unmapped host), and an install
failure on a usable server still warning "install failed". The throwing
service-resolution case now expects the degrade line. slot-lookup: serve.ts
7 -> 6. The changeset names the guard's line too.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVm1pAXVXQ3PjC42j1kPFf
Copy file name to clipboardExpand all lines: .changeset/24022-datasource-admin-no-server.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,6 @@
2
2
'@objectstack/cli': patch
3
3
---
4
4
5
-
`os serve --no-server` no longer reports an ordering fault for the datasource admin routes. A boot that composes no HTTP server used to print, in its boot diagnostics, `WARN [datasource-admin] route registration failed: [Kernel] Service 'http.server' not found (… a composition/ordering fault; registration order is not a contract.)`, although nothing was at fault. It now prints the routes' own degrade line, `WARN [datasource-admin] http.server unavailable; REST routes not installed`, beside the same boot's other "not mounted" lines.
5
+
`os serve --no-server` no longer reports an ordering fault for the datasource admin routes or for the unknown-hostname guard. A boot that composes no HTTP server used to print, in its boot diagnostics, `WARN [datasource-admin] route registration failed: [Kernel] Service 'http.server' not found (… a composition/ordering fault; registration order is not a contract.)`, although nothing was at fault. With `OS_ROOT_DOMAIN` set, the same boot also printed `WARN [unknown-hostname-guard] install failed` with the same kernel text. Each now prints its own degrade line, beside the same boot's other "not mounted" lines: `WARN [datasource-admin] http.server unavailable; REST routes not installed`, and `WARN [unknown-hostname-guard] http.server unavailable; guard not installed`.
6
6
7
-
What still warns: on a boot that does compose an HTTP server, a route registration that throws still prints `[datasource-admin] route registration failed` with the error. A composed boot mounts `/api/v1/datasources` as before, including under `--no-server` when the config mounts its own `HonoServerPlugin`. The plugin now reads only the canonical `http.server` service. Its old fallback to the deprecated `http-server` alias never ran: on a boot without `http.server` the canonical read threw first. So every boot that mounted these routes before still mounts them.
7
+
What still warns: on a boot that does compose an HTTP server, a route registration that throws still prints `[datasource-admin] route registration failed` with the error, and a guard install that throws still prints `[unknown-hostname-guard] install failed` with the error. A composed boot mounts `/api/v1/datasources`and installs the hostname guard as before, including under `--no-server` when the config mounts its own `HonoServerPlugin`. Both plugins now read only the canonical `http.server` service. Their old fallback to the deprecated `http-server` alias never ran: on a boot without `http.server` the canonical read threw first. So every boot that mounted these routes or installed the guard before still does.
0 commit comments