Skip to content

[runtime] Test atomic blob publication and recovery - #4491

Draft
patrick-ogrady wants to merge 1 commit into
atomic-blobs-migrationfrom
atomic-blobs-unit-tests
Draft

[runtime] Test atomic blob publication and recovery#4491
patrick-ogrady wants to merge 1 commit into
atomic-blobs-migrationfrom
atomic-blobs-unit-tests

Conversation

@patrick-ogrady

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

Copy link
Copy Markdown
Contributor

Summary

Adds exhaustive unit and backend-integrated coverage for the atomic blob engine in #4490, the remaining adapters in #4502, and the migration layer in #4495. The tests are isolated in runtime/src/atomic/tests.rs, with only narrow #[cfg(test)] pause and metric hooks added beside the owning backends.

This is layer 4 of 6 in the atomic blob stack. It changes no non-test runtime behavior.

Review focus

  • Direct and grouped append, rewind, tag, integrity, sync, removal, scan, and migration lifecycles.
  • Corrupt, torn, stale, aliased, oversized, and otherwise adversarial roots, identities, witnesses, and payloads.
  • Recovery linearization, cleanup debt, cancellation after admission, detached work, and same-name namespace exclusion.
  • Wrapper/backend symmetry across memory, Tokio, metered, audited, faulty, and deterministic storage.

Diff size

  • Production code: +0 / -0 LOC
  • Tests and test infrastructure: +8788 / -0 LOC
  • Total: +8788 / -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 14, 2026

Copy link
Copy Markdown

Deploying monorepo with  Cloudflare Pages  Cloudflare Pages

Latest commit: d826af2
Status: ✅  Deploy successful!
Preview URL: https://a26319f6.monorepo-eu0.pages.dev
Branch Preview URL: https://atomic-blobs-unit-tests.monorepo-eu0.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 14, 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 0903201 Aug 14 2026, 09:05 PM

@github-actions

github-actions Bot commented Aug 14, 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,714 -0.69% -
L1hits 16,819,414 16,688,464 -0.78% -
LLhits 94,113 96,432 +2.46% -
RamHits 11,467 10,789 -5.91% -
TotalRW 16,924,994 16,795,685 -0.76% -
EstimatedCycles 17,691,324 17,548,239 -0.81% 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,459,391 -0.19% -
L1hits 20,313,311 20,335,673 +0.11% -
LLhits 132,020 139,628 +5.76% -
RamHits 17,946 17,377 -3.17% -
TotalRW 20,463,277 20,492,678 +0.14% -
EstimatedCycles 21,601,521 21,642,008 +0.19% 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 force-pushed the atomic-blobs-unit-tests branch from 04e079f to c4467d1 Compare August 14, 2026 19:37
@patrick-ogrady
patrick-ogrady changed the base branch from atomic-blobs-production to atomic-blobs-migration August 14, 2026 19:37
@patrick-ogrady
patrick-ogrady force-pushed the atomic-blobs-unit-tests branch from c4467d1 to 173fd46 Compare August 14, 2026 20:45
@patrick-ogrady
patrick-ogrady force-pushed the atomic-blobs-unit-tests branch from 173fd46 to 0903201 Compare August 14, 2026 21:04
@patrick-ogrady
patrick-ogrady force-pushed the atomic-blobs-unit-tests branch from 0903201 to d826af2 Compare August 15, 2026 16:07

@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.

Reviewed by Cursor Bugbot for commit d826af2. Configure here.

assert!(
retry_was_blocked,
"an ordinary retry open overtook an admitted migration"
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Weak migration cancel fencing check

Medium Severity

canceled_admitted_migration_fences_ordinary_retry_open treats a single yield_now plus !retry.is_finished() as proof that an ordinary open was fenced by the admitted migration. A just-spawned open almost never finishes in one yield whether or not it waits on namespace, so retry_was_blocked can pass without proving same-name exclusion. namespace_was_fenced only shows the migration holds the lock, not that open takes it.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d826af2. 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 (e866a9d) to head (d826af2).

@@                    Coverage Diff                     @@
##           atomic-blobs-migration    #4491      +/-   ##
==========================================================
+ Coverage                   95.24%   95.54%   +0.30%     
==========================================================
  Files                         609      609              
  Lines                      280494   280523      +29     
  Branches                     6942     6944       +2     
==========================================================
+ Hits                       267149   268038     +889     
+ Misses                      10996    10228     -768     
+ Partials                     2349     2257      -92     
Files with missing lines Coverage Δ
runtime/src/atomic.rs 97.35% <ø> (+26.32%) ⬆️
runtime/src/storage/metered.rs 100.00% <100.00%> (ø)
runtime/src/storage/tokio/blob.rs 89.88% <100.00%> (+4.41%) ⬆️
runtime/src/storage/tokio/mod.rs 96.32% <ø> (ø)

... and 12 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 e866a9d...d826af2. 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