Code RoomExpiry check uses naive now
MediumPrep Room Coding #1957

Expiry check uses naive now

Code reviewCode quality & reviewMid–Senior~18 min

Review this Python helper that decides whether a webhook event has expired (events are valid for 5 minutes).

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix, specific and kind.

0:00 of about 18 min
Mark a line and say what kind of problem it is.0 findings
1from datetime import datetime, timedelta, timezone
2 
3MAX_AGE = timedelta(minutes=5)
4 
5def is_expired(event):
6 # event['created'] is an ISO-8601 string with offset, e.g. '2026-06-22T19:05:00+00:00'
7 created = datetime.fromisoformat(event['created'])
8 return datetime.now() - created > MAX_AGE
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.