debt(node): rebuild phone_index on WAL replay and persist federated identity inserts to WAL

Aperta
#22 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start by reading NodeState::with_wal_and_redis and the WAL replay path, then trace http_federation::ingest_sync_payload and the phone_index data model. Check issue #16 for the WAL schema constraint. Work is done when replay deterministically restores phone_index without persisting raw phone tokens, and federated identity inserts survive restart through the existing identity WAL.

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

Descrizione

area::node effort::s impact::medium priority::medium source::auto status::review type::bug

Follow-up from review remediation (phone_index replay + WAL on federated inserts were deferred as higher-risk).

Current behavior:

  • NodeState::with_wal_and_redis replays the identity WAL into kt_log/did_index but leaves phone_index empty, so POST /v1/contacts/psi misses phone tokens after restart until the DID re-registers.
  • http_federation ingest_sync_payload inserts federated identities into kt_log/did_index/phone_index without appending to kt_log.wal, so they are lost on restart.

Expected:

  • Replay rebuilds phone_index deterministically (HMAC of phone token is not stored in WAL, so this needs a stored digest or a documented re-derivation path).
  • Federated inserts append to the identity WAL (same schema, no envelope mixing per #16).

Risk note: phone tokens are never persisted raw (privacy invariant); any replay design must preserve that.

Lingua principale
Rust
Stelle
0
Fork
0
Merge medio
4m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di alfonsodg/sonaraim-node

Tutte le issue di alfonsodg/sonaraim-node

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.