Skip to content

fix(metrics): correct CPU and queue alerts with bounded compile statistics - #188

Merged
ttbombadil merged 1 commit into
mainfrom
fix/accurate-bounded-metrics
Oct 4, 2026
Merged

ttbombadil merged 1 commit into
mainfrom
fix/accurate-bounded-metrics

Conversation

@ttbombadil

Copy link
Copy Markdown
Collaborator

Summary

  • Correct process CPU microseconds/milliseconds conversion (95% was reported as 0.095%); retain the last valid sample across equal/backward timestamps.
  • Feed the existing compile queue alert from sandbox-start, REST worker and fallback gatekeeper queues. Preserve the documented legacy sandbox-start aliases and public response shape.
  • Replace the unbounded duration history and repeated reduction with constant-space lifetime total/count, preserving the existing completed-result population.

Reproduction and scope

Base: freshly fetched origin/main 4f903881267f55e32b7c94b8c13f0076bdf6a79c, after green post-merge CI for #187.

Seven regressions reproduced CPU scaling/nonfinite sampling, missed REST queue alerts, and 2,000 retained durations after 2,000 compiles. Three additional tests preserve native queue aliases, idle behavior and average sample population. Focused suites: 42 passed. Independent review: no findings.

CPU remains aggregate process CPU (100% equals one fully used core); no capacity tuning, host utilization reinterpretation or wall-clock architecture change.

Verification

  • Full unit/coverage: 2,790 passed, 1 skipped; Sonar quality gate passed.
  • Types, docs, non-fixing ESLint, complete build.
  • Real toolchain integration: 14 passed, 1 skipped; Docker integration: 27 passed.
  • Full Chromium E2E on an isolated local port: unchanged assertions; only the temporary configuration and hardcoded iframe URL adapted from 3000 to 3307 because an unrelated project owns 3000.
  • Normal commit and pre-push gates; no bypass.

No Provider calls, SSOT/ADR or Tutor/Planner/Mastery/Prompt changes; protected/untracked user files remain untouched.

@ttbombadil
ttbombadil merged commit e92f5b4 into main Oct 4, 2026
5 checks passed
@ttbombadil
ttbombadil deleted the fix/accurate-bounded-metrics branch October 5, 2026 13:27
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.

1 participant