Skip to content

[storage] Recover segmented journals before publication - #4902

Closed
patrick-ogrady wants to merge 1 commit into
tact/recovery-remove-authenticatedfrom
tact/recovery-remove-segmented
Closed

patrick-ogrady wants to merge 1 commit into
tact/recovery-remove-authenticatedfrom
tact/recovery-remove-segmented

Conversation

@patrick-ogrady

Copy link
Copy Markdown
Contributor

Segmented journal initialization repairs and truncates through recovery owners before exposing append buffers. Oversized journals recover the index and value sections together, persisting the retained index boundary before discarding value data.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying monorepo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9187393
Status: ✅  Deploy successful!
Preview URL: https://62a5fb64.monorepo-eu0.pages.dev
Branch Preview URL: https://tact-recovery-remove-segment.monorepo-eu0.pages.dev

View logs

@patrick-ogrady
patrick-ogrady added this pull request to stack #4899 September 21, 2026 22:25
@github-actions

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,414,729 13,412,393 -0.02% -
L1hits 17,212,922 17,210,154 -0.02% -
LLhits 105,671 105,648 -0.02% -
RamHits 4,479 4,579 +2.23% -
TotalRW 17,323,072 17,320,381 -0.02% -
EstimatedCycles 17,898,042 17,898,659 +0.00% 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,684,583 15,618,159 -0.42% -
L1hits 20,684,242 20,472,824 -1.02% -
LLhits 137,292 138,843 +1.13% -
RamHits 19,379 19,309 -0.36% -
TotalRW 20,840,913 20,630,976 -1.01% -
EstimatedCycles 22,048,967 21,842,854 -0.93% EstimatedCycles should decrease; tolerance 10.00%
blob_reads 235 235 +0.00% blob_reads should decrease; tolerance 10.00%

Baseline commit(s): bd0f7eb33af2

@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 9187393. Configure here.

/// Open through `(section, logical byte end)` and remove later sections.
///
/// An end inside an item rounds down. All retained data is validated before returning. Payload
/// reads stop at the bound, but every section name is validated, including names above it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Public init docs leak edge cases

Low Severity

The public init_at_most docs describe rounding, payload-stop behavior, and validation of names above the bound. Those are edge-case and implementation details with a negative qualifier, rather than a description of the method's result.

Fix in Cursor Fix in Web

Triggered by learned rule: Public API docs: no dependency names or "commonly used" sentences

Reviewed by Cursor Bugbot for commit 9187393. Configure here.

@cloudflare-workers-and-pages

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 9187393 Sep 21 2026, 10:23 PM

@patrick-ogrady
patrick-ogrady marked this pull request as ready for review September 22, 2026 03:35
@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.30488% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.83%. Comparing base (e912231) to head (9187393).

Files with missing lines Patch % Lines
storage/src/journal/segmented/oversized.rs 96.12% 26 Missing and 9 partials ⚠️
storage/src/journal/segmented/manager.rs 97.07% 4 Missing and 2 partials ⚠️
storage/src/journal/segmented/fixed.rs 98.20% 3 Missing and 2 partials ⚠️
storage/src/journal/segmented/variable.rs 99.27% 1 Missing and 1 partial ⚠️
@@                          Coverage Diff                           @@
##           tact/recovery-remove-authenticated    #4902      +/-   ##
======================================================================
+ Coverage                               95.81%   95.83%   +0.01%     
======================================================================
  Files                                     637      637              
  Lines                                  303469   304855    +1386     
  Branches                                 7428     7483      +55     
======================================================================
+ Hits                                   290781   292160    +1379     
- Misses                                  10314    10322       +8     
+ Partials                                 2374     2373       -1     
Files with missing lines Coverage Δ
storage/src/journal/segmented/glob.rs 93.86% <100.00%> (-0.24%) ⬇️
storage/src/journal/segmented/variable.rs 94.94% <99.27%> (+0.75%) ⬆️
storage/src/journal/segmented/fixed.rs 96.44% <98.20%> (+0.13%) ⬆️
storage/src/journal/segmented/manager.rs 97.33% <97.07%> (+0.36%) ⬆️
storage/src/journal/segmented/oversized.rs 98.04% <96.12%> (+0.53%) ⬆️

... 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 e912231...9187393. 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.

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.

2 participants