Skip to content

[runtime] Fuzz and freeze atomic blob storage - #4433

Draft
patrick-ogrady wants to merge 1 commit into
atomic-blobs-model-testsfrom
atomic-blobs
Draft

[runtime] Fuzz and freeze atomic blob storage#4433
patrick-ogrady wants to merge 1 commit into
atomic-blobs-model-testsfrom
atomic-blobs

Conversation

@patrick-ogrady

@patrick-ogrady patrick-ogrady commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the final adversarial and format-locking layer for atomic blob storage:

  • an atomic_storage_operations target covering direct and batch operations, recovery cycles, stale integrity tokens, removal, and recreation;
  • an atomic_migration target covering ordinary-to-atomic retry across precommit and postcommit failures;
  • deterministic regression wrappers for both targets; and
  • the conformance fixture that freezes the atomic identity, root, witness, and slot-placement bytes.

This is layer 6 of 6 at the top of the atomic blob stack. The cohesive engine is in #4490, remaining adapters are in #4502, migration is in #4495, exhaustive behavioral coverage is in #4491, and the bounded crash models are in #4492.

Review focus

  • Fuzz inputs remain bounded and deterministic while still spanning crash/reopen histories.
  • Tokens from a dropped and reopened lineage are always stale, even when durable generations roll back to the same value.
  • Migration fuzzing proves logical retry over Faulty<Memory>; filesystem copy, rename, and directory-sync cuts remain covered by the backend tests below this layer.
  • The conformance change is deliberate and limited to the new atomic format fixture.

Diff size

  • Production code: +0 / -0 LOC
  • Tests and test infrastructure: +1889 / -0 LOC
  • Total: +1889 / -0 LOC

Counts are physical diff lines, including comments and blank lines. Test-only files, hooks, and lines inside #[cfg(test)] modules are counted as tests; everything else is counted as production code.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploying monorepo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 10eac97
Status: ✅  Deploy successful!
Preview URL: https://b295439b.monorepo-eu0.pages.dev
Branch Preview URL: https://atomic-blobs.monorepo-eu0.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
commonware-mcp 10eac97 Aug 15 2026, 04:08 PM

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

Benchmark results

Regressions: 0.

✅ `qmdb::merkleize/v=any::unordered::fixed::mmr k=10000 ch=false s=true cc=true` (2/2 gates passed)
Field Value
Package commonware-storage
Benchmark target qmdb_gungraun
Variant qmdb::merkleize/v=any::unordered::fixed::mmr k=10000 ch=false s=true cc=true
Filter *::bench_merkleize::any_unordered_fixed_mmr
Baseline suite commonware-storage
Gates EstimatedCycles should decrease; tolerance 10.00%; blob_reads should decrease; tolerance 10.00%
Cargo flags --features test-traits
Metric Baseline Current Delta Gate
Ir 13,159,318 13,068,250 -0.69% -
L1hits 16,819,414 16,688,490 -0.78% -
LLhits 94,113 95,623 +1.60% -
RamHits 11,467 10,718 -6.53% -
TotalRW 16,924,994 16,794,831 -0.77% -
EstimatedCycles 17,691,324 17,541,735 -0.85% EstimatedCycles should decrease; tolerance 10.00%
blob_reads 158 158 +0.00% blob_reads should decrease; tolerance 10.00%
✅ `qmdb::merkleize/v=current::ordered::fixed::mmb chunk=256 k=10000 ch=false s=true cc=true` (2/2 gates passed)
Field Value
Package commonware-storage
Benchmark target qmdb_gungraun
Variant qmdb::merkleize/v=current::ordered::fixed::mmb chunk=256 k=10000 ch=false s=true cc=true
Filter *::bench_merkleize::current_ordered_fixed_mmb_chunk_256
Baseline suite commonware-storage
Gates EstimatedCycles should decrease; tolerance 10.00%; blob_reads should decrease; tolerance 10.00%
Cargo flags --features test-traits
Metric Baseline Current Delta Gate
Ir 15,488,996 15,455,948 -0.21% -
L1hits 20,313,311 20,341,257 +0.14% -
LLhits 132,020 137,570 +4.20% -
RamHits 17,946 17,199 -4.16% -
TotalRW 20,463,277 20,496,026 +0.16% -
EstimatedCycles 21,601,521 21,631,072 +0.14% EstimatedCycles should decrease; tolerance 10.00%
blob_reads 235 235 +0.00% blob_reads should decrease; tolerance 10.00%

Baseline commit(s): f04a442f1c3c

@patrick-ogrady patrick-ogrady changed the title [storage] Atomic Storage [runtime] Add Atomic Blob Storage Aug 9, 2026
Comment thread cryptography/src/crc32/mod.rs
Comment thread cryptography/src/crc32/mod.rs Outdated
Comment thread runtime/src/atomic.rs Outdated
Comment thread runtime/fuzz/fuzz_targets/atomic_storage_operations.rs
Comment thread runtime/src/atomic.rs Outdated
@patrick-ogrady
patrick-ogrady changed the base branch from main to atomic-blobs-model-tests August 14, 2026 18:48
@patrick-ogrady patrick-ogrady changed the title [runtime] Add Atomic Blob Storage [runtime] Fuzz and freeze atomic blob storage Aug 14, 2026
Comment thread runtime/src/lib.rs
Comment thread cryptography/src/crc32/mod.rs Outdated
Comment thread runtime/fuzz/fuzz_targets/atomic_storage_operations.rs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 10eac97. Configure here.

panic!("publication failed outside its injected I/O phase: {faults:?}")
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write fault ignores retention

Medium Severity

failed_publication maps Failure::Write to the predecessor world only, while Faults::config still attaches write_retention for that failure. Under Faulty storage, a failing write with retention durably commits retained prepared-root bytes before returning an error, so recovery can legally select the candidate. Failure::Sync already branches on retention; Write does not, so the model rejects valid candidate recoveries and can panic the fuzz target.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 10eac97. Configure here.

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.54%. Comparing base (e66b230) to head (10eac97).

@@                    Coverage Diff                    @@
##           atomic-blobs-model-tests    #4433   +/-   ##
=========================================================
  Coverage                     95.54%   95.54%           
=========================================================
  Files                           609      609           
  Lines                        280523   280523           
  Branches                       6944     6944           
=========================================================
+ Hits                         268035   268037    +2     
+ Misses                        10233    10229    -4     
- Partials                       2255     2257    +2     

see 11 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e66b230...10eac97. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@patrick-ogrady patrick-ogrady added this to the v2026.9.0 milestone Aug 19, 2026
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