Skip to content

Say whether the client still works when forget_device fails - #170

Open
LucaCappelletti94 wants to merge 2 commits into
mainfrom
fix/forget-error-client-state
Open

LucaCappelletti94 wants to merge 2 commits into
mainfrom
fix/forget-error-client-state

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Owner

When forget_device failed, the error could not tell an app whether its client still worked. ForgetError::Client covered both a failure before anything was touched and a failure after the client was already closed, so both demos kept a session that might be dead. NotRevoked also claimed the stored credential was cleared when reading or clearing it had failed, and when several steps failed only one was reported.

ForgetError is now Refused, where nothing was destroyed and the client still works, or Incomplete, where the client is closed and a report names each part that failed: releasing the replica, the stored credential, the revoke, the wipe and the device key. Once the client is closed every part runs even when an earlier one failed, except the device key, which still goes only once the wipe stands. Both demos keep the session on a refusal, and on an incomplete forget sign in again and show what was left on the sign-in screen.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: LucaCappelletti94/coderabbit/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e56668f3-5f02-4430-bbe3-79904a9ad014
📥 Commits

Reviewing files that changed from the base of the PR and between 026f852 and e2e2229.

📒 Files selected for processing: 9
  • crates/connetto-client/src/auth.rs
  • crates/connetto-client/src/builder/native.rs
  • crates/connetto-client/src/teardown.rs
  • crates/connetto-client/tests/it/teardown.rs
  • docs/architecture/13-client-connection.md
  • docs/architecture/14-at-rest-encryption.md
  • examples/dioxus-desktop-demo/src/main.rs
  • examples/tauri-leptos-demo/src-tauri/src/lib.rs
  • examples/tauri-leptos-demo/ui/src/main.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.66667% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.78%. Comparing base (026f852) to head (e2e2229).

Files with missing lines Patch % Lines
crates/connetto-client/src/auth.rs 79.76% 16 Missing and 1 partial ⚠️
crates/connetto-client/src/teardown.rs 63.15% 7 Missing and 7 partials ⚠️
crates/connetto-client/src/builder/native.rs 96.42% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #170      +/-   ##
==========================================
+ Coverage   85.07%   87.78%   +2.71%     
==========================================
  Files         188      188              
  Lines       50326    50427     +101     
  Branches    50326    50427     +101     
==========================================
+ Hits        42813    44266    +1453     
+ Misses       5414     4073    -1341     
+ Partials     2099     2088      -11     
Flag Coverage Δ
client 60.55% <78.66%> (-0.01%) ⬇️
rest 55.56% <0.00%> (-0.07%) ⬇️
server 51.77% <0.00%> (+4.35%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@sonarqubecloud

Copy link
Copy Markdown

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