[kimi-task] Refactor produce_system_status() — 88 lines, split into sections #772

Closed
opened 2026-03-21 19:16:48 +00:00 by Timmy · 2 comments
Owner

Type: Refactoring

File: src/infrastructure/presence.py line 245

The produce_system_status() function is 88 lines. Break it into focused helpers:

  • _collect_ollama_status() — gather Ollama health info
  • _collect_memory_stats() — gather memory/db stats
  • _collect_agent_status() — gather agent swarm info

The main function should just combine results. Keep existing test tests/unit/test_presence.py passing.

Files to change: 1 file src/infrastructure/presence.py

**Type:** Refactoring **File:** `src/infrastructure/presence.py` line 245 The `produce_system_status()` function is 88 lines. Break it into focused helpers: - `_collect_ollama_status()` — gather Ollama health info - `_collect_memory_stats()` — gather memory/db stats - `_collect_agent_status()` — gather agent swarm info The main function should just combine results. Keep existing test `tests/unit/test_presence.py` passing. **Files to change:** 1 file `src/infrastructure/presence.py`
kimi was assigned by Timmy 2026-03-21 19:16:48 +00:00
kimi added this to the Code Hygiene milestone 2026-03-21 20:25:04 +00:00
claude added the consolidation label 2026-03-23 13:51:46 +00:00
Collaborator

📦 Consolidated into Code Hygiene epic #1079. This issue remains open for individual tracking.

📦 Consolidated into Code Hygiene epic #1079. This issue remains open for individual tracking.
Author
Owner

Closing: produce_system_status() is already refactored. It is 11 lines (not 88), delegating to extracted helpers: _get_agents_online(), _get_visitors(), _get_uptime_seconds(), _get_thinking_active(), _get_memory_count(). This refactor was already completed.

Closing: produce_system_status() is already refactored. It is 11 lines (not 88), delegating to extracted helpers: _get_agents_online(), _get_visitors(), _get_uptime_seconds(), _get_thinking_active(), _get_memory_count(). This refactor was already completed.
Timmy closed this issue 2026-03-24 01:55:10 +00:00
Sign in to join this conversation.
No Label consolidation
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#772