Brief P10: separate limit for waiting on a slot or a model load

Approved 2026-09-17. Evidence is in docs/decisions.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-17 00:38:32 -07:00
co-authored by Claude Fable 5.1
parent 27b7ff45ee
commit adab43add1
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -34,6 +34,7 @@ Approved by the owner on 2026-09-17. One commit each.
| P7 | Inference contract 1: the baseline budget test needs the server's tokenizer, so `make gate` has an offline part and an on-device part (`make verify-device`). | `/tokenize` is a server endpoint. | | P7 | Inference contract 1: the baseline budget test needs the server's tokenizer, so `make gate` has an offline part and an on-device part (`make verify-device`). | `/tokenize` is a server endpoint. |
| P8 | Target environment: describe the shared router as deployed (router mode, `--models-max 2`, other clients on the same Ornith instance, q8_0 KV, six-hour idle unload). Drop "memory is abundant". | `docs/inference-contract.md`, "What is running". | | P8 | Target environment: describe the shared router as deployed (router mode, `--models-max 2`, other clients on the same Ornith instance, q8_0 KV, six-hour idle unload). Drop "memory is abundant". | `docs/inference-contract.md`, "What is running". |
| P9 | Inference contract 5: slots are pinned with `id_slot` but not reserved. Another client can evict a harness slot, and the router can unload Ornith. Cache loss is an expected event: `loopd` detects it (`cache_n` far below the previous request's total), logs it in the session log, and carries on. It is never an error. A session always uses the same slot; threads may share the main slot. | Shared router decision. M0 (d): evicted sessions came back from the host-RAM prompt cache in under a second on the same slot, and cost a full re-read on another slot. | | P9 | Inference contract 5: slots are pinned with `id_slot` but not reserved. Another client can evict a harness slot, and the router can unload Ornith. Cache loss is an expected event: `loopd` detects it (`cache_n` far below the previous request's total), logs it in the session log, and carries on. It is never an error. A session always uses the same slot; threads may share the main slot. | Shared router decision. M0 (d): evicted sessions came back from the host-RAM prompt cache in under a second on the same slot, and cost a full re-read on another slot. |
| P10 | Inference contract 7: a pinned request can queue behind another client's request on the same slot, and the router can spend tens of seconds reloading the model. The liveness timer starts at the first byte received, and a separate, longer "waiting for slot or model" limit covers the time before it. | Shared router decision. Needs a measurement of what the stream sends while queued. |
## Proposed changes to the design brief ## Proposed changes to the design brief
@@ -41,6 +42,5 @@ From M0 and the kickoff review. None is applied yet. Each lands as its own commi
| # | Change | Evidence | | # | Change | Evidence |
|---|---|---| |---|---|---|
| P10 | Inference contract 7: a pinned request can queue behind another client's request on the same slot, and the router can spend tens of seconds reloading the model. The liveness timer starts at the first byte received, and a separate, longer "waiting for slot or model" limit covers the time before it. | Shared router decision. Needs a measurement of what the stream sends while queued. |
| P11 | Inference contract 10: the serving flags live in `~/src/nixos`, not here. This repo records the expected values (template hash, per-slot `n_ctx`, slot count, KV type, sampling) and the startup self-test compares them with `/props` and `/slots`. KV type is recorded as q8_0. | Shared router decision. | | P11 | Inference contract 10: the serving flags live in `~/src/nixos`, not here. This repo records the expected values (template hash, per-slot `n_ctx`, slot count, KV type, sampling) and the startup self-test compares them with `/props` and `/slots`. KV type is recorded as q8_0. | Shared router decision. |
| P12 | Network isolation 2: `inferproxy` is kept. Remove the conditional about dropping it. Its upstream is the router's TCP listener on the host. | Shared router decision; M0 (g). | | P12 | Network isolation 2: `inferproxy` is kept. Remove the conditional about dropping it. Its upstream is the router's TCP listener on the host. | Shared router decision; M0 (g). |
+4 -1
View File
@@ -113,7 +113,10 @@ ordinary outbound networking can reach the whole tailnet and the internet as the
declared tool. declared tool.
7. **Liveness, not deadlines.** Streaming always, with `return_progress: true` so that prompt 7. **Liveness, not deadlines.** Streaming always, with `return_progress: true` so that prompt
processing produces events. The timeout is "no bytes for N seconds", never a total-request processing produces events. The timeout is "no bytes for N seconds", never a total-request
deadline. Progress events count as bytes. deadline. Progress events count as bytes. Before the first byte, a request may be queued behind
another client on its slot or waiting for the router to load the model. A separate, longer
limit covers that wait, and the liveness timer starts at the first byte. M2 measures what the
stream sends while a request is queued.
8. **Runaway control.** Per-turn thinking-token cap, per-turn tool-iteration cap, detection of 8. **Runaway control.** Per-turn thinking-token cap, per-turn tool-iteration cap, detection of
repeated identical tool calls. `loopd` enforces the thinking cap: it counts streamed reasoning repeated identical tool calls. `loopd` enforces the thinking cap: it counts streamed reasoning
tokens and ends the block with the server's `reasoning_control` mechanism tokens and ends the block with the server's `reasoning_control` mechanism