Commit 6a04a50
committed
test(runtime): pin that a domain registered at
The nine cases in this pin all read the auth service spy: "not called" is how
they conclude the `/auth` domain did not claim a path. The contract review
measured what that cannot see — a repair which KEEPS the wide
`startsWith('/auth')` claim and moves the refusal INSIDE `handleAuthRequest`
passes all nine green, because the service is still never called and the
`ROUTE_NOT_FOUND` envelope is still what comes back. Under that shape `/authx`
is still SHADOWED: a domain mounted there never runs, which is the harm the
card names and the changeset says is gone.
The new case observes the REGISTRY instead. `registerDomainHandler` appends to
a first-match-wins table, so a probe domain registered at `/authx` AFTER
construction sits BEHIND the auth route — exactly where a package mounting
that namespace later would sit — and is reachable only if the auth route
declines the path. The evidence asserted is the probe's OWN response coming
back out of `dispatch()` for `/authx` and `/authx/foo`, not the absence of a
call.
Test-only: no production file changes, and the existing `patch` changeset on
`@objectstack/runtime` is unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N/authx is REACHED, not merely that auth stops answering1 parent 59b1001 commit 6a04a50
1 file changed
Lines changed: 59 additions & 0 deletions
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| |||
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
169 | 228 | | |
0 commit comments