Replace partial terminal HMA pages in page deltas - #28
Closed
FujitsuPolycom wants to merge 1 commit into
Closed
Conversation
Page-semantic extensions accept authenticated chunk boundaries that fall inside a larger HMA page. The delta reuses only byte-identical page prefixes, so a changed boundary-intersecting page and every following page are immutable replacement data. This preserves the longest verified publication base instead of falling back to a full snapshot. Restore continues to authenticate the embedded base graph and reconstructed result before placement; invalid geometry or bytes remain a cache miss and recomputation. Cache namespace impact: none. CacheIdentity values, digest salts, chunk geometry, and page-delta wire schemas are unchanged. Validation: python -m pytest sparkcache -q (740 passed, 7 skipped); python -m pytest deploy -q (108 passed, 1 skipped); python -m ruff check .
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
Page-semantic HMA extensions accept an authenticated cache boundary that falls inside a larger group page. The codec compares complete opaque pages and carries a changed boundary-intersecting page, plus every following page, as immutable replacement data. Earlier byte-identical pages remain shared with the verified base snapshot.
The connector therefore retains the longest all-rank publication base instead of discarding a valid 7,168-token base when a 2,304-token recurrent page crosses that boundary.
Correctness
Restore authenticates the embedded base manifest, delta objects, layout, block counts, semantic token boundaries, and reconstructed result digest before placement. Invalid metadata or bytes still produce a cache miss and recomputation.
The GPU-free regression exercises
SparkContextCacheConnectorwith the realManifestStore: it stores and restores a 7,168-token GLM-shaped base, publishes a 12,032-token page delta, verifies that the encoded page payload remains smaller than a full snapshot, and restores full-attention and recurrent state byte-for-byte.Compatibility
Cache namespace impact: none.
CacheIdentityvalues, digest salts, chunk geometry, andsparkcache-hybrid-page-delta/v1andsparkcache-page-delta-manifest/v1wire schemas are unchanged.This draft is stacked on #25 at commit
5d571018de5b63a9a90e5c11e6d6e86bbff4a957.Validation
python -m pytest sparkcache -q— 740 passed, 7 skippedpython -m pytest deploy -q— 108 passed, 1 skippedpython -m ruff check .— passed