Repository navigation
Description
Problem
From the convergence architecture spec: daemon status should be a typed model computed from durable component state plus recent event facts, not ad hoc live checks. One DaemonStatus consumed by CLI status, TUI dashboard, web status strip, browser-extension popup, polylogue-mcp, and health probes.
Current gaps (deep audit 2026-05-03)
The current daemon_status_payload() in daemon/status.py is a thin wrapper with significant gaps:
- No daemon liveness check — status never reads the pidfile, never verifies the daemon process is actually running. Will report
"ok": Trueregardless of whether the daemon is alive. last_ingestion_batchalways None —get_last_ingestion_batch()queries forkind="ingestion_batch"events, but no code ever emits them.emit_daemon_eventis only called from the reset endpoint (http.py:439).get_recent_operations()queries for never-emitted events —kind="operation"events are never emitted.- Rich readiness diagnostics collapsed —
ReadinessReport.to_dict()produces per-check structured output, but the health endpoint collapses it to{"ok": bool, "quick_check": "N check(s) in error state"}. - 10 modules bypass structlog — use
logging.getLogger(__name__)instead ofget_logger(__name__), so daemon log output isn't structured. configure_logging()never called at daemon startup — daemon runs with structlog defaults.
Fields
Daemon liveness, component state, source lag, failing/excluded files, current operations, reset queue, ingestion throughput, slow batches, DB/WAL/blob sizes, reclaimable blob bytes, disk free, quick-check status, FTS/action-event readiness, insight freshness, browser capture status, privacy-safe paths.
This replaces doctor as read-only diagnostics (#717 says status replaces doctor).
Acceptance criteria
-
DaemonStatusis a typed Pydantic model - All surfaces consume the same model (CLI, TUI, web, extension, MCP)
- Status includes daemon liveness (reads pidfile + verifies process)
-
last_ingestion_batchpopulated by emitting events from the ingest pipeline -
emit_daemon_eventcalled for ingestion batches and operations - Health endpoint exposes full structured readiness report, not just boolean
- Logging configured at daemon startup; all daemon modules use structlog
Activity
Sinity commentedon May 3, 2026
Concrete acceptance criteria from the architecture spec
DaemonStatusmodel (not ad hoc JSON assembly)polylogue status, TUI dashboard, web status strip, browser-extension popup,polylogue-mcp, health probespolylogue doctoras read-only diagnostics (feat(surfaces): implement polylogued local reader and query-native CLI UX #717 says status replaces doctor)feat(daemon): typed DaemonStatus model for all surfaces (#774) (#792)
fix: close audit gaps — MCP isError, ingestion events, pins wiring (#786
Sinity commentedon May 4, 2026
Resolved by PRs #792 (typed DaemonStatus Pydantic model), #797 (ingestion_batch events emitted from pipeline).
feat(daemon): typed DaemonStatus model for all surfaces (#774) (#792)
fix: close audit gaps — MCP isError, ingestion events, pins wiring (#786