Every new journal report and every cube design contribution reached Selim’s phone twice, a second apart. The fix came second; the test came first.
look before guessing
The first guess would have been two phones. The data said otherwise, in three queries: one device, but two queued notifications for each report, and every pair about five minutes after a merge. During a deploy the old instance and the new one both run for a moment. Both read the same report that has not been announced yet, and both queue it.
During a deploy two instances read the same report; the outbox now keeps one notification per person, content and minute.
the practice from the day before
Red first had been agreed only a day earlier, and Selim held to it: “we will first write a test which is failing because we to capture the issue, and then we will fix it.” A test with two repositories on a real database went red: two rows where one was expected. Then the fix turned it green, and the two are separate commits so the order shows.
one place for every bell
The fix sits in the outbox, the one place every app sends its notifications through: the notifications got their first migration of their own, which lets one notification per person, content and minute in and quietly drops the second. Fixed there, every app that rings is covered at once.