Skip to content

fix(account): let a watching member leave with a remove signed by its own key - #2930

Merged
devswha merged 1 commit into
mainfrom
fix/account-watch-leave
Nov 5, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/account-watch-leave

Conversation

@devswha

@devswha devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

The account contract lets a device leave the account by signing the remove of its own key (docs/account.md, "A remove may be signed by the key it removes"). The PC, though, took records only from drive members, so a device that only watched a PC could never leave there: its own remove was refused (signer_not_member).

A remove signed by the key it removes now applies for a member of any role. A watching member still cannot remove any other device.

This is the PC side of #2878. Retrying an approval that failed after the PC let the device in belongs to the approving client and is tracked there.

Validation

  • bun run check fast: all ok (typecheck, build, unit tests 11747 pass, 0 fail).
  • New test "a watching member leaves the account on a PC with a remove signed by its own key" failed before the fix.
  • "a watching member still cannot remove another device" fails if any remove from a watching member is accepted.
  • bun test server/account/ server/relay/ server/device-access.contract.test.ts: 249 pass.

… own key

The contract lets a device leave the account by signing the remove of its
own key, but the PC took records only from drive members, so a device
that only watched could never leave. A remove signed by the key it
removes now applies for a member of any role; a watching member still
cannot remove another device.

Part of #2878 (the PC side; retrying a failed approval is the approving
client's).
@coderabbitai

coderabbitai Bot commented Nov 5, 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 59 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e781d05 and 645b7f2.

Files selected for processing: 3

  • server/account/account.contract.test.ts
  • server/account/records.ts
  • server/devices.ts
  • 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

@devswha

devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Local merge gate (owner-approved): bun run check fast passed at this head, omo CLEAR, threads resolved, merges cleanly. PC side of #2878. Merged without waiting for GitHub CI.

@devswha
devswha merged commit ae3e21c into main Nov 5, 2026
19 of 21 checks passed
@devswha
devswha deleted the fix/account-watch-leave branch November 5, 2026 08:44
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