Code RoomMulti-source timestamp parsing spec
MediumPrep Room Coding #4166

Multi-source timestamp parsing spec

Vibe & agenticAlgorithms & data structuresMid–Senior~16 min

You're directing an AI agent to write a Python ingestion function that parses incoming timestamp strings from multiple third-party feeds (some with offsets, some without, some in 'YYYY-MM-DD HH:MM:SS' local form) into a single canonical instant for an analytics warehouse. Write the spec that makes parsing and normalization unambiguous and auditable. What rules for offset-naive inputs, canonical storage, and edge cases do you mandate? Then describe what a naive prompt ('parse the timestamps and store them') gets wrong.

Implement
normalize_to_epoch(records: list[str], feed_zones: list[str]) → list[int]
Examples
in[["feed_a|2026-01-01T00:00:00Z","feed_a|2026-01-01T00:00:00+00:00"],[]]out[1767225600,1767225600]
in[["feed_b|2026-01-01 00:00:00","feed_c|2026-01-01 00:00:00"],["feed_b=+05:30","feed_c=-08:00"]]out[1767205800,1767254400]
in[["feed_d|2026-01-01 00:00:00","feed_a|01/02/2026 00:00:00"],["feed_b=+05:30"]]out[-1,-1]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 16 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.