Skip to content

refactor: break message verification handling out into free function#324

Merged
davidsteiner merged 6 commits intomainfrom
320-push-session-logic-into-state-variants
Mar 21, 2026
Merged

refactor: break message verification handling out into free function#324
davidsteiner merged 6 commits intomainfrom
320-push-session-logic-into-state-variants

Conversation

@davidsteiner
Copy link
Member

@davidsteiner davidsteiner commented Mar 20, 2026

In the continued effort to rip apart the monolithic session code, this PR splits up message verification issues into two variants:

  • sequence gaps which need to be handled by the state, so handling can't easily be centralised in a free function
  • actual errors, which are handled the same way regardless of state

This has allowed handle_verification_error to be moved into the inbound module as a free function and it no longer handles sequence gaps.

@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 93.70861% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.06%. Comparing base (1aaf9d8) to head (aa5cb67).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/hotfix/src/session/state/awaiting_resend.rs 85.10% 7 Missing ⚠️
crates/hotfix/src/session.rs 87.50% 6 Missing ⚠️
crates/hotfix/src/session/state/awaiting_logout.rs 80.00% 4 Missing ⚠️
crates/hotfix/src/session/state.rs 91.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #324      +/-   ##
==========================================
+ Coverage   90.95%   91.06%   +0.10%     
==========================================
  Files          92       94       +2     
  Lines        9157     9232      +75     
==========================================
+ Hits         8329     8407      +78     
+ Misses        828      825       -3     
Flag Coverage Δ
core 90.94% <93.70%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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

@davidsteiner davidsteiner merged commit 3f97c0b into main Mar 21, 2026
6 checks passed
@davidsteiner davidsteiner deleted the 320-push-session-logic-into-state-variants branch March 21, 2026 06:00
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