promptdojo_

Batch vs realtime serving — step 5 of 7

The nightly scoring job silently skipped two days (its last success is dated 07-18), and this server keeps serving those scores with no complaint — decisions are running on stale data and nobody knows. The day_of_year helper is sitting right there unused. Fix the serving path to compute the scores' age and print a loud STALE line when it exceeds MAX_AGE_DAYS: f"STALE: {age} day(s) old (limit {MAX_AGE_DAYS}) - alert + rerun the job".

The break is on line 10 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.