Checkpoint
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Checkpoint: the send gate. Two versions of the weekly report — the model's first draft and the corrected resubmission — go through the full verification, and each gets a verdict.
Write report_gate(name, claims, export):
- Print
{name}: - Recompute the four metrics (same formulas as the last step:
row count, mean of
days, count ofdays > 5, percentdamaged) and verify each claim in order with tolerance 0.05, printing indented lines:{metric}: VERIFIED ({claimed})or{metric}: MISMATCH — report {claimed}, export {actual} - Collect the mismatched metric names. Print
verdict: HOLD — {names comma-joined}if any, elseverdict: SEND.
Expected output:
weekly-ops-w30:
orders_shipped: VERIFIED (5)
avg_days: MISMATCH — report 4.2, export 6.0
late_orders: VERIFIED (2)
damage_rate_pct: VERIFIED (20.0)
verdict: HOLD — avg_days
weekly-ops-w30-corrected:
orders_shipped: VERIFIED (5)
avg_days: VERIFIED (6.0)
late_orders: VERIFIED (2)
damage_rate_pct: VERIFIED (20.0)
verdict: SEND