Repository navigation
feat(capacity): governed host-cache lease law — live-KV derivation + commit ceiling + sticky publication (#287 slice 1) - #2087
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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