Commit 68f8f77
fix(runtime): the classified lookup keeps the scope it was handed (#16789)
* fix(runtime): the classified lookup keeps the scope it was handed
`HttpDispatcher.resolveServiceOrLoud` re-resolved on the request's own
kernel WITHOUT the scope id it had just been given. A
`ServiceLifecycle.SCOPED` registration resolved without a scope id rejects
`Scope ID required for scoped service '<name>'` from `PluginLoader`,
unbranded, so a scoped factory that legitimately answered `undefined` FOR
THAT SCOPE came back out of the lookup as that rejection -- and all four
doors above it (`POST /keys` mint, the install-wide activation write, the
automation toggle, and the identity step) answered 503 with a message
describing an omission that never happened.
`packages/core` was telling the truth: the retry really did give no scope.
The retry was the lie, and its wording is deliberately untouched -- a
caller that genuinely omits the scope still receives it.
The scope now travels with every leg, which is what the leg before it and
the `resolveService` tail already did. The lookup also tells its three
answers apart -- never registered, no instance for THIS scope, and (as a
rejection) a caller that named no scope -- so the second state has an
answer of its own instead of borrowing the third's message. The two misses
still license the same quiet `undefined` at the door, because a factory
that answers `undefined` for a scope has ANSWERED: it is an absent fact,
not an unread one. The distinction stays off `DomainHandlerDeps`, which is
an exported type; nothing published gains a member.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8
* chore(changeset): the classified lookup keeps the scope it was handed
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8
---------
Co-authored-by: claude <noreply@anthropic.com>1 parent a749dcc commit 68f8f77
4 files changed
Lines changed: 725 additions & 9 deletions
File tree
- .changeset
- packages/runtime/src
- domains
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
| |||
185 | 194 | | |
186 | 195 | | |
187 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
188 | 206 | | |
189 | 207 | | |
190 | 208 | | |
| |||
0 commit comments