Skip to content

test: restored wrapped ring continues like the live ring - #209

Merged
solderzzc merged 1 commit into
mainfrom
test/hybrid-wrapped-ring-continuation
Oct 5, 2026
Merged

solderzzc merged 1 commit into
mainfrom
test/hybrid-wrapped-ring-continuation

Conversation

@solderzzc

@solderzzc solderzzc commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Add a regression test for the hybrid prompt cache with --ctx-size (#207): a RotatingKVCache restored from a wrapped snapshot must keep behaving like the uninterrupted live ring.

The test saves a ring that has wrapped (maxSize 16, 40 tokens), restores it through restoreExactPrefix, then feeds the restored ring and the live ring the same 5-token prefill chunk plus 6 single-token decode steps, and asserts identical offset, metaState and state window. It runs with keep = 0 and keep = 2.

Tests only; no source changes.

Test plan

  • HybridPromptCacheTests passes locally on current main
  • CI

AI disclosure

This PR was prepared with AI assistance (Claude Code).

  • I have read this PR description

🤖 Generated with Claude Code

Covers resuming a wrapped RotatingKVCache from a hybrid-cache snapshot and then
prefilling a chunk and decoding, with keep=0 and keep=2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@solderzzc
solderzzc merged commit 0669d38 into main Oct 5, 2026
14 checks passed
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