The timestamp used to organize storage does not have to be the timestamp used to answer a business question. A late record can live in Tuesday’s ingestion partition while describing an event that belongs to Sunday’s reporting period. The query must preserve that distinction.

There are at least three clocks here. The event time says when the incident occurred. The processing or ingest time says when this pipeline saw it. A report's as-of time says which facts were known when we published the report. Filtering ingested_at for a question about occurrence substitutes one clock for another. Apache Beam's event-time model makes this distinction explicit and uses watermarks and triggers to decide when windowed results can be emitted and revised.

I would ask the product owner exactly what “last week” means: the customer's timezone, inclusive start and exclusive end, and whether a late arrival should restate an already published report. Store the source occurrence timestamp, original timezone if supplied, normalized instant, ingest timestamp, and source identifier. Partitioning for storage efficiency need not dictate the semantic filter. Compute occurrence-based counts on event time and choose an explicit policy for late data: provisional numbers, a bounded correction window, or a versioned restatement. A watermark is an estimate of completeness, not proof that no older event will arrive.

Now the interviewer asks what the assistant should do when the user requests “the report as it looked Monday morning.” Recomputing today's event-time count is also wrong. You need an as-of view or versioned materialization that preserves what had been observed by Monday, including the report version and the late event's later arrival. A current corrected view and a historical published view answer different questions. Carry the data cutoff and definition into the tool response so the assistant can say which one it used.

Suppose the customer’s reporting week is the local interval from Monday 00:00 inclusive to the next Monday 00:00 exclusive. The Sunday 23:50 incident belongs to that occurrence window, but a report published before Tuesday did not yet know about it. A current corrected count includes it once. Replaying the Monday report requires its saved version or an availability-aware history. A storage optimization can still prune ingestion partitions if it searches every partition in which qualifying late events could reside. An incomplete pruning rule changes the result, not just query speed.

I would test a late Sunday event ingested Tuesday, a timezone boundary, a source timestamp correction, and duplicate delivery. Verify the SQL or aggregation against expected membership, then verify the natural-language answer names the cutoff when it matters. This is distinct from The training feature knew about a payment that had not arrived yet. How?, where later-available facts leak into a historical training feature. Here the source event is old, but its late arrival and the chosen clock alter which reporting window owns it.

An occurrence correction needs its own revision semantics. Suppose the source initially says Monday 00:10 and later corrects the incident to Sunday 23:50. The latest occurrence report should remove one from the Monday week and add one to the previous week, without creating a second incident. Retain the stable incident identity and record which source revision supplied the timestamp. An append-only counter that increments on every update cannot implement that correction correctly.

For efficient queries, maintain a materialized occurrence-time index with revision-aware updates, or scan a documented ingestion horizon and reconcile older arrivals through a correction path. A finite lookback is an explicit completeness assumption. It cannot support an unqualified all-history count if sources can backfill arbitrarily old events. Keep the immutable published report separately when historical presentation matters. This trades additional storage and reconciliation work for the ability to explain both the corrected count and the number people actually acted on.