Skip to content

Expose hash-proven recurrent replay boundaries - #142

Closed
FujitsuPolycom wants to merge 1 commit into
codex/glm53-dflash7-safe-warning-cleanupfrom
codex/glm53-dflash7-recurrent-boundary-contract
Closed

Expose hash-proven recurrent replay boundaries#142
FujitsuPolycom wants to merge 1 commit into
codex/glm53-dflash7-safe-warning-cleanupfrom
codex/glm53-dflash7-recurrent-boundary-contract

Conversation

@FujitsuPolycom

@FujitsuPolycom FujitsuPolycom commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Resulting behavior

The exact vLLM 0b67266a0f37d6146a8403fb8482403c62f412d5 Python overlay exposes hash-proven recurrent replay boundaries to opt-in KV connectors:

SchedulerOutput.recurrent_boundary_blocks: dict[str, list[tuple[int, int, int]]] | None

Each tuple is (group_id, block_id, boundary_tokens). An aligned Mamba entry is emitted only when the physical block is non-null, its block hash belongs to the same KV group, and block_hash_num_tokens equals floor((prompt_tokens - 1) / hash_block_size) * hash_block_size. Later running state and seven DFlash verification slots are never scanned.

Connectors opt in through supports_recurrent_boundary_blocks. Existing partial_tail_offloads remains unchanged; its copy-on-write targets are also present in the generalized hand-off. Non-opt-in connectors discard aligned candidates without taking pins.

Lifetime and failure behavior

Boundary pages are pinned through the existing request-cleanup lifetime. Overlapping producer batches defer block recycling when the connector advertises the capability, so preemption cannot recycle a handed-off page before worker execution and synchronous snapshot completion.

Request cleanup releases pins. The exact tests advance beyond the 6,912-token boundary until arithmetic slot 2 becomes null, prove the exported block remains distinct from seven later speculative slots, and verify cleanup returns its reference.

Exact source identities

  • Production patch SHA-256: 5a6561a5bbab990dcd03bfd6a485ea26c3b5a578c2fd61b76305767b16dbfba0
  • Exact-vLLM test patch SHA-256: 4a23f25b540760aa3f793427017e3ee39605e60de7af1b851cbbd6cc0faeddec
  • kv_cache_manager.py: ee03dc9c…c5b83d38…
  • sched/output.py: 65235eba…9911b3f9…
  • sched/scheduler.py: 6d397c97…260f36ce…
  • single_type_kv_cache_manager.py: e4b1c5c3…f67a1850…

The builder pins SparkCache commit 9e779c32b285e00577a7829a75192069d12685dc, tree 4df3ea1435241a688e6d44345687414605131450, deployable source SHA-256 01cc59bf2c45af60f02813b771a484e65829e4f464eb27aa1756ca7067c82c9f, and lease-contract SHA-256 45d7a92b38b836a4f829f02df85e339cfeea860e1080e4663a8340af6c125125.

Compatibility and stacking

Cache namespace impact: none. Persistent cache identities and schemas are unchanged.

This draft is stacked on SparkRing #139 at commit 2f94b8405b54658a6b54d9b3377570d320879c6f. It consumes the capability implemented by SparkCache draft #31. Integration order is SparkCache #31, then this runtime overlay.

No image was built or published, and no service or host state was changed.

Validation

  • Exact composed-source verifier — passed
  • Exact-vLLM focused tests — 5 passed
  • Overlay tests — 27 passed
  • python -m pytest runtime -q — 235 passed, 3 skipped
  • python -m ruff check . — passed
  • Local broad available-tree suite — 998 passed, 9 skipped, with one unrelated existing README assertion failure (C4 and C8 were capacity-limited is absent)`n- GitHub maintained-tree suite — 1,944 passed, 9 skipped, with the same inherited assertion failure already present on base draft Remove unused DFlash runtime warning sources #139

The exact vLLM 0b67266 overlay exposes SchedulerOutput.recurrent_boundary_blocks as request-scoped group, physical-block, and token-boundary triples. Aligned Mamba entries require exact block-hash token and group identity; later running state and seven DFlash verification slots are never scanned.

Connectors opt in through supports_recurrent_boundary_blocks. Existing partial_tail_offloads remains unchanged and its CoW targets join the generalized hand-off. Boundary pins use request cleanup lifetime, and overlapping producer batches defer block recycling until worker execution completes.

The overlay pins SparkCache commit 9e779c32b285e00577a7829a75192069d12685dc, which requires complete recurrent-group proof and accepts the four vLLM postimages in its lease contract. Cache namespace impact: none; cache identities, chunk geometry, and persistent schemas are unchanged.

Validation: exact composed-source verifier passed; exact-vLLM focused tests 5 passed; overlay tests 27 passed; runtime tests 235 passed, 3 skipped; Ruff passed. The broad available-tree suite reported 998 passed, 9 skipped, and one unrelated existing README assertion failure.
@FujitsuPolycom

Copy link
Copy Markdown
Owner Author

The resulting runtime, operator contract, and evidence are consolidated in retained draft stack #146#147#150. Independent page-base research remains in #149. Closing this superseded draft and deleting only its remote head branch.

@FujitsuPolycom
FujitsuPolycom deleted the codex/glm53-dflash7-recurrent-boundary-contract branch August 31, 2026 01:55
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