Checkpoint
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Checkpoint. Turn logs into an alert decision. Write monitor(logs, threshold) that computes the error rate (fraction of error logs, 2
decimals) and returns:
error rate 0.6: ALERT
Format "error rate {rate}: {state}" where state is ALERT if rate >
threshold, else ok.