Count incidents visible at a minimum severity and summarize high-severity work.

incident queue A deterministic incident queue can be filtered into visible and high-severity counts without modeling live tickets.

Incident Queue Reliability Report

minSeverity
IncidentQueue.kt
Replay: real traced execution (multi-file project)
fun main() {
    val minSeverity = 2
    var visible = 0
    var high = 0

    for (severity in listOf(1, 2, 3, 3)) {
        if (severity >= minSeverity) {
            visible += 1
        }
        if (severity >= 3) {
            high += 1
        }
    }

    println("min=$minSeverity visible=$visible high=$high")
}
fun main() {
    val minSeverity = 1
    var visible = 0
    var high = 0

    for (severity in listOf(1, 2, 3, 3)) {
        if (severity >= minSeverity) {
            visible += 1
        }
        if (severity >= 3) {
            high += 1
        }
    }

    println("min=$minSeverity visible=$visible high=$high")
}
fun main() {
    val minSeverity = 3
    var visible = 0
    var high = 0

    for (severity in listOf(1, 2, 3, 3)) {
        if (severity >= minSeverity) {
            visible += 1
        }
        if (severity >= 3) {
            high += 1
        }
    }

    println("min=$minSeverity visible=$visible high=$high")
}
  1. minSeverity ← 2, visible ← 0, high ← 0

    1fun main() {2    val minSeverity→ 2 = 2 //@minSeverity=1, 33    var visible→ 0 = 04    var high→ 0 = 0
  2. for (severity in listOf(1, 2, 3, 3))

    pass 1 of 4
    6for (severity1 in listOf(1, 2, 3, 3)) {7    if (severity >= minSeverity) {
    All 4 passes — pass 1 is the card above
    passseverityhigh
    11
    22
    330 1
    431 2
  3. visible ← 1

    pass 1 of 3
    6for (severity in listOf(1, 2, 3, 3)) {7    if (severity2 >= minSeverity2) {8        visible→ 1 += 19    }
    All 3 passes — pass 1 is the card above
    passseverityvisiblehigh
    120 1
    231 20 1
    332 31 2
  4. high ← 1

    pass 1 of 2
    9}10if (severity3 >= 3) {11    high→ 1 += 112}
  5. high ← 2

    pass 2 of 2
    9}10if (severity3 >= 3) {11    high→ 2 += 112}
  6. println("min=$minSeverity visible=$visible high=$high")

    15    println("min=$minSeverity2 visible=$visible3 high=$high2")16}
    outputmin=2 visible=3 high=2
  1. minSeverity ← 1, visible ← 0, high ← 0

    1fun main() {2    val minSeverity→ 1 = 13    var visible→ 0 = 04    var high→ 0 = 0
  2. for (severity in listOf(1, 2, 3, 3))

    pass 1 of 4
    6for (severity1 in listOf(1, 2, 3, 3)) {7    if (severity >= minSeverity) {
    All 4 passes — pass 1 is the card above
    passseverityhigh
    11
    22
    330 1
    431 2
  3. visible ← 1

    pass 1 of 4
    6for (severity in listOf(1, 2, 3, 3)) {7    if (severity1 >= minSeverity1) {8        visible→ 1 += 19    }
    All 4 passes — pass 1 is the card above
    passseverityvisiblehigh
    110 1
    221 2
    332 30 1
    433 41 2
  4. high ← 1

    pass 1 of 2
    9}10if (severity3 >= 3) {11    high→ 1 += 112}
  5. high ← 2

    pass 2 of 2
    9}10if (severity3 >= 3) {11    high→ 2 += 112}
  6. println("min=$minSeverity visible=$visible high=$high")

    15    println("min=$minSeverity1 visible=$visible4 high=$high2")16}
    outputmin=1 visible=4 high=2
  1. minSeverity ← 3, visible ← 0, high ← 0

    1fun main() {2    val minSeverity→ 3 = 33    var visible→ 0 = 04    var high→ 0 = 0
  2. for (severity in listOf(1, 2, 3, 3))

    pass 1 of 4
    6for (severity1 in listOf(1, 2, 3, 3)) {7    if (severity >= minSeverity) {
    All 4 passes — pass 1 is the card above
    passseverityminSeverityvisiblehigh
    11
    22
    3330 10 1
    4331 21 2
  3. visible ← 1

    pass 1 of 2
    6for (severity in listOf(1, 2, 3, 3)) {7    if (severity3 >= minSeverity3) {8        visible→ 1 += 19    }
  4. high ← 1

    pass 1 of 2
    9}10if (severity3 >= 3) {11    high→ 1 += 112}
  5. visible ← 2

    pass 2 of 2
    6for (severity in listOf(1, 2, 3, 3)) {7    if (severity3 >= minSeverity3) {8        visible→ 2 += 19    }
  6. high ← 2

    pass 2 of 2
    9}10if (severity3 >= 3) {11    high→ 2 += 112}
  7. println("min=$minSeverity visible=$visible high=$high")

    15    println("min=$minSeverity3 visible=$visible2 high=$high2")16}
    outputmin=3 visible=2 high=2