Skip to content

Conversation

@richvdh
Copy link
Member

@richvdh richvdh commented Oct 28, 2025

MSC4268 now defines a new withheld code for use when the session is not marked as shared_history: start using it, and add a test to make sure it is sent correctly.

part of element-hq/element-meta#2876

@richvdh richvdh force-pushed the rav/history_sharing/not_shared_code branch from 57467f9 to aa07079 Compare October 28, 2025 12:36
@richvdh richvdh force-pushed the rav/history_sharing/not_shared_code branch from aa07079 to 6bfd968 Compare October 28, 2025 12:37
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 28, 2025

CodSpeed Performance Report

Merging #5807 will not alter performance

Comparing rav/history_sharing/not_shared_code (855075b) with main (9fff07d)

Summary

✅ 50 untouched

@richvdh richvdh force-pushed the rav/history_sharing/not_shared_code branch 2 times, most recently from c008db8 to 3d0e189 Compare October 29, 2025 13:40
))
}
_ => unreachable!("Can't create an unknown withheld code content"),
WithheldCode::_Custom(_) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

I've removed the wildcard pattern in a few enums, so that it's harder to miss places when adding new withheld codes.

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.52%. Comparing base (547ab31) to head (ef3c671).
⚠️ Report is 62 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...x-sdk-crypto/src/types/events/room_key_withheld.rs 66.66% 3 Missing and 1 partial ⚠️
crates/matrix-sdk-crypto/src/store/mod.rs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5807      +/-   ##
==========================================
+ Coverage   88.50%   88.52%   +0.02%     
==========================================
  Files         360      360              
  Lines      100719   100731      +12     
  Branches   100719   100731      +12     
==========================================
+ Hits        89138    89177      +39     
+ Misses       7396     7371      -25     
+ Partials     4185     4183       -2     

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

@richvdh richvdh marked this pull request as ready for review October 29, 2025 14:40
@richvdh richvdh requested review from a team as code owners October 29, 2025 14:40
@richvdh richvdh requested review from Hywan and kaylendog and removed request for a team October 29, 2025 14:40
Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

Looks good.

Add an integration test that ensures that the correct withheld code is sent
when history is marked as "not shareable"
@richvdh richvdh force-pushed the rav/history_sharing/not_shared_code branch from 855075b to ef3c671 Compare October 30, 2025 13:58
@richvdh richvdh enabled auto-merge October 30, 2025 13:59
@richvdh richvdh merged commit ee82861 into main Oct 30, 2025
52 checks passed
@richvdh richvdh deleted the rav/history_sharing/not_shared_code branch October 30, 2025 14:12
@kaylendog kaylendog removed their request for review October 30, 2025 16:02
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.

3 participants