eager-rebuild-trades-write-cost-for-derived-consistency

Status: IN

Autocomplete and leaderboard both eagerly rebuild derived data structures on every mutation rather than deferring recomputation, guaranteeing that derived state (top-k caches, sorted rankings) is always consistent at the cost of write-path performance.

Justifications

autocomplete rebuilds top_k_cache for all ancestor nodes on every trie mutation; leaderboard removes and reinserts entries on score update — both choose O(mutation) rebuild over eventual consistency of derived structures

Depends on (SL): autocomplete-cache-consistency, leaderboard-update-by-remove-reinsert

Depended on by

JSON