Skip to content

Add privacy-safe cuber discovery - #197

Closed
coder13 wants to merge 7 commits into
agent/issue-185-normalized-usernamesfrom
agent/issue-82-user-discovery
Closed

Add privacy-safe cuber discovery#197
coder13 wants to merge 7 commits into
agent/issue-185-normalized-usernamesfrom
agent/issue-82-user-discovery

Conversation

@coder13

@coder13 coder13 commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Privacy and rollout

  • email-like input produces the same empty result without a user lookup;
  • blocks and unavailable profiles use the same unavailable response;
  • hidden WCA ID/avatar data is omitted, and the social feature switch remains off by default.

Checks

  • yarn workspace letscube-server test --runInBand api.test.js username.test.js usernameBackfill.test.js usernamePostgresBackfill.test.js privacy/userEmailPurge.test.js api/friends.test.js social/relationshipService.test.js social/requestRateLimiter.test.js social/discoveryService.test.js
  • yarn workspace letscube-server test --runInBand social/discoveryService.test.js models/user.test.js
  • yarn workspace letscube-client test --watchAll=false --runInBand components/App.test.jsx components/Navigation.test.jsx
  • yarn workspace letscube-server lint
  • yarn workspace letscube-client lint

coder13 added 7 commits July 12, 2026 21:48
Add server-authorized friendship and blocking transitions, privacy-safe REST and realtime contracts, and non-blocking PostgreSQL mirrors. Document the state machine and cover concurrency, replay, blocking, privacy, metrics, and disabled-Postgres behavior.
Gate social routes and realtime delivery behind the disabled-by-default rollout flag. Keep relationship and block tombstones revisioned for fail-closed unblock and reordered PostgreSQL mirrors, and reserve pending-request quota atomically with rollback and stale reconciliation.
Keep in-flight quota reservations counted until their relationship write resolves, and make quota cleanup asynchronous after durable social transitions so mirrors and invalidations are never suppressed by maintenance failures.
Use an atomic, expiring Redis limiter for per-user and per-pair friend request creation so crashes cannot leak durable quota reservations or suppress relationship side effects.
Expose authenticated, capped discovery and public profiles behind the disabled-by-default social feature gate. Preserve normalized usernames and email privacy while linking safe profile entry points and friendship actions.
Use discoverable profile keys, suppress query logging, and sequence profile requests so discovery cannot expose or race private state.
Avoid changing friend-list projections for users without a valid discovery identifier.
@coder13

coder13 commented Jul 14, 2026

Copy link
Copy Markdown
Owner Author

Superseded by the current-master discovery work. This stacked draft has unresolved privacy and pagination/client-race gaps; a focused current-master follow-up is in progress.

@coder13 coder13 closed this Jul 14, 2026
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