Skip to content

feat(skippy-cache): persist native runtime KV pages verbatim - #1782

Closed
i386 wants to merge 1 commit into
jy/skippy-codec-capability-contractfrom
scama/skippy-native-kv-passthrough
Closed

i386 wants to merge 1 commit into
jy/skippy-codec-capability-contractfrom
scama/skippy-native-kv-passthrough

Conversation

@i386

@i386 i386 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

Manifest v4 can identify each segment independently, but L3 still stamped every segment as raw/1. That left the native runtime KV control arm implicit and allowed a fixed-size cut to mix native KV bytes with recurrent state.

Result

  • Add the exact native-kv-page/1 segment identity and persist F32, F16, Q8_0, and Q4_0 runtime exports byte-for-byte, with no storage transcode.
  • Cut mixed payloads at the KV/recurrent boundary so native KV segments never include exact auxiliary continuation state.
  • Reject unknown native versions, incomplete descriptors, boundary-crossing segments, and representation mismatches before assembly.
  • Copy manifest descriptor metadata into L3Location so the server validates the native page descriptor and located prefix before reading segment bytes; recheck metadata after load to close the locate/load race.
  • Document native passthrough as the exact control for the remaining CacheGen quality and performance gate.

Advances #1652. This is stacked on #1752.

Validation

Exact candidate commit: 9be4e30158a34612c818aeef4d47b2a045c62ff5

  • cargo test -p skippy-cache --lib — 170 passed, 0 failed, 2 ignored
  • cargo test -p skippy-server --lib — 708 passed, 0 failed, 3 ignored
  • cargo clippy -p skippy-cache -p skippy-server --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Matched realistic-segment stopwatch on the same Apple Silicon host and debug toolchain:

  • Command: cargo test -p skippy-cache --lib l3::tests::eviction_cost_at_realistic_segment_counts -- --ignored --nocapture
  • Workload: 20 manifests × 9,504 refs, 43,347,990 manifest bytes
  • Baseline aa533c0d45e1b8af025ee9af9887de68a7f02baf: build 2,021 ms; budget enforcement 1,375 ms
  • Candidate 9be4e30158a34612c818aeef4d47b2a045c62ff5: build 2,113 ms; budget enforcement 1,396 ms

This slice does not change admission, eviction, prefix reuse, or resident capacity, so the competitive c64/c128/c256 policy matrix is unchanged.

@i386 i386 added this to the 0.77.0 milestone Sep 11, 2026
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 624ffaa9-2fcc-4e92-a3c3-da3adf646ff4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@i386

i386 commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator Author

Consolidated into #1816: #1816

This PR's head is an ancestor of the consolidated branch, so its commits and behavior remain in the combined review. Please continue review on #1816.

@i386 i386 closed this Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skippy-kv Work coordinated in Buzz #skippy-kv

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant