Skip to content

feat(resources): embed lane reserves a standing VRAM floor; serving budgets around it (#225) - #2188

Merged
joelteply merged 1 commit into
canaryfrom
feat/embed-lane-reservation-floor
Aug 8, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/embed-lane-reservation-floor

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Per Joel's ruling ('the budgeter just has all its parts figure it out'): the reservation-floor machinery existed with zero production callers. Now: embedder resolve claims its 1792MiB floor → serving's plan budget reads available_for("serving") (net of others' floors, same math acquire enforces) → one bounded retry bridges transients. Regression test included; resources 137/137.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…budgets around it — the parts figure it out (#225)

Joel's ruling (2026-08-08): "At worst it ought to turn to paging, or the
budgeter just has all its parts figure it out." Measured the same day: the
serving window grew to fill the board, leaving 604 MiB governed-available
against the embedder's 1792 MiB per-call need — 113 refusals in 25 min,
embedding fully dead, every recall degraded to no-relevance. The refusal
message said "tier down serving and retry" but nothing ever told serving.

The negotiation was already BUILT and never wired: the ledger has
per-consumer reservation floors, `available_for` (global available minus
every OTHER consumer's unmet floor), and enforcement in `acquire` — with
zero production callers. Three wires close the loop:

1. RESOLVE → FLOOR: when the neural embedder resolves (this node embeds),
   it reserves EMBED_LANE_VRAM_BYTES on the board (`embed.vram.reserved`
   probe). A node with no embed model wastes nothing. The two constants
   move to module-level pub in llamacpp_adapter — ONE source for the
   per-call lease and the floor.
2. SERVING BUDGETS FROM ITS OWN VIEW: `governed_vram_ceiling` now returns
   `available_for("serving", Vram)` — the same math `acquire` enforces —
   instead of the reservation-blind global number, so the plan can no
   longer size the window into a slice it would then be refused. The
   None-when-no-Vram-row semantics ("governor hasn't reported" ≠ "zero
   free") are untouched. `available_for` exposed on governor + daemon.
3. ONE bounded retry (2s) on a per-call lease refusal — with the floor in
   place a refusal means transient over-commit, and relief lands within a
   governor tick. Second refusal stays the honest loud failure. One retry,
   never a loop.

Regression test: serving_budget_plans_around_other_consumers_floors —
floor shrinks serving's plannable view by exactly the slice; serving's own
floor never counts against itself; board-row None semantics preserved.

cargo check green; new test + resources 137/137.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 17095f6 into canary Aug 8, 2026
@joelteply
joelteply deleted the feat/embed-lane-reservation-floor branch August 8, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant