Skip to content

fix(web): service overview throughput uses the queried window - #1281

Merged
Makisuo merged 1 commit into
mainfrom
claude/beautiful-shaw-771bfd
Oct 6, 2026
Merged

Makisuo merged 1 commit into
mainfrom
claude/beautiful-shaw-771bfd

fix(web): divide service overview throughput by the window it queried

9896e14
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 6, 2026 in 49s

Confidence 9/10 · No issues found

🟢 Confidence 9/10 · safe to merge
One-line divisor fix, the only windowDurationSeconds call in the file, pinned by a test that reads 100/3600 without it.
quality 100/100 · no findings · tests covered · risk low

getServiceOverview now divides throughput by the resolved window it queried instead of the raw inputs, fixing a 24x-inflated rate on the default range. Contained and safe to merge.

  • getServiceOverview divides by windowDurationSeconds(startTime, endTime), the resolved window
  • New it.live test asserts 100 spans over the default 24h window
What was checked
  • windowDurationSeconds falls back to 3600s only when a bound is missing or unparseable (packages/query-engine/src/route-rows.ts:79), which the resolved window no longer is
  • The new test fails on the old code: 100/3600 vs 100/86400 exceeds the 1e-9 tolerance
  • No other divisor in services.ts uses raw inputs; getServiceHealthSnapshot already divides by its resolved window (services.ts:141), namespace-scope.ts:46 gets resolved bounds

9896e14 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.