v1 plan: Chooser free slots are per model (task 05 rule corrected, task 08 step 1b); note the finding

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 06:50:09 -07:00
co-authored by Claude Fable 5.1
parent c2136b3515
commit dc6066be8b
3 changed files with 19 additions and 2 deletions
+8 -1
View File
@@ -30,6 +30,13 @@ check failed and crossbar's log. A failure is a defect in tasks 01–07 **or in
code only when a rule from an earlier task was broken; if the script's expectation contradicts a
task rule, stop and report which.
- [ ] **1b. One known owner finding to fix before the smoke can pass.** `proxy.Chooser`
(task 05, `internal/proxy/hosts.go`) computes `Free` with `lim.FreeSlots(host)`, which sums the
slots of *every* model on the host; the rule now reads: `Free` = free slots **for the requested
model** = `cfg.Hosts[host].Models[model].Parallel - lim.InFlight(host, model)`, floored at 0,
and 0 when the host does not list the model. Make that change (only that), run
`go test -race -count=1 ./internal/proxy/` (must stay `ok`), then re-run `make smoke`. This is
the one code change this task makes; record it in Deviations as an owner-directed fix.
- [ ] **2. Update `README.md`.** Keep the seven v0 sections; change: the intro (leases, not "first
healthy host"); `## Configure` gets `db`, `lease_idle`, `retention`, `queue_max` in the table and
the new `example.toml`; `## Point clients at it` adds the `X-Crossbar-Route` header
@@ -40,7 +47,7 @@ task rule, stop and report which.
- [ ] **3. Run the gate.** `make gate`. **4. Log and commit.** Row `v1/08-smoke-readme`, with the smoke line in Notes.
```sh
git add tools/smoke.sh cmd/fakeupstream/main.go README.md docs/implementer-log.md
git add tools/smoke.sh cmd/fakeupstream/main.go internal/proxy README.md docs/implementer-log.md
git commit
```