Skip to content

Conversation

danlaine
Copy link
Collaborator

No description provided.

@danlaine danlaine self-assigned this Jul 21, 2025
#[derive(Debug)]
struct ServerMetadata {
target_hash: Digest,
root_digest: Digest,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think having target_ was redundant. These are all parts of the target, not just the hash.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you could even just call this root.

Copy link
Contributor

Choose a reason for hiding this comment

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

the type is already Digest, so feels repetitive to include both

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Renamed all vars/functions from root_digest to root. I left some comments that say "root digest" because there aren't type annotations in the comments. I could also change those to be uniformly "root" if you'd like.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's fine. Just left 1 nit on the errors.

@danlaine danlaine marked this pull request as ready for review July 21, 2025 17:28
#[error("Hash mismatch - expected {expected:?}, got {actual:?}")]
HashMismatch {
#[error("Root digest mismatch - expected {expected:?}, got {actual:?}")]
RootDigestMismatch {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: RootMismatch

SyncTargetHashUnchanged,
/// Sync target digest unchanged
#[error("Sync target digest unchanged")]
SyncTargetRootDigestUnchanged,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: SyncTargetRootUnchanged

Base automatically changed from danlaine/sync-dynamic-root to main July 21, 2025 18:51
@patrick-ogrady patrick-ogrady merged commit 614180c into main Jul 21, 2025
49 of 51 checks passed
@patrick-ogrady patrick-ogrady deleted the danlaine/sync-rename-hash branch July 21, 2025 21:23
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 94.61538% with 7 lines in your changes missing coverage. Please review.

Project coverage is 91.16%. Comparing base (ebcc30a) to head (9bfcab1).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
storage/src/adb/any/sync/client.rs 95.00% 3 Missing ⚠️
storage/src/mmr/hasher.rs 87.50% 2 Missing ⚠️
storage/src/adb/current.rs 83.33% 1 Missing ⚠️
storage/src/mmr/verification.rs 97.05% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main    #1299      +/-   ##
==========================================
- Coverage   91.16%   91.16%   -0.01%     
==========================================
  Files         246      246              
  Lines       61236    61237       +1     
==========================================
- Hits        55828    55826       -2     
- Misses       5408     5411       +3     
Files with missing lines Coverage Δ
storage/src/adb/any/mod.rs 99.12% <100.00%> (ø)
storage/src/adb/any/sync/mod.rs 100.00% <ø> (ø)
storage/src/mmr/bitmap.rs 96.42% <100.00%> (ø)
storage/src/mmr/mem.rs 92.21% <100.00%> (ø)
storage/src/mmr/storage.rs 91.48% <100.00%> (ø)
storage/src/adb/current.rs 96.88% <83.33%> (ø)
storage/src/mmr/verification.rs 94.81% <97.05%> (-0.03%) ⬇️
storage/src/mmr/hasher.rs 86.55% <87.50%> (-0.03%) ⬇️
storage/src/adb/any/sync/client.rs 92.69% <95.00%> (ø)

Continue to review full report in Codecov by Sentry.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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