Commit e564d8b
committed
fix(runtime): carve liveness out of the identity step so a config fault cannot restart a pod
`HttpDispatcher.dispatch()` resolved a per-request identity before any route
handler ran, and that step reads the tenancy posture for every request —
credentialed or not. A `tenancy` service that is registered and fails to build
is re-raised as 503 rather than absorbed into "there is no posture", so an
uncredentialed liveness probe was answered 503 for the length of the outage: a
liveness 503 means "restart me", the service fails to build again on the new
pod, and the restart loop hides the fault the 503 exists to make loud.
A route may now declare `liveness: true` on its registry entry. `dispatch()`
runs such a route's handler directly — no identity resolution, no gate, nothing
that reads configuration or credentials. `/health` declares it; its payload was
already process-local. `/ready` is untouched and keeps the full identity step
and its 503 body, so traffic is still withheld until the fault is fixed.
Which routes count as liveness is DERIVED from the dispatcher's own route
table: `DomainHandlerRegistry.resolveLiveness()` is `resolve()` plus one field
read, so it answers through the same matcher that picks the handler and cannot
drift from the routes that exist. There is no second list of paths.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ1 parent f48f3f1 commit e564d8b
7 files changed
Lines changed: 433 additions & 3 deletions
File tree
- .changeset
- content/docs/deployment
- packages/runtime/src
- scripts/adr-anchors
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
228 | 237 | | |
229 | 238 | | |
230 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
268 | 282 | | |
269 | 283 | | |
270 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
71 | 92 | | |
72 | 93 | | |
73 | 94 | | |
| |||
302 | 323 | | |
303 | 324 | | |
304 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
305 | 343 | | |
306 | 344 | | |
307 | 345 | | |
| |||
0 commit comments