Repository navigation
test(storage): Kani proofs of the key and value encoders (#627) - #690
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
Twelve #[cfg(kani)] harnesses prove, for every input, that the v8 key encoders and encode_value keep the order the indexes rely on. Cargo.toml declares the kani cfg so normal builds do not warn. 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
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.
Closes #627.
Implements the spec merged in #689 (
docs/superpowers/specs/2026-10-22-kani-storage-encoding-design.md); plan indocs/superpowers/plans/2026-10-22-627-kani-storage-encoding.md. Test-only: no library,.graphformat or WAL change.What
src/storage/keys/verification.rs(7 harnesses):put_int,put_uint,put_valid_to(incl.VALID_TIME_FOREVER) preserve order;put_tx_descreverses it;float_bitspreserves IEEE total order on non-NaN, sends every NaN to one value after all others, and round-trips throughfloat_from_bits.src/storage/index/verification.rs(5 harnesses):encode_valueper variant — type byte and order forBoolean/Integer/Float/Ref,Null=[0x00], NaN canonical.Cargo.toml:[workspace.lints.rust] unexpected_cfgscheck-cfg forcfg(kani), so normal builds don't warn..github/workflows/kani.yml: runs on PRs touching the encoders, nightly per branch (06:00 main, 18:00 v3; branch chosen from the cron as ingrammar-verifier.yml), and on dispatch; a scheduled failure opens/comments onNightly Kani failure (<branch>).TEST_COVERAGE.md,CLAUDE.md,CHANGELOG.md[Unreleased]→ Tests.Deviation from the spec
--output-format terseadded to the Kani args: Kani 0.68.0 refuses-jwithout it.Verification
Complete - 12 successfully verified harnesses, 0 failures, 12 total.40 s wall, 1.1 GB peak RSS.cargo build(nounexpected cfgwarning),cargo clippy --all-features -- -D warnings,cargo fmt --check,cargo test --libclean.Decoders, strings, packed pages and the WAL are left out (spec §5): CBMC does not finish on them. The
mainbackport (encode_value harnesses only) follows as a separate PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz