contacts: low-severity follow-ups from M2-S2 review (guards, id uniqueness, CLI wording) #219

Open
opened 2026-07-29 23:23:35 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-07-29 23:23:35 +00:00 (Migrated from github.com)

Non-blocking LOW findings from the M2-S2 (#188) review:

  1. ContactsGrpcService::sync doesn't validate empty account_id (List/Get/Create do) — add the same invalid_argument guard for symmetry.
  2. get_contact is not account-scoped (any authenticated caller can fetch any contact by id) — defer to a future per-account authz story (also affects other read RPCs; whole-daemon authz model).
  3. Contact::new id = ct_{millis}_{pid} + INSERT OR REPLACE: two CreateContact calls in the same millisecond/process collide and silently overwrite. Switch to a UUID. (Pre-existing from M2-S1; CreateContact is the first caller depending on it.)
  4. CLI contact add success string 'saved to address book' → say 'local address book (not yet synced to a server)' to preempt the created-but-not-synced foot-gun (proto/JSON layers already disclose local-only).
Non-blocking LOW findings from the M2-S2 (#188) review: 1. `ContactsGrpcService::sync` doesn't validate empty `account_id` (List/Get/Create do) — add the same `invalid_argument` guard for symmetry. 2. `get_contact` is not account-scoped (any authenticated caller can fetch any contact by id) — defer to a future per-account authz story (also affects other read RPCs; whole-daemon authz model). 3. `Contact::new` id = `ct_{millis}_{pid}` + `INSERT OR REPLACE`: two CreateContact calls in the same millisecond/process collide and silently overwrite. Switch to a UUID. (Pre-existing from M2-S1; CreateContact is the first caller depending on it.) 4. CLI `contact add` success string 'saved to address book' → say 'local address book (not yet synced to a server)' to preempt the created-but-not-synced foot-gun (proto/JSON layers already disclose local-only).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/nuncio#219