fix(procs): show process-tree daemon metrics#435
Conversation
Co-authored-by: sargunv-headway <sargunv-headway@users.noreply.github.com>
Co-authored-by: sargunv-headway <sargunv-headway@users.noreply.github.com>
Co-authored-by: sargunv-headway <sargunv-headway@users.noreply.github.com>
Greptile SummaryThis PR fixes a metrics under-reporting bug where CPU and RSS figures for daemons launched via
Confidence Score: 5/5Safe to merge — the change is a targeted, well-tested correctness fix with no behavioural regressions. All three routes (list, index, show) and the TUI poller now call No files require special attention. Important Files Changed
Reviews (5): Last reviewed commit: "fix(procs): refresh full process snapsho..." | Re-trigger Greptile |
Co-authored-by: sargunv-headway <sargunv-headway@users.noreply.github.com>
Co-authored-by: sargunv-headway <sargunv-headway@users.noreply.github.com>
Co-authored-by: sargunv-headway <sargunv-headway@users.noreply.github.com>
Co-authored-by: Sargun Vohra <sargunv-headway@users.noreply.github.com>
Note
I did this with Cursor and GPT-5.5. The PR description was written by the agent, edited by me, and I'll respond to review comments myself, not via the agent.
The individual commits show the workflow: wrote failing test, wrote the fix, applied findings from a parallel agent review
Summary
BUG: Web/TUI daemon metrics were using stats from only the directly supervised PID, so wrapper-style daemons could under-report CPU and RSS when the actual work happens in child processes. We use daemons launched as
misetasks, so in all cases the metrics were just reporting stats for themiseprocess itself, not the underlying service.This fix reuses the existing descendant process-tree aggregation that resource-limit enforcement already relies on.
Verification
cargo +stable nextest run get_stats_includes_descendant_rss