-
Notifications
You must be signed in to change notification settings - Fork 173
[runtime/storage] Versioned Blobs #2694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
commonware-mcp | 4f3efd5 | Jan 07 2026, 03:30 AM |
b74c985 to
d2ba62b
Compare
Deploying monorepo with
|
| Latest commit: |
4f3efd5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4d12b3b2.monorepo-eu0.pages.dev |
| Branch Preview URL: | https://danlaine-add-header.monorepo-eu0.pages.dev |
baa545c to
428bb3d
Compare
BlobBlob
BlobBlob
7ca400b to
c6b0941
Compare
c6b0941 to
c189830
Compare
- Add versions to auditor hash in audited.rs - Add Header to conformance testing with codec traits and Arbitrary impl - Deduplicate header handling across storage implementations: - Header::missing() checks if blob needs fresh header - Header::for_new_blob() creates header for new blob - Header::from_existing() validates existing header - Remove to_bytes()/from_bytes() in favor of codec encode()/decode() - Propagate arbitrary feature to dependent crates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add test_header_validate_header_version_mismatch in lib.rs - Add test_blob_version_mismatch in iouring.rs (matching memory.rs and tokio) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Move Header struct to storage/mod.rs with pub(crate) visibility - Rename fields: application_version -> blob_version, header_version -> runtime_version - Rename methods: for_new_blob -> new, from_existing -> from - Consolidate BlobMagicMismatch and BlobRuntimeVersionMismatch into opaque BlobCorrupt error - Add standalone DEFAULT_BLOB_VERSION const in lib.rs - Add versions to auditor hash in audited.rs - Move conformance tests to storage/mod.rs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove Header section from Blob trait (implementation detail) - Simplify Versions section to generic explanation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix Header import in iouring.rs (use super::Header) - Add doc links to DEFAULT_BLOB_VERSION 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
BlobMove partition/name context handling to call sites via map_err, keeping Header methods focused on validation logic only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Move test_blob_version_mismatch to run_storage_tests - Remove duplicate version mismatch tests from each backend - Keep test_blob_header_handling (tests raw byte layout per backend) - Keep test_blob_magic_mismatch (tests corrupted file integration) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Aligns error mapping with iouring backend for consistency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #2694 +/- ##
==========================================
+ Coverage 92.90% 92.91% +0.01%
==========================================
Files 363 363
Lines 107717 108104 +387
==========================================
+ Hits 100075 100450 +375
- Misses 7642 7654 +12
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Closes: #2404
Blob. The header is composed of 4 magic bytes, a u16 header version and a u16 application version. The application in this instance is whoever is using theBlob.Blobopen, check for existing header and validate it. If the blob doesn't exist, we write a header.Storage::openis now a default method which usesHeader::DEFAULT_APPLICATION_VERSION(0) as the only acceptable version.Blobs therefore now use application version0(since they are opened withStorage::open_versioned).[1, 7]are treated as corrupt (it should have at least the header) and overwritten on next open.One thing I don't like about this PR is that all Blob implementations re-implement the logic for adding the header length to offset calculations. Is it worth making a wrapper type to handle that? Ehh I dunno.