Commit 2f4bb27
committed
fix(runtime-host): refuse a retired fake-backend session with the product reason
Dropping the `fake` registration left activation dispatching off a durable
header value with no factory behind it, so a session or Automation persisted by
an older build failed its next turn with `No backend factory registered for
kind="fake"`. The Desktop composer does gate these rows — `sendBlocked` reads a
destructive `sessionHealthNotice`, which `projectSessionSendOutcome` raises for
`fake_backend` — but that is a renderer gate, not an authority: `maka run`
resumes an existing session through a readiness check that only inspects the
connection catalog, and a persisted Automation template still accepts
`execution.backend: 'fake'`.
Register an explicit refusal where the test backend used to be. It throws the
canonical `NO_REAL_CONNECTION:fake_backend` error, which `parseNoRealConnectionError`
already turns into the copy both surfaces show for these rows: the task came
from the retired local simulation, add a real model and start a new one.
Rewriting the durable header to `ai-sdk` on the read path was the alternative
and is worse: it destroys the fact that drives that copy, and leaves a session
that looks runnable while its `llmConnectionSlug` still points at nothing, so
the failure would resurface later and less specifically.
Generated-by: Claude Code1 parent 4a19d4e commit 2f4bb27
2 files changed
Lines changed: 56 additions & 0 deletions
File tree
- packages/runtime-host/src
- __tests__
- server
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
381 | 421 | | |
382 | 422 | | |
383 | 423 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
3 | 7 | | |
4 | 8 | | |
| |||
285 | 289 | | |
286 | 290 | | |
287 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
288 | 304 | | |
289 | 305 | | |
290 | 306 | | |
| |||
0 commit comments