Skip to content

[glue] Make On-Demand Reshare Artifacts Finalization-Safe - #4520

Merged
patrick-ogrady merged 1 commit into
cl/precompute-artifactsfrom
glue-precompute-nits-4
Aug 17, 2026
Merged

[glue] Make On-Demand Reshare Artifacts Finalization-Safe#4520
patrick-ogrady merged 1 commit into
cl/precompute-artifactsfrom
glue-precompute-nits-4

Conversation

@patrick-ogrady

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

Copy link
Copy Markdown
Contributor

Stacked on #4364.

Summary

  • Keep speculative epoch artifact requests lazy and FIFO, materializing one ancestry view at a time in a cancellable actor-selected scan.
  • Prioritize admitted finalized-block reports over speculative scan completion, re-anchor interrupted scans after durable progress, and return Pending when terminal finalization cannot safely classify an unmaterialized request.
  • Bind verification and artifact reuse to the exact dealer-log view, preserving completed speculative verdicts while deriving the canonical artifact at the epoch boundary.
  • Keep the mailbox transport-only and accept proposal- and verification-shaped ancestry without requiring an immediately available head.
  • Add deterministic coverage for stalled, truncated, and detached ancestry; cancellation; FIFO ordering; exact-view caching; and finalization races.

LOC (classification boundary: the top-level #[cfg(test)] in each file): production +209/-220; tests and test infrastructure +665/-178.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying monorepo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e12e8e
Status: ✅  Deploy successful!
Preview URL: https://cf84d158.monorepo-eu0.pages.dev
Branch Preview URL: https://glue-precompute-nits-4.monorepo-eu0.pages.dev

View logs

@patrick-ogrady patrick-ogrady changed the title nits [glue] Make On-Demand Reshare Artifacts Finalization-Safe Aug 17, 2026
@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,627,399 13,123,083 -3.70% -
L1hits 17,436,376 16,763,229 -3.86% -
LLhits 142,432 93,579 -34.30% -
RamHits 20,720 13,110 -36.73% -
TotalRW 17,599,528 16,869,918 -4.15% -
EstimatedCycles 18,873,736 17,689,974 -6.27% 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,479,128 15,529,065 +0.32% -
L1hits 20,275,864 20,413,526 +0.68% -
LLhits 137,999 138,409 +0.30% -
RamHits 17,336 17,895 +3.22% -
TotalRW 20,431,199 20,569,830 +0.68% -
EstimatedCycles 21,572,619 21,731,896 +0.74% EstimatedCycles should decrease; tolerance 10.00%
blob_reads 235 235 +0.00% blob_reads should decrease; tolerance 10.00%

Baseline commit(s): dfe4c5a9ab89

@patrick-ogrady
patrick-ogrady merged commit 2be3ad8 into cl/precompute-artifacts Aug 17, 2026
305 checks passed
@patrick-ogrady
patrick-ogrady deleted the glue-precompute-nits-4 branch August 17, 2026 23:24
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.39344% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.51%. Comparing base (59f615d) to head (2e12e8e).
⚠️ Report is 1 commits behind head on cl/precompute-artifacts.

Files with missing lines Patch % Lines
glue/src/dkg/reshare/actor/inclusion.rs 97.14% 10 Missing and 5 partials ⚠️
glue/src/dkg/reshare/mailbox.rs 89.70% 5 Missing and 2 partials ⚠️
@@                     Coverage Diff                     @@
##           cl/precompute-artifacts    #4520      +/-   ##
===========================================================
- Coverage                    95.51%   95.51%   -0.01%     
===========================================================
  Files                          606      605       -1     
  Lines                       273973   273860     -113     
  Branches                      6601     6585      -16     
===========================================================
- Hits                        261697   261580     -117     
- Misses                       10086    10098      +12     
+ Partials                      2190     2182       -8     
Files with missing lines Coverage Δ
glue/src/dkg/reshare/application.rs 95.00% <100.00%> (+0.16%) ⬆️
glue/src/dkg/reshare/mailbox.rs 83.23% <89.70%> (+4.18%) ⬆️
glue/src/dkg/reshare/actor/inclusion.rs 96.08% <97.14%> (+1.66%) ⬆️

... and 39 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 59f615d...2e12e8e. 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.

1 participant