4188bcd334
`refresh_processes_specifics` was called with remove_dead_processes = false
against a long-lived System, so the agent accumulated every process it had
ever seen and went on reporting them. Measured on a Pi 5 after a few hours of
build churn: 21,648 processes reported, 289 actually running, growing a few
every poll.
Three consequences, in ascending order of how confusing they are:
* unbounded memory growth, and every poll iterating ~75x more entries than
it should
* process_count — the client's "Top Processes (N total)" — is meaningless
* a process you kill keeps its row forever, because the agent keeps sending
it. Killing it again reports "no longer exists", since the kernel is
telling the truth and the agent is not.
The third is how this was found: no amount of client-side reconciliation could
fix a list whose producer never forgets anything.
Passing `true` is only correct because these two sites use
ProcessesToUpdate::All. With `Some(pids)` sysinfo treats every process outside
the list as dead and removes it, so the per-PID refresh in
collect_process_metrics must keep `false` — noted in a comment there.
Verified by driving the TUI against a rebuilt agent: reported count 292 vs 290
real, and a killed row is removed once and never reappears.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>