Fairino FR10: A late result fools our job handler

HarishArcher0402 · 4 Aug 2026, 10:08 UTC

Reply to discussion
HA
HarishArcher0402
I'm testing our inspection result reconciliation tracking offline for a setup using Fairino FR10 in a sample inspection setup with recorded job events, with a reference housing as a reference. An earlier attempt's completion incorrectly completes a newer attempt if I deliver it after that attempt starts. I need repeatable delayed and duplicate event tests because the random sleeps aren't reliable.

16 replies

IS
IsaacAdams0172
Replying to HarishArcher0402

Save the exact event order. Does your handler match the completion by attempt identity, or just the job label?

8 points
HA
HarishArcher0402
Replying to IsaacAdams0172

@IsaacAdams0172 Our handler matches only the job label. The saved sequence reliably shows the earlier completion arriving after a new attempt begins and being attached to that new attempt.

7 points
IS
IsaacAdams0172
Replying to HarishArcher0402

@HarishArcher0402 Use the saved sequence to exercise matching by attempt identity, with a controllable harness clock. Making the ordering deterministic should cover this race condition.

5 points
DA
DavidCarter1041
Replying to IsaacAdams0172

It covers that order, not every race. A duplicate or a timeout followed by a late acknowledgement is a different sequence.

11 points
IS
IsaacAdams0172
Replying to DavidCarter1041

Fair. I meant this reproduced wrong match, not the whole class. Keep it as one named schedule and add duplicates and timeout-then-acknowledgement separately.

13 points
HA
HarishArcher0402
Replying to IsaacAdams0172

@IsaacAdams0172 How should I handle history when the same completion is delivered twice? I'd expect one count change but still want both observations visible.

15 points
IS
IsaacAdams0172
Replying to HarishArcher0402

@HarishArcher0402 Yes. Record the second observation as a duplicate without applying completion again. You want repeat delivery to leave the accepted result unchanged.

4 points
KA
KaiAbbott0019
Replying to IsaacAdams0172

Idempotent means ignoring it, basically? Or am I missing why you'd log something you ignored?

-1 points
IS
IsaacAdams0172
Replying to KaiAbbott0019

Same effect when applied again. You can observe and log the duplicate without repeating its business effect; those are different actions.

19 points
SO
SofiaChen1152
Replying to IsaacAdams0172

My offline test used to assert only the final count. It missed a duplicate notification because the number happened to stay right.

17 points
HA
HarishArcher0402
Replying to SofiaChen1152

@SofiaChen1152 Our schedule assertions will include notifications as well as counts, since an unchanged number wouldn't reveal a duplicate message being emitted.

8 points
DA
DavidCarter1041
Replying to HarishArcher0402

And the timeout case? Waiting too long doesn't tell you whether the remote job completed.

13 points
HA
HarishArcher0402
Replying to DavidCarter1041

I'll expect an unknown outcome pending matching evidence, rather than having our test treat a timeout as permission to submit another attempt.

19 points
IS
IsaacAdams0172
Replying to HarishArcher0402

Then make that explicit in the schedule: advance past the timeout, assert unknown, deliver the queued acknowledgement, and apply only the transition it actually supports.

9 points
HA
HarishArcher0402
Replying to IsaacAdams0172

@IsaacAdams0172 I've got a repeatable route for this bug: replay the saved sequence against attempt-specific matching. I'll call the fix complete only when the wrong attempt stays untouched and the related duplicate and timeout cases pass.

20 points
IS
IsaacAdams0172
Replying to HarishArcher0402

@HarishArcher0402 That gives the original mismatch a concrete test while keeping completion dependent on the related cases too.

4 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.