Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unused proposals when receiving commit #69

Merged
merged 3 commits into from
Jan 25, 2024
Merged

Conversation

stefunctional
Copy link
Contributor

Unused proposals were previously made of the proposals in the received
commit that would cause the commit to be invalid and thus were excluded.
But given that invalid proposals when receiving a commit cause the
entire commit to be rejected, it means that unused proposals were always
empty when receiving a commit.

Unused proposals are now made of the proposals in the receiver's cache
that are not in the received commit.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT license.

… when receiving commit

The test currently fails and the implementation will be fixed in the
next commit.
Unused proposals were previously made of the proposals in the received
commit that would cause the commit to be invalid and thus were excluded.
But given that invalid proposals when receiving a commit cause the
entire commit to be rejected, it means that unused proposals were always
empty when receiving a commit.

Unused proposals are now made of the proposals in the receiver's cache
that are not in the received commit.
@stefunctional stefunctional requested a review from a team as a code owner January 24, 2024 03:56
@codecov-commenter
Copy link

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (d9d9e2e) 91.65% compared to head (5094fd7) 91.63%.

Files Patch % Lines
mls-rs/src/group/proposal_filter/bundle.rs 80.00% 6 Missing ⚠️
mls-rs/src/group/proposal_cache.rs 91.83% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #69      +/-   ##
==========================================
- Coverage   91.65%   91.63%   -0.02%     
==========================================
  Files         169      169              
  Lines       30851    30916      +65     
==========================================
+ Hits        28275    28330      +55     
- Misses       2576     2586      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

mulmarta
mulmarta previously approved these changes Jan 24, 2024
The previous term was confusing in the context of receiving a commit.

This also removes outdated comments in tests from back when only unused
proposals from the committer were returned.
@tomleavy tomleavy merged commit 3c57e91 into main Jan 25, 2024
20 checks passed
@tomleavy tomleavy deleted the fix-unused-proposals branch January 25, 2024 18:25
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.

4 participants