summaryrefslogtreecommitdiff
path: root/engine/src/test
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-08-02 19:27:51 +0900
committerSho Sakuma <me@m1sk9.dev>2026-08-02 19:27:51 +0900
commitbf62ebe35653492c123c729ae03cb32d8e20e2e6 (patch)
treec5d323fe02e1c7f48a13ecf2a573d98095aebe65 /engine/src/test
parent232ce55f187d7ec0cea2037d8d285d60465e51ff (diff)
downloadLunaticChat-bf62ebe35653492c123c729ae03cb32d8e20e2e6.tar.gz
LunaticChat-bf62ebe35653492c123c729ae03cb32d8e20e2e6.tar.bz2
LunaticChat-bf62ebe35653492c123c729ae03cb32d8e20e2e6.zip
refactor: single-source the plugin messaging channel and dedup cache
The channel Paper and Velocity talk over was declared in seven places, in two spellings ("lunaticchat:main" and the namespace/name pair), one of them an inline literal in CrossServerChatManager that bypassed even its own file's constant. Renaming it meant finding all seven; missing one leaves both sides compiling and starting, just not talking. It now lives next to the codec that defines the wire format. The echo-suppression cache was likewise written twice, and the copies had already drifted in style - one hand-rolled the expiry sweep, the other used filter/map - while staying semantically identical. Any future change to eviction would have had to land in both, and CrossServerChatManager's copy carried a comment claiming ConcurrentHashMap iterators cannot remove(), which they can. MessageDeduplicationCache documents the one property that surprised the tests written against it: eviction orders by millisecond timestamp, so a burst inside a single millisecond evicts arbitrarily among its members. Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'engine/src/test')
0 files changed, 0 insertions, 0 deletions