queues: service level counts callers who weren't answered
ci / check (push) Successful in 1m4s
ci / images (push) Successful in 19s

withinSlaPercent was "answered within sla_seconds / answered", so a
queue where a caller timed out still showed 100%. It is now the usual
service level: answered within sla_seconds out of every caller the
queue is done with, leaving out those who hung up before sla_seconds
(nobody could have answered them in time). Timed out and turned away
count as missed; callers still waiting aren't counted. Written into
04; the page label says "Callers answered within N s".

Real calls: m8-t1 now shows 50% (1 answered in time, 1 timed out, the
early hang-up left out) and the milestone check 67% (2 of 3), and
asserts it. The check moves to queue 552 (*45552) so it doesn't clash
with m8-t1's 550 on a shared database.

Task: M8-T1
This commit is contained in:
iamdoubz committed 2026-10-19 12:13:39 -05:00
1 parent 088372bff8
commit 4742ed52ea
8 files changed
+28 -17

No files matched your search

+4 -1
View File
@@ -75,6 +75,9 @@ export type QueueStats = {
timedOut: number;
/** Seconds, over answered calls; null when none. */
avgWaitSeconds: number | null;
/** % of answered calls picked up within sla_seconds; null when none. */
/**
* Service level: % of callers answered within sla_seconds, out of all who left the queue except
* those who hung up before sla_seconds; timed out and turned away count as missed. null when none.
*/
withinSlaPercent: number | null;
};