# Plan: Make health reflect reality + complete the knowledge graph Status: Implemented (v0.14.x–0.16.x). Shipped across `c9a00a9` (per-entity monitoring override), `a3914eb`/`8eb1ca2` (process check opt-in + probe_unit), `0929c17` (discover_infra_drift), and the vm-status/layered-probe/route-via- proxmox-host decisions now in project memory. Created 2026-07-29. ## Context `ws:mac-mini` reports health `down` despite being the healthy control-plane host. Investigation showed the problem is systemic, not local: **49 enabled checks report `down`**, almost all `ssh-script`, because the resource/updates probes assume **scripts are deployed at `/opt/oikos/checks/` AND root SSH works on every target** — both false for macOS, non-enrolled LXCs, and mesh-only entities. The knowledge graph also has real gaps (unmodeled TLS certs, empty `skills` table, seed drift, a capped topology view). The DB is the source of truth; live state was verified via the REST API (`Authorization: Bearer $OIKOS_MCP_BEARER_TOKEN`, token in `oikos-api-1` container env) and `docker exec oikos-postgres-1 psql`. Direct psql access is available for cleanup. ## Decisions (confirmed with operator) 1. **Monitoring philosophy: make checks work everywhere** — via the proven `pct exec`/ `qm guest exec` host-routing the MCP `run` tool already uses (no per-guest SSH keys), plus deploy the check scripts INTO each guest and make them macOS-aware. Hosts/workstations use direct SSH with the correct per-target user. 2. **Canonical host-hop access** — `pct exec`/`qm guest exec` through the proxmox host is the ONLY execution path for any LXC/VM command (scheduler + MCP `run` + agent). Direct guest SSH is retired for execution; `lan_ip` stays for network probes only. (A1.) 3. **Auto-provision monitoring for new entities** — wire script-deploy + the `health-check-answering` lifecycle gate into entity creation so any entity Nomos creates becomes monitorable with zero manual steps (Track E). 4. **Lifecycle gate: skip monitoring for `deprecated`/`destroyed` targets** — no permanent false alarms from retired things. 5. **Knowledge graph: address ALL gaps** — model TLS certificates, fix dns-zone gap, re-export seeds, seed skills, raise graph cap. 6. **Read-only audit skill** — a `read_only` operator skill discovers live infra and diffs it against the DB graph, producing a ranked drift report; the operator acts on findings via existing lifecycle runbooks. No auto-fix. (Track F.) ## Findings (evidence) ### A. Health-check reality gaps (49 checks `down`) **Root cause is a routing mismatch, verified live (tests use the scheduler's own key `-i /etc/oikos/ssh_key`, not a default-key test):** The MCP `run` tool already reaches every guest correctly via `resolveExecTarget` (`internal/mcp/server.go:582`): resolve the proxmox host (`attributes.host` → `hosts` edge → hubris default), SSH there, run `pct exec -- bash -c 'echo | base64 -d | bash'` (VMs: `qm guest exec`). That path needs **no per-guest lan_ip, no per-guest authorized_keys, no per-guest sshd**. The **scheduler's `checkSSHScript` does not use it** — it SSHes directly to each entity's own resolved address (`internal/scheduler/scheduler.go:758`, `internal/checkdefaults/defaults.go:376 resolveHost`) and runs `/opt/oikos/checks/