Files
amethyst/commons
Claude d91673bb34 perf(wot): compact int-CSR trust graph + freshness pass; stream into it
Point #1 (freshness): each run now fetches every discovered user's LATEST
kind:3/10000/1984 once from their outbox (grouped by write relay in
routeByOutbox; empty-tagged relays already count as write), instead of skipping
users whose list is already cached. `done` still guarantees once-per-run and
that a fresh download isn't repeated.

Point #2 (memory): replace the HexKey-keyed, TrustEdge-object graph with a
compact representation that scales to the whole network:
- commons/wot: pubkeys interned to dense Int ids; edges stored in two CSR
  IntArray layouts (by target for scoring, by source for the worklist), each
  incoming entry packing source id + relation into one int. GrapeRank.compute
  returns a DoubleArray by node id (no boxed map at millions of nodes).
  TrustGraphBuilder is now stateful/streaming (addFollows/addMutes/addReports).
  Tests rewritten; the full-sweep cross-check still passes.
- cli: contact lists stream straight into the builder as they arrive and the
  Event is discarded — the crawl never holds millions of kind:3 objects. Mutes
  and reports (far fewer) are fed from the store. Output de-interns the top-N.

Validated: a fresh online run built a 108,961-user / 1.67M-edge graph and
scored 83,613 users in a 4 GB heap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWk2ZMrGBSr4WenKgwqmbB
2026-07-06 21:21:48 +00:00
..