coder13 / coder13/LetsCube

Harden and feature-flag the Friend System rollout

Aperta
#188 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area: auth area: platform area: social enhancement priority: P1
Lingua principale
JavaScript
Stelle
30
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Goal

Ship the Friend System without turning user search, friend requests, notifications, or room invitations into new abuse, privacy, or operational failure modes.

## Security and privacy requirements

- Deny social reads/actions by default unless the authenticated relationship and resource state allow them.
- Enforce authorization server-side on every HTTP and Socket.IO action.
- Apply an explicit HTTP/Socket origin allowlist instead of reflecting arbitrary origins.
- Validate and size-limit social payloads and add per-user/per-pair rate limits for search, requests, blocks, notification actions, and invitations.
- A block must prevent new friend requests and invites, revoke pending social actions, and avoid revealing to the blocked user that a block exists.
- Never request, retain, search, log, analyze, or deliver through email; #191 is a hard launch prerequisite.
- Never log names, WCA IDs, access tokens, room passwords, notification contents, or friend graph edges.
- Do not expose online presence, hidden WCA identity, or private-room metadata outside the intended audience.

## Rollout and observability

- [ ] Gate server behavior and client entry points behind one documented `SOCIAL_FEATURES_ENABLED` rollout switch.
- [ ] Ensure the disabled state leaves existing room/timer behavior unchanged and provides a tested rollback path.
- [ ] Add privacy-safe metrics for request creation/acceptance, invite creation/join conversion, notification delivery/reconciliation failures, authorization failures, and rate-limit triggers.
- [ ] Add indexes/retention jobs before enabling writes and expose health/degraded signals for required social persistence paths.
- [ ] Test old-client/new-server and new-client/old-server behavior for the adjacent release window.
- [ ] Add abuse/authorization tests for ID tampering, blocked pairs, duplicate/replayed actions, unauthenticated access, disallowed origins, oversized payloads, rate limits, and email-like discovery input.
- [ ] Document data retention, account deletion behavior, incident rollback, and a short production verification checklist.
- [ ] Enable for a small test cohort/staging first, verify metrics and two-user flows, then enable broadly.

## Launch dependencies

- #191 stop requesting and purge WCA email
- #185 normalized username foundation
- #75 friendship lifecycle and blocking
- #82 discovery/public profiles
- #105 notification inbox
- #186 friends hub/presence
- #187 room invitations
- Complete the modernized production rollout in #176

## Non-goals

- Direct messages (#189).
- Browser push.
- Opt-in stranger matching (#190).

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Non sono indicati file né punti di ingresso dei test. Inizia tracciando il comportamento del server e i punti di ingresso del client, quindi esamina le dipendenze di avvio (#191, #185, #75, #82, #105, #186, #187 e #176); il lavoro è completo quando sono completati l'interruttore di rollout, il percorso di rollback, l'observability sicura per la privacy, i test di compatibilità e abuso, la documentazione e la checklist per l'abilitazione graduale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, mongodb, nodejs, react
Ambito
full-stack, observability, release, security, testing
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
28/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.