Multi-source timestamp parsing spec
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.
normalize_to_epoch(records: list[str], feed_zones: list[str]) → list[int][["feed_a|2026-01-01T00:00:00Z","feed_a|2026-01-01T00:00:00+00:00"],[]]out[1767225600,1767225600][["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][["feed_d|2026-01-01 00:00:00","feed_a|01/02/2026 00:00:00"],["feed_b=+05:30"]]out[-1,-1]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.
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.