Operational Reliability Reports
Incident Queue Reliability Report
Count visible incidents and high-severity incidents from a fixed severity queue.
incident queue
A small severity queue keeps replay deterministic while showing how a report threshold changes output.
Incident Queue Reliability Report
incident_queue.js
Replay: real traced execution (multi-file project)
const minSeverity = 2;
let visible = 0;
let high = 0;
for (const severity of [1, 2, 3, 3]) {
if (severity >= minSeverity) {
visible += 1;
}
if (severity >= 3) {
high += 1;
}
}
console.log(`min=${minSeverity} visible=${visible} high=${high}`);
const minSeverity = 1;
let visible = 0;
let high = 0;
for (const severity of [1, 2, 3, 3]) {
if (severity >= minSeverity) {
visible += 1;
}
if (severity >= 3) {
high += 1;
}
}
console.log(`min=${minSeverity} visible=${visible} high=${high}`);
const minSeverity = 3;
let visible = 0;
let high = 0;
for (const severity of [1, 2, 3, 3]) {
if (severity >= minSeverity) {
visible += 1;
}
if (severity >= 3) {
high += 1;
}
}
console.log(`min=${minSeverity} visible=${visible} high=${high}`);
minSeverity ← 2, visible ← 0, high ← 0
1const minSeverity→ 2 = 2; //@minSeverity=1, 32let visible→ 0 = 0;3let high→ 0 = 0;if (severity >= minSeverity)
pass 1 of 35for (const severity of [1, 2, 3, 3]) {6 if (severity2 >= minSeverity2) {7 visible += 1;8 }All 3 passes — pass 1 is the card above pass severity1 2 2 3 3 3 if (severity >= 3)
pass 1 of 27 visible += 1;8}9if (severity3 >= 3) {10 high += 1;11}if (severity >= 3)
pass 2 of 27 visible += 1;8}9if (severity3 >= 3) {10 high += 1;11}console.log(`min=${minSeverity} visible=${visible} high=${high}`);
11 }12}1314console.log(`min=${minSeverity2} visible=${visible3} high=${high2}`);outputmin=2 visible=3 high=2
minSeverity ← 1, visible ← 0, high ← 0
1const minSeverity→ 1 = 1;2let visible→ 0 = 0;3let high→ 0 = 0;if (severity >= minSeverity)
pass 1 of 45for (const severity of [1, 2, 3, 3]) {6 if (severity1 >= minSeverity1) {7 visible += 1;8 }All 4 passes — pass 1 is the card above pass severity1 1 2 2 3 3 4 3 if (severity >= 3)
pass 1 of 27 visible += 1;8}9if (severity3 >= 3) {10 high += 1;11}if (severity >= 3)
pass 2 of 27 visible += 1;8}9if (severity3 >= 3) {10 high += 1;11}console.log(`min=${minSeverity} visible=${visible} high=${high}`);
11 }12}1314console.log(`min=${minSeverity1} visible=${visible4} high=${high2}`);outputmin=1 visible=4 high=2
minSeverity ← 3, visible ← 0, high ← 0
1const minSeverity→ 3 = 3;2let visible→ 0 = 0;3let high→ 0 = 0;if (severity >= minSeverity)
pass 1 of 25for (const severity of [1, 2, 3, 3]) {6 if (severity3 >= minSeverity3) {7 visible += 1;8 }if (severity >= 3)
pass 1 of 27 visible += 1;8}9if (severity3 >= 3) {10 high += 1;11}if (severity >= minSeverity)
pass 2 of 25for (const severity of [1, 2, 3, 3]) {6 if (severity3 >= minSeverity3) {7 visible += 1;8 }if (severity >= 3)
pass 2 of 27 visible += 1;8}9if (severity3 >= 3) {10 high += 1;11}console.log(`min=${minSeverity} visible=${visible} high=${high}`);
11 }12}1314console.log(`min=${minSeverity3} visible=${visible2} high=${high2}`);outputmin=3 visible=2 high=2