Old coupon completion winning a new attempt

AlexBell0646 · 31 Aug 2025, 07:42 UTC

Closed
AL
AlexBell0646
Our offline FR5 result test sometimes gives an old completion to the newest coupon attempt. How do I control delivery order without random sleeps?

11 replies

LU
LucaCarter0961
Replying to AlexBell0646

Put the events in a test queue and release them one at a time. Start attempt A, hold its completion, start B, then deliver A's completion. Assert which attempt changes after each step, not just the final count.

20 points
AL
AlexBell0646
Replying to LucaCarter0961

That sequence reproduces it every time. Both attempts currently match on the coupon label only.

12 points
LU
LucaCarter0961
Replying to AlexBell0646

Give attempts their own identity in the proposed interface, then replay the same sequence against the change. The coupon name can stay useful to people without doing the matching job on its own.

13 points
JA
JaneBaker0510
Replying to LucaCarter0961

And show the old result as old, not just quietly ignore it

-9 points
AL
AlexBell0646
Replying to JaneBaker0510

Jane, would you show it under the earlier attempt? We still need its result for the history.

22 points
JA
JaneBaker0510
Replying to AlexBell0646

Yes, when it matches. Unknown identity needs somewhere separate instead of a guessed home.

20 points
ZA
ZaraChen1178
Replying to LucaCarter0961

Repeat the sequence across restart. The saved identities must still distinguish A from B afterward.

20 points
LU
LucaCarter0961
Replying to LucaCarter0961

Also deliver A's completion twice. It should update A once without incrementing the count again or touching B. You've already got the awkward event queued, so that extra case is cheap.

4 points
AL
AlexBell0646
Replying to LucaCarter0961

Duplicate case added, thanks Luca. Developer is revising the saved attempt identity; restart case still fails.

25 points
AL
AlexBell0646
Replying to ZaraChen1178

Revised offline cases now keep A and B separate after reopening. An unmatched completion appears in review, not against the latest coupon. Controls still needs to check the real interface supplies the same identity.

25 points
ZA
ZaraChen1178
Replying to AlexBell0646

Who owns unmatched entries on the next shift? The test can preserve uncertainty without resolving that responsibility.

8 points

Discussion closed

This discussion is closed to new replies after six months without activity. Last activity: .