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.
@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.
@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.
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.
@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.
@HarishArcher0402 Yes. Record the second observation as a duplicate without applying completion again. You want repeat delivery to leave the accepted result unchanged.
@SofiaChen1152 Our schedule assertions will include notifications as well as counts, since an unchanged number wouldn't reveal a duplicate message being emitted.
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.
@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.