Skip to content

0.3.2: hash image ids and cache_salt into recovered blocks - #1

Merged
Shang-Pin merged 1 commit into
tier-aware-recoveryfrom
block-extras
Oct 19, 2026
Merged

Shang-Pin merged 1 commit into
tier-aware-recoveryfrom
block-extras

Conversation

@Shang-Pin

Copy link
Copy Markdown

Summary

  • apply_stored(..., block_extras=None) adds per-block u64 ids to each block's tokens_hash after its tokens. It uses the BlockExtraInfo that create_stored_block_from_parts already takes; until now that argument was passed None with a TODO multimodal support comment.
  • cache_salt_extra_hash(salt) -> u64 is now exported, the same id the standalone indexer derives: a 64-hex salt uses its first 16 hex digits, any other salt is its XXH3-64.
  • /kv_recover TreeDumps and gap replays now hash image and cache_salt blocks the way the live ZMQ path does (standalone-indexer: hash a vLLM cache_salt into its sequence's first block dynamo#53, #54). Before this, recovered blocks went on the token-only path until evicted.
  • block_extras defaults to None, which keeps 0.3.1 behavior. Version bumped to 0.3.2. Based on tier-aware-recovery, where 0.3.1 lives.

Validation

  • ./build_wheel.sh (manylinux_2_28, cp312) builds.
  • In the vllm:v0.29.1rc0-ds4-patches-* image, with this wheel installed and the engine feed from vllm-private branch v0.29.1rc0-ds4-ready-kvextras: the tokens_hash values in a local-indexer dump match the hash vectors shared with the dynamo and deepapi tests (salted, salted plus image, plain). 34/34 KV-event tests pass.

After merge

./release.sh v0.3.2: the v0.29.1rc0-ds4 engine Dockerfile installs from that release URL. This also closes the gap left by 0.3.1, which never got a release.

🤖 Generated with Claude Code

apply_stored takes block_extras: per-block lists of u64 ids that are mixed
into each block's tokens_hash after its tokens, via the BlockExtraInfo that
create_stored_block_from_parts already accepts (it was passed None, with a
"TODO multimodal support" comment). This lets /kv_recover dumps and gap
replays hash image blocks and a request's cache_salt the same way the
standalone indexer's live ZMQ path does (deepinfra/dynamo #53/#54). Without
it, recovered blocks went on the token-only path.

Also export cache_salt_extra_hash(salt) -> u64, so the engine derives the
salt id with the same XXH3 as the indexer instead of needing Python xxhash.

block_extras defaults to None, which keeps 0.3.1 behaviour.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Shang-Pin
Shang-Pin marked this pull request as ready for review October 19, 2026 21:22
@Shang-Pin
Shang-Pin merged commit c9ea318 into tier-aware-recovery Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant