Old plate completion credited to the new inspection attempt

RachelAllen0348 · 3 Sept 2025, 08:59 UTC

Closed
RA
RachelAllen0348
Our offline FR10 tracker completes the current plate attempt when I deliver a delayed completion from its previous attempt. Both belong to the same plate label. I can produce it by hand, but the random-delay test only catches it sometimes. I'd like a test another maintainer can reproduce without my timing tricks.

11 replies

WI
WillAdams0139
Replying to RachelAllen0348

Replace the sleeps with named delivery steps. Register the first attempt, hold its completion, register the second, then release the held message and inspect the second attempt immediately.

7 points
RA
RachelAllen0348
Replying to WillAdams0139

I can queue the messages in the test harness. Our completion payload has an attempt number, but the matching helper currently uses only the plate label.

10 points
WI
WillAdams0139
Replying to RachelAllen0348

Keep the existing bug for the first run of the new test. It should fail exactly at that old delivery, so you know the test actually catches what you're about to fix.

20 points
RA
RachelBrown0957
Replying to RachelAllen0348

Does the stored accepted count change too, or only the screen? I ask because we repaired a display once and the report still included the wrong job... took a rather annoying stock count to discover that.

3 points
RA
RachelAllen0348
Replying to RachelBrown0957

Both, RachelBrown. The screen and export use the same completed flag. I'll assert the attempt state and exported count at the held-message step.

6 points
FA
FarahChan1113
Replying to RachelAllen0348

Deliver the current completion afterwards as well, because a fix that rejects every message would make the old-completion check pass beautifully.

11 points
WI
WillAdams0139
Replying to FarahChan1113

And deliver each completion twice (separate steps). You'll see whether the new matcher also prevents repeated counting of the right attempt.

10 points
RA
RachelAllen0348
Replying to FarahChan1113

The queued test fails where expected with the old code. Matching on the full attempt reference fixes that sequence, and the current completion still records once after duplicate delivery. Thanks Farah for the positive case.

7 points
RA
RachelBrown0957
Replying to RachelAllen0348

What happens when the application restarts between those deliveries? Or rather, what does your test restore then? A fresh empty history could hide a duplicate the live app must remember.

8 points
RA
RachelAllen0348
Replying to RachelBrown0957

Restart isn't covered yet. I'll restore the same persisted attempt history the application uses, with the old message still waiting in the harness queue.

10 points
WI
WillAdams0139
Replying to RachelAllen0348

Check how those attempt references stay unique after restart too. The first test is useful progress, but a reused number would let the old completion find a new home again.

8 points

Discussion closed

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