Repository navigation
test(storage): Kani proofs of encode_value (#627) — backport - #691
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #627. Backport of #690 (v3) per the spec (
docs/superpowers/specs/2026-10-22-kani-storage-encoding-design.md§3.2, §7 step 3). Test-only: no library, v7 format or WAL change.What
src/storage/index/verification.rs(5 Kani harnesses, identical to v3):encode_value—Null=[0x00];Boolean/Integer/Float/Refeach with its own type byte and order-preserving (non-NaN floats bytotal_cmp); every NaN encodes the same. Onmain,encode_valueis thevalue_bytesof the on-disk v7 indexes.Cargo.toml:[workspace.lints.rust] unexpected_cfgscheck-cfg forcfg(kani)..github/workflows/kani.yml: byte-identical to v3's. This copy drives both nightly crons (06:00 main, 18:00 v3), since scheduled runs use the default branch's file. Thekeys.rspath filters are inert onmain.TEST_COVERAGE.md,CLAUDE.md,CHANGELOG.md[Unreleased]→ Tests.Left out: the 7
keys.rsharnesses on v3 —mainhas nokeys.rs(v8 key encoding). Where NaN sorts inencode_valueis not asserted: it sorts before-0.0, filed as #688 (doc-only, no result depends on it).Verification
Complete - 5 successfully verified harnesses, 0 failures, 5 total.14 s wall, 0.5 GB peak RSS.Refbytes reversed →encode_value_ref_preserves_orderfails (all 5 mutations checked on v3, identical code).cargo build(nounexpected cfgwarning), clippy-D warnings, fmt, pre-push tests clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz