Skip to content

feat(alertd): report cpu usage on windows in the load check - #943

Closed
dannash100 wants to merge 2 commits into
mainfrom
windows-cpu-load
Closed

dannash100 wants to merge 2 commits into
mainfrom
windows-cpu-load

Conversation

@dannash100

@dannash100 dannash100 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

The `load` check skips on Windows, so Windows hosts send Canopy no CPU signal at all.

  • On Windows it samples global CPU usage over 5s and reports `cpu_pct` in the check details
  • Warns at 90% or above, never fails: one 5s sample is too noisy to fail on
  • Linux keeps the load-average path unchanged

🦸 Review Hero

  • Run Review Hero

@review-hero

review-hero Bot commented Oct 2, 2026

Copy link
Copy Markdown

🦸 Review Hero Summary (round 1) · reviewed 53554ae
3 agents reviewed this PR | 3 failed | 0 critical | 0 suggestions | 0 nitpicks | Filtering: consensus 3 voters, 2 below threshold

No issues found. Looks good!

Below consensus threshold (2 unique issues not confirmed by majority)
Location Agent Severity Comment
crates/alertd/src/checks/load.rs:83 Performance suggestion cpu_usage() blocks the check for a full 5s (CPU_SAMPLE) via tokio::time::sleep. Since sweep.rs awaits all checks before returning (run_checks_concurrently), this adds a fixed 5-second floor to ever...
crates/alertd/src/checks/load.rs:94 Bugs & Correctness suggestion cpu_usage() only ever returns Check::warning or Check::pass — there's no Check::fail path, unlike the Unix load-average branch which escalates to Fail (is_fatal()==true, drives overall failing/pagi...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants