mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-06 03:57:21 +09:00
* dream(performance): #3265 stop re-tokenizing MMR candidates that PR #3169 mostly stopped needing mmrRerank() eagerly re-tokenized every remaining candidate's content on every outer-loop pass (O(N x limit) tokenize() calls), a pattern that predates and survived PR #3169 unchanged. #3169 made embedding-cosine the preferred, now-common pairSimilarity path, so most of that tokenization was computed and then discarded. Tokens are now computed lazily and cached per-candidate, only when the Jaccard fallback is actually needed. Evaluated: tokenize() calls 400 -> 0 on a 30-candidate/limit-20 all-embedded corpus (stash-isolated: fails against real baseline, passes against candidate); vitest bench shows the candidate 5.88x faster (independently reproduced at 5.96x by an adversarial critic). Selection output is byte-for-byte identical to baseline across all-embedded/no-embedding/mixed scenarios. 473/474 full package suite both ways (1 pre-existing, unrelated environmental failure), tsc clean. Evaluated, ACCEPT. Full research (5-role parallel fan-out), evaluation receipt, adversarial critique, Darwin/Flywheel scoping, reward-hack check, and security/hive-mind scan findings in the linked issue and gist. Closes #3265 Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01P5UJ62RVAbq8DLEEXPrwvU * dream(performance): append 2026-09-10 ledger row (#3265, #3266) Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01P5UJ62RVAbq8DLEEXPrwvU --------- Co-authored-by: Claude <noreply@anthropic.com>