Repository navigation
feat: separate external KV outcome and retirement - #2
Merged
Merged
Conversation
feichai0017
marked this pull request as ready for review
November 15, 2026 08:29
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
An external cache operation may fail while its device or transport still accesses borrowed pages.
CacheTransferseparates that logical outcome from a successful physical-retirement receipt. The existing Engine storage job retains its page loans and exact exported views until both are observed.This is the first implementation step of #1, stacked on
docs/hierarchical-kv-cache. It adds no provider adapter or second coordinator.Owner contract
CacheStorage.loadandstorereturnCacheTransfer(outcome, retirement). Lookup remains advisory. Standalone callers usetransfer.wait(timeout=...); one timeout budget covers both receipts.MemoryCacheStorageimplements the two receipts. Its failed fence stays sticky, andclose()reports it without retrying native cleanup.docs/releases.md; the provider guide and external-KV design describe the migration and remaining work.The correspondence follows vLLM's scheduler/worker separation and delayed block release, and SGLang's registered pools and named state components. Exact source revisions are pinned in
docs/external-kv-design.md. Neither reference becomes a dependency.Imported baseline repairs
These are separate commits from the receipt implementation:
Validation
All 5/5 checks pass on head
9f3665b1fce003c9fd793d85584d856b17dc2199:Commands:
uv sync --locked --no-default-groups --group test,uv run --no-sync python scripts/check.py, and the 50-iteration pytest step in.github/workflows/ci.yml. The full local development check also passed, including installed packages. Changed documentation links/anchors andgit diff --checkpass.The new controls drive real Engine jobs, page charges and real CPU byte views. They force logical completion before retirement, cancellation, close and final-reference drop with events. A counterfactual that bypasses the retirement gate fails the page-charge assertion; restoring the old daemon watcher fails the joined-watcher assertion. Logs stay outside Git. GPU, cached-model and platform skips are reported, not counted as hardware evidence.
Handoff
9f3665b1fce003c9fd793d85584d856b17dc2199; base: docs: design hierarchical external KV cache #1 at10ef0ee. Implemented for review, not independently accepted.