Consume hash-proven recurrent replay boundaries - #31
Closed
FujitsuPolycom wants to merge 1 commit into
Closed
Conversation
SparkCache opts into vLLM recurrent-boundary hand-offs and accepts them only when request, group, token boundary, recurrent topology, and non-null physical block agree. Every aligned recurrent group must have exactly one proven block before a store plan is created. Absent, incomplete, contradictory, or preemption-stale metadata cancels publication. SparkCache never scans arithmetic, running, or speculative slots for a substitute. GPU-free coverage exercises the 6,912-token boundary with seven DFlash verification slots through SparkContextCacheConnector and ManifestStore, including malformed coverage and request-lifetime cleanup. The exact GLM vLLM lease contract accepts and requires the recurrent-boundary runtime postimages and SchedulerOutput interface. Cache namespace impact: none. CacheIdentity values, digest salts, chunk geometry, manifest schemas, and page-delta wire bytes are unchanged. Deployable SparkCache source SHA-256: 01cc59bf2c45af60f02813b771a484e65829e4f464eb27aa1756ca7067c82c9f. Validation: python -m pytest sparkcache -q (752 passed, 7 skipped); python -m pytest deploy -q (108 passed, 1 skipped); python -m ruff check .; source-attestation tests (2 passed). One concurrent validation run exceeded an existing sub-millisecond timing assertion; the isolated test and the following full SparkCache run passed.
This was referenced Aug 30, 2026
Owner
Author
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.
Resulting behavior
SparkCache opts into vLLM recurrent replay-boundary hand-offs through
supports_recurrent_boundary_blocks. A store plan is created only whenSchedulerOutput.recurrent_boundary_blockssupplies exactly one(group_id, block_id, boundary_tokens)triple for every aligned recurrent group and every triple matches the request, store boundary, registered topology, and a non-null physical block.The worker snapshots those proven blocks through the ordinary page-snapshot path. SparkCache never scans an arithmetic request-table slot or later running/speculative slots for a substitute.
Correctness
Absent, incomplete, malformed, wrong-boundary, wrong-group, null, duplicate, or preemption-stale metadata cancels publication. Request serving continues and recomputes on a later cache miss.
GPU-free regression D-17 models the live GLM geometry: a 6,912-token replay boundary, 2,304-token recurrent pages, a reclaimed arithmetic slot, and seven DFlash verification slots. It round-trips the explicit boundary through
SparkContextCacheConnectorand the realManifestStore, then verifies byte-exact full-attention and recurrent restore. Negative coverage includes a stale non-null arithmetic slot and incomplete coverage across two recurrent groups.The exact GLM vLLM lease contract accepts and requires the four recurrent-boundary runtime postimages.
Compatibility
Cache namespace impact: none.
CacheIdentityvalues, digest salts, chunk geometry, manifest schemas, and page-delta wire bytes are unchanged.Deployable SparkCache source SHA-256:
01cc59bf2c45af60f02813b771a484e65829e4f464eb27aa1756ca7067c82c9f.This draft is stacked on SparkCache #29 at commit
19e2ec8b59c84ef359c2a3290f86962e3ff71d96. The paired runtime overlay is SparkRing draft #142 at commit30b937be535db4113b4254458a2def1cf8e7535b. Integration order is this SparkCache consumer, then SparkRing #142.Validation
python -m pytest sparkcache -q— 752 passed, 7 skippedpython -m pytest deploy -q— 108 passed, 1 skippedpython -m ruff check .— passedOne concurrent validation run exceeded an existing sub-millisecond timing assertion. The isolated timing test and the following full SparkCache suite passed.