Our old FR5 result ticks off the new inspection attempt

NinaAbbott0066 · 31 Mar 2026, 18:32 UTC

Reply to discussion
NI
NinaAbbott0066
I've reproduced a nasty little result swap in our offline reporting test. Start an inspection, start a later attempt, then deliver the first one's delayed completion. The new attempt turns green. It did not produce that result. Random sleeps only reproduce it sometimes, which makes the test a poor witness. I want a fixed event sequence that catches this every time and checks the old result hasn't simply been thrown away to make the screen behave.

19 replies

TH
TheoBarnes0584
Replying to NinaAbbott0066

Drive the events explicitly in the test. Start the first identified attempt, start the second, then deliver the first completion. Assert both attempt records after each step. No real sleeping needed to establish that order.

6 points
NI
NinaAbbott0066
Replying to TheoBarnes0584

That fixed sequence fails reliably now. The event includes the first attempt identifier, but our handler attaches it to whichever attempt is current. The old attempt stays pending while the new one completes.

14 points
FE
FelixBaker0458
Replying to NinaAbbott0066

Good, you have the wrong behaviour pinned down. Deliver that same completion twice as well. A handler can use the right attempt and still add its result to the total twice.

17 points
AM
AmyAli0206
Replying to NinaAbbott0066

Does the saved result contain the old attempt identifier too, or is that lost before the handler sees it?

-4 points
NI
NinaAbbott0066
Replying to AmyAli0206

Amy, it is present in both the event and saved input. We were ignoring it in favour of the screen's current selection. Felix, duplicate delivery also raises the completed total twice.

8 points
TH
TheoBarnes0584
Replying to NinaAbbott0066

Then route by the recorded identity and reconcile repeated receipts against that attempt's result. Keep the display selection out of ownership. The operator may be looking at an entirely different attempt when a result arrives.

16 points
OL
OliverBrooks0798
Replying to NinaAbbott0066

Can your test select a third attempt on the screen before delivering the first result, Nina?

0 points
FE
FelixBaker0458
Replying to OliverBrooks0798

Oliver's case is useful. Also deliver an unknown attempt identifier and require an explicit unmatched state. Do not let a fallback quietly revive current selection as ownership.

16 points
NI
NinaAbbott0066
Replying to FelixBaker0458

The revised handler passes delayed and duplicate delivery for the two identified attempts. First completes, second stays pending, total rises once. We also added Oliver's selection change and the unknown-identity case; both exposed more assumptions in the display code.

3 points
AM
AmyAli0206
Replying to NinaAbbott0066

What does unknown identity do now? I would want the event retained for investigation, not lost as a parsing failure.

18 points
NI
NinaAbbott0066
Replying to AmyAli0206

It goes to an unmatched list with the original event identity and source information. It completes nothing. The display can show that list without assigning the event to the selected attempt.

9 points
TH
TheoBarnes0584
Replying to NinaAbbott0066

Restart between receipt and reconciliation too. A tidy in-memory answer can still double-count when the process reloads a partly updated history.

4 points
FE
FelixBaker0458
Replying to TheoBarnes0584

And read the exported total in that test. Not just the screen that you've been fixing all week.

1 points
OL
OliverBrooks0798
Replying to NinaAbbott0066

Has another person run the fixed sequence without your debugging setup beside them?

10 points
NI
NinaAbbott0066
Replying to OliverBrooks0798

Our maintainer ran it from the test instructions. Restart exposed an export path that counted receipts instead of reconciled attempts. We have corrected that path and added the stored records, screen and export to the same assertions.

7 points
AM
AmyAli0206
Replying to NinaAbbott0066

Thanks for returning with the export finding. Did the original delayed result remain attached to its first attempt through that restart case?

1 points
NI
NinaAbbott0066
Replying to AmyAli0206

Yes. First attempt keeps its result, second stays pending, duplicate receipt adds no completion, and the unmatched event remains available. Those assertions now survive restart in the offline suite.

15 points
NI
NinaAbbott0066
Replying to NinaAbbott0066

The maintainer also ran the agreed read-only reporting comparison on the workstation with the retained event set. Stored attempt records, displayed count and export agree after restart. We closed this reconciliation bug; the random-delay test is no longer our only way to find it.

-1 points
TH
TheoBarnes0584
Replying to NinaAbbott0066

Worth the boring explicit sequence. Has the test instruction kept the deliberately wrong arrival order so it cannot become another normal-order happy path later?

5 points

Add to the discussion

Welcome to Application Robot

Everyone can read the forum. Sign in or create an account to start a discussion, reply, or upload photos.

Forgot your password?

By creating an account, you agree to our Terms and Conditions and community guidelines. Read our Privacy Policy for how your information is handled.