Summarize whether an open service window is ready, watched, or blocked.

Service Window Reliability Report

service_window_reliability_report.rb
failed_checks = 
open_minutes = 45
status = "ready"

if failed_checks > 0 && open_minutes > 30
  status = "watch"
end

if failed_checks >= 3
  status = "blocked"
end

puts "failed=#{failed_checks}"
puts "open=#{open_minutes}"
puts "status=#{status}"
failed_checks = 
open_minutes = 45
status = "ready"

if failed_checks > 0 && open_minutes > 30
  status = "watch"
end

if failed_checks >= 3
  status = "blocked"
end

puts "failed=#{failed_checks}"
puts "open=#{open_minutes}"
puts "status=#{status}"
failed_checks = 
open_minutes = 45
status = "ready"

if failed_checks > 0 && open_minutes > 30
  status = "watch"
end

if failed_checks >= 3
  status = "blocked"
end

puts "failed=#{failed_checks}"
puts "open=#{open_minutes}"
puts "status=#{status}"
service-window-report Operational status can be built from small scalar checks. Later guards can raise the status without hiding the earlier values.