Skip to content

Validate recurrent proof at publication time - #38

Closed
FujitsuPolycom wants to merge 6 commits into
codex/pr35-recurrent-lease-coherencefrom
codex/nonaligned-recurrent-boundary
Closed

Validate recurrent proof at publication time#38
FujitsuPolycom wants to merge 6 commits into
codex/pr35-recurrent-lease-coherencefrom
codex/nonaligned-recurrent-boundary

Conversation

@FujitsuPolycom

@FujitsuPolycom FujitsuPolycom commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Outcome

SparkCache now latches the exact pinned recurrent publication source from any scheduler output and publishes only after every recurrent group is proven.

vLLM can expose either a full-page replay boundary or a partial-tail copy-on-write target. The partial tail may replace the source block after SparkCache first observes the request table, so accumulated table IDs are never accepted as recurrent proof. A recurrent store remains pending across scheduler steps. Complete request-, group-, block-, and boundary-matched mappings are latched; valid older checkpoint entries are ignored; outputs with no exact-target entry preserve the latch; incomplete, malformed, contradictory, or changed mappings poison the attempt. Preemption clears the request-lifetime latch, resume requires fresh proof, and request completion or full store quorum retires pending state.

The GPU-free regression uses the real GLM hybrid topology at build_connector_meta. It covers an early mapping followed by absence, a delayed aligned mapping, the live 8,192-token nonaligned boundary with a later CoW mapping, selection of that CoW block instead of the accumulated source ID, chunked-prefill waiting, conflicts, incomplete coverage, preempt/resume, finish cleanup, quorum retirement, and manifest round-trip restore.

The exact lease contract retains the verified exact-stop producer postimage. An overshooting direct Mamba-manager call cannot recover an earlier nulled arithmetic page and therefore emits no mapping; SparkRing's scheduler regressions enforce the aligned split and the delayed partial-tail path.

Exact source identity

  • parent: SparkCache PR Make the recurrent lease state coherent #37 commit 49c517e
  • final commit: c56f77f
  • final Git tree: deac36758f86695cd13f07b2870c2e49842aed9c
  • deployable SparkCache source SHA-256: 788686e858ba4af01f535e95122c7650f412fddc40cd221a0924f4ce2b32ff98
  • lease-contract SHA-256: f36ed14eaf1f97a5dffa94bda8151b1e0fa182afc0d121b757b70bebc6a43811

Cache namespace impact

None. CacheIdentity values, digest salts, 256-token geometry, manifest schemas, page-delta bytes, and page-tail-cow-v1 are unchanged. Missing or unproven recurrent state remains unpublished and recomputes.

Validation

  • python -m pytest sparkcache -q: 764 passed, 7 skipped
  • python -m pytest deploy -q: 108 passed, 1 skipped
  • python -m ruff check .
  • strict eleven-file source verifier passed in the final SparkRing composition
  • git diff --check

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

vLLM exposes a hash-proven aligned recurrent block only after the prefill step that produces it, while nonaligned publication boundaries have no separate hand-off. Retain recurrent new-request store state through the following cached step, validate only when that step can publish, and require mappings only for recurrent groups exactly aligned at the store boundary. Nonaligned groups use the authoritative partial page in the accumulated request table; unexpected overrides and missing aligned proofs still fail closed.

Cache namespace impact: none. CacheIdentity values, digest salts, 256-token geometry, manifest schemas, page-delta bytes, and the page-tail-cow-v1 namespace are unchanged.

Validation: python -m pytest sparkcache -q (763 passed, 7 skipped); python -m pytest deploy -q (108 passed, 1 skipped); python -m ruff check .; git diff --check.
A recurrent partial page can be replaced after the initial request table is observed. Its durable publication source is the pinned block delivered by vLLM partial_tail_offloads, not the accumulated source ID. Treat absent per-request metadata as pending, latch complete validated mappings from any scheduler output, reject incomplete or conflicting evidence, and publish only after every recurrent group has a proven block. Preemption clears the latch; completion and quorum retire pending state.

Cache namespace impact: none. CacheIdentity values, digest salts, 256-token geometry, manifest schemas, page-delta bytes, and page-tail-cow-v1 are unchanged.

Validation: python -m pytest sparkcache -q (764 passed, 7 skipped after isolated timing rerun); python -m pytest deploy -q (108 passed, 1 skipped); python -m ruff check .; git diff --check.
The recurrent producer now identifies a replay-boundary block when one cache_blocks call crosses that boundary, rather than requiring the caller's token count to equal it. Advance the exact single_type_kv_cache_manager postimage and lease-contract receipt while retaining the same required symbol surface.

Cache namespace impact: none. CacheIdentity values, digest salts, chunk geometry, manifest schemas, page-delta bytes, and page-tail-cow-v1 are unchanged.

Validation: strict eleven-file verifier passed against the composed vLLM source; SparkCache 764 passed, 7 skipped; deploy 108 passed, 1 skipped; Ruff and diff checks passed.
An overshooting Mamba cache_blocks call has already nulled the earlier arithmetic boundary slots, so the crossing postimage cannot prove or recover that state. Restore the verified exact-stop producer postimage and lease contract. Scheduler-level regression coverage owns the invariant that aligned GLM prefill stops at the 2,304-token boundary; nonaligned 8,192 publication uses the next-step partial-tail CoW hand-off latched by SparkCache.

Cache namespace impact: none. CacheIdentity values, digest salts, chunk geometry, manifest schemas, page-delta bytes, and page-tail-cow-v1 are unchanged.
vLLM can emit a valid aligned checkpoint while a request is still advancing toward a later SparkCache publication boundary. Treat well-formed entries below the store plan as intermediate evidence: do not latch or poison them. Continue waiting until every recurrent group supplies proof at the exact target boundary. Future, malformed, null, non-recurrent, incomplete, and conflicting target entries remain fail-closed.

Cache namespace impact: none. CacheIdentity values, digest salts, 256-token geometry, manifest schemas, page-delta bytes, and page-tail-cow-v1 are unchanged.

Validation: SparkCache 764 passed, 7 skipped; deploy 108 passed, 1 skipped; Ruff and diff checks passed.
Keep future-boundary evidence fail-closed, but include its observed boundary, target boundary, recurrent group, and physical block in the rejection reason. This makes the live scheduler hand-off diagnosable without changing acceptance semantics.

Cache namespace impact: none. CacheIdentity values, digest salts, chunk geometry, manifests, page deltas, and page-tail-cow-v1 are unchanged.

Validation: SparkCache 765 passed, 7 skipped; deploy 108 passed, 1 skipped; Ruff and diff checks passed.
@FujitsuPolycom

Copy link
Copy Markdown
Owner Author

The resulting behavior and evidence are consolidated in retained draft stack #39#42#44. Independent heat and SSD research remains in #36. Closing this superseded draft and deleting only its remote head branch.

@FujitsuPolycom
FujitsuPolycom deleted the codex/nonaligned-recurrent-boundary branch August 31, 2026 02:09
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