Skip to content

feat(capacity): governed host-cache lease law — live-KV derivation + commit ceiling + sticky publication (#287 slice 1) - #2087

Merged
joelteply merged 1 commit into
canaryfrom
feat/governed-host-cache-lease-law
Aug 1, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/governed-host-cache-lease-law

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The pure law behind plan_file.budget_bytes: lease = physical − (explicit weights mmap + LIVE KV + buffers + OS floor), Windows commit ceiling, saturating to zero, StickyLease publication (sub-band jitter holds, material shrink acts now, grow-back past the band). Both halves of today's incident encoded as tested arithmetic on the 63GB box shape. Slice 2 wires the daemon tick + plan-wire publication (her C++ half already honors plan-file-only budgets). 3/3 tests green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…n + commit ceiling + sticky publication (#287 slice 1)

The pure arithmetic behind plan_file.budget_bytes, encoding both halves
of the 2026-08-01 incident as law:

- host_cache_lease_bytes: physical − (weights mmap + LIVE kv + compute
  buffers + OS floor), clamped so commit never exceeds physical on
  Windows (pagefile overcommit thrashes silently — 95.9GB-commit-on-63GB
  collapsed fetch 2.5GB/s→205MB/s). Saturating: an over-full box leases
  ZERO, never wraps. The weights term is EXPLICIT, never read from the
  free-memory monitor (file-backed mmap pages report 'available' while
  load-bearing — evicting them IS the collapse).
- KV is a LIVE input — it grows as slots fill, the exact term whose
  omission in static budgets thrashed the box to 64GB. BigMama's
  corrected measurement validates the flex: governed total 'within a GB'
  → ~6GB pinned ≈ 1 token's set ≈ ~40% retention at the recovered
  2.5GB/s.
- StickyLease: sub-band jitter never republishes (no plan-file mtime
  churn on the C++ per-token poll); material shrink publishes NOW;
  growth comes back past the band (#214 grow-back, never frozen).

Slice 2 wires this into the serving-daemon tick sampling live serving
state and publishing via the plan wire her C++ already honors
(plan-file-only budget, env input deleted on her side).

Tests: incident-box-shaped fixtures pin the law, the ceiling, the
saturation, and the sticky band. 3/3 green.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply enabled auto-merge (squash) August 1, 2026 19:31
@joelteply
joelteply merged commit d8f4136 into canary Aug 1, 2026
@joelteply
joelteply deleted the feat/governed-host-cache-lease-law branch August 1, 2026 19:31
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