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

min_severity
incident_queue.lua
Replay: real traced execution (multi-file project)
local min_severity = 2
local visible = 0
local high = 0

for _, severity in ipairs({1, 2, 3, 3}) do
  if severity >= min_severity then
    visible = visible + 1
  end
  if severity >= 3 then
    high = high + 1
  end
end

print("min=" .. min_severity .. " visible=" .. visible .. " high=" .. high)
local min_severity = 1
local visible = 0
local high = 0

for _, severity in ipairs({1, 2, 3, 3}) do
  if severity >= min_severity then
    visible = visible + 1
  end
  if severity >= 3 then
    high = high + 1
  end
end

print("min=" .. min_severity .. " visible=" .. visible .. " high=" .. high)
local min_severity = 3
local visible = 0
local high = 0

for _, severity in ipairs({1, 2, 3, 3}) do
  if severity >= min_severity then
    visible = visible + 1
  end
  if severity >= 3 then
    high = high + 1
  end
end

print("min=" .. min_severity .. " visible=" .. visible .. " high=" .. high)
  1. min_severity ← 2, visible ← 0, high ← 0

    1local min_severity→ 2 = 2 --@min_severity=1, 32local visible→ 0 = 03local high→ 0 = 0
  2. _, severity in ipairs({1, 2, 3, 3}) do

    pass 1 of 4
    5for _1, severity1 in ipairs({1, 2, 3, 3}) do6  if severity >= min_severity then7    visible = visible + 1
    All 4 passes — pass 1 is the card above
    pass_severityhigh
    111
    222
    3330 1
    4431 2
  3. visible ← 1

    pass 1 of 3
    5for _, severity in ipairs({1, 2, 3, 3}) do6  if severity2 >= min_severity2 then7    visible→ 1 = visible + 18  end
    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
    8end9if severity3 >= 3 then10  high→ 1 = high + 111end
  5. high ← 2

    pass 2 of 2
    8end9if severity3 >= 3 then10  high→ 2 = high + 111end
  6. print("min=" .. min_severity .. " visible=" .. visible .. " high=" .. …

    14print("min=" .. min_severity2 .. " visible=" .. visible3 .. " high=" .. high2)
    outputmin=2 visible=3 high=2
  1. min_severity ← 1, visible ← 0, high ← 0

    1local min_severity→ 1 = 12local visible→ 0 = 03local high→ 0 = 0
  2. _, severity in ipairs({1, 2, 3, 3}) do

    pass 1 of 4
    5for _1, severity1 in ipairs({1, 2, 3, 3}) do6  if severity >= min_severity then7    visible = visible + 1
    All 4 passes — pass 1 is the card above
    pass_severityhigh
    111
    222
    3330 1
    4431 2
  3. visible ← 1

    pass 1 of 4
    5for _, severity in ipairs({1, 2, 3, 3}) do6  if severity1 >= min_severity1 then7    visible→ 1 = visible + 18  end
    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
    8end9if severity3 >= 3 then10  high→ 1 = high + 111end
  5. high ← 2

    pass 2 of 2
    8end9if severity3 >= 3 then10  high→ 2 = high + 111end
  6. print("min=" .. min_severity .. " visible=" .. visible .. " high=" .. …

    14print("min=" .. min_severity1 .. " visible=" .. visible4 .. " high=" .. high2)
    outputmin=1 visible=4 high=2
  1. min_severity ← 3, visible ← 0, high ← 0

    1local min_severity→ 3 = 32local visible→ 0 = 03local high→ 0 = 0
  2. _, severity in ipairs({1, 2, 3, 3}) do

    pass 1 of 4
    5for _1, severity1 in ipairs({1, 2, 3, 3}) do6  if severity >= min_severity then7    visible = visible + 1
    All 4 passes — pass 1 is the card above
    pass_severitymin_severityvisiblehigh
    111
    222
    33330 10 1
    44331 21 2
  3. visible ← 1

    pass 1 of 2
    5for _, severity in ipairs({1, 2, 3, 3}) do6  if severity3 >= min_severity3 then7    visible→ 1 = visible + 18  end
  4. high ← 1

    pass 1 of 2
    8end9if severity3 >= 3 then10  high→ 1 = high + 111end
  5. visible ← 2

    pass 2 of 2
    5for _, severity in ipairs({1, 2, 3, 3}) do6  if severity3 >= min_severity3 then7    visible→ 2 = visible + 18  end
  6. high ← 2

    pass 2 of 2
    8end9if severity3 >= 3 then10  high→ 2 = high + 111end
  7. print("min=" .. min_severity .. " visible=" .. visible .. " high=" .. …

    14print("min=" .. min_severity3 .. " visible=" .. visible2 .. " high=" .. high2)
    outputmin=3 visible=2 high=2