[kimi] refactor: extract presence state serializer from workshop heartbeat (#668) #697

Merged
kimi merged 1 commits from kimi/issue-668 into main 2026-03-21 13:41:43 +00:00

1 Commits

Author SHA1 Message Date
kimi
c5ad8e8aff refactor: extract presence state serializer from workshop heartbeat
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
Extract _build_world_state() logic from dashboard/routes/world.py into
a standalone serialize_presence() function in infrastructure/presence.py.
This allows the WebSocket gateway and other consumers to reuse the
ADR-023 presence-to-world-state transformation without importing the
dashboard route module.

- New: src/infrastructure/presence.py with serialize_presence()
- Updated: world.py delegates to serialize_presence()
- New: tests/unit/test_presence.py with round-trip and edge-case tests

Fixes #668

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 09:40:19 -04:00