Description
Snapshot (internal/report/report.go:21) holds System, Containers, Ports, and Warnings. That is the whole set of things homebutler can compare across runs.
processes and network are collected and rendered but never reach it. So "what is eating the CPU" can be answered for right now and never compared against last time — the question "what started eating the CPU since yesterday" has no path to an answer, even though the command to observe it has existed for a while.
Why it matters more than it looks
The README asks "Why did this service restart at 3 AM?" and answers it with watch. The neighbouring question — "what changed on this box between then and now" — is report's job, and it is answered only for containers, ports, and disks.
A process that appeared and stayed, or a listening socket that moved, is the kind of thing an operator notices days later and cannot reconstruct. The observation already runs; only the persistence is missing.
#54 adds a processes MCP tool, which makes this more visible: an agent will be able to ask what is running now and still have no way to ask what changed.
Scope
- Add processes to
Snapshot, with a stable identity to match on across runs. Pid is not it — pids are recycled and change on restart. Likely name plus command, with a decision needed on how much of the command line to keep.
- Decide what "changed" means for a process before implementing the diff. CPU and memory fluctuate constantly; a naive delta would make every report noisy. Appeared and disappeared are the useful signals; resource deltas probably need a threshold or should be left out.
- Same question for
network, which may not belong in a snapshot at all. Interface state changes are worth recording; per-run throughput numbers are not. Worth settling before writing code.
Snapshot files grow with whatever is added here, and pruneSnapshots keeps Keep of them. Worth checking the size impact on a busy host before committing to a shape.
Notes
Depends on the identity-based diff landing first — adding data to the snapshot is only useful once the report compares contents rather than counts.
Description
Snapshot(internal/report/report.go:21) holdsSystem,Containers,Ports, andWarnings. That is the whole set of things homebutler can compare across runs.processesandnetworkare collected and rendered but never reach it. So "what is eating the CPU" can be answered for right now and never compared against last time — the question "what started eating the CPU since yesterday" has no path to an answer, even though the command to observe it has existed for a while.Why it matters more than it looks
The README asks "Why did this service restart at 3 AM?" and answers it with
watch. The neighbouring question — "what changed on this box between then and now" — isreport's job, and it is answered only for containers, ports, and disks.A process that appeared and stayed, or a listening socket that moved, is the kind of thing an operator notices days later and cannot reconstruct. The observation already runs; only the persistence is missing.
#54 adds a
processesMCP tool, which makes this more visible: an agent will be able to ask what is running now and still have no way to ask what changed.Scope
Snapshot, with a stable identity to match on across runs. Pid is not it — pids are recycled and change on restart. Likely name plus command, with a decision needed on how much of the command line to keep.network, which may not belong in a snapshot at all. Interface state changes are worth recording; per-run throughput numbers are not. Worth settling before writing code.Snapshot files grow with whatever is added here, and
pruneSnapshotskeepsKeepof them. Worth checking the size impact on a busy host before committing to a shape.Notes
Depends on the identity-based diff landing first — adding data to the snapshot is only useful once the report compares contents rather than counts.