~learn.
0:00 / 1:22
Mock interview · Sunwaai

Search showed her a ticket she wasn't allowed to open

transcript

An agent searches for refund. One result shows a snippet. She taps it. You don't have access. Too late. She read it.

The result: refund not received after 10 days. Group: Delivery. And the snippet. My lawyer has advised me to... The ticket page checks the database. Legal Escalations. Blocked.

The interviewer asks: how did your design allow this? The page was right. The search result was stale.

Seconds ago, a lead moved the ticket to Legal. The database knows. The change waits in the indexer, behind other work. So the index still says Delivery. She searches. Her Delivery filter matches the stale copy.

Fix one: verify before returning. Check the top 20 against the database. Build snippets only for hits that pass. And permission changes get their own priority lane.

Filtering only in the index is wrong whenever it lags. And one missed event leaks forever. Verifying closes the lag window for the 20 she sees. The cost: 5 to 10 milliseconds. Sometimes 19 hits, not 20.

Search is how you find a ticket. It's never the authority on who may read it.

Full breakdown in the lecture.