[claude] refactor: break up produce_system_status() (#1194) #1196
Reference in New Issue
Block a user
Delete Branch "claude/issue-1194"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1194
Extracts five focused helpers from the 88-line
produce_system_status()insrc/infrastructure/presence.py:_get_agents_online()— counts agents with non-offline status_get_visitors()— counts active WebSocket clients_get_uptime_seconds()— calculates seconds since app start_get_thinking_active()— checks thinking engine state_get_memory_count()— queries vector store entry countThe main function becomes a thin coordinator. Each helper follows the existing graceful-degradation pattern (try/except with
logger.debugand a safe default return). Unit tests added for all five helpers. No behavior change.tox -e unitpasses (302 tests).