How do I make event-order bugs repeatable? - inspection-cycle tracking

AnilBell0636 · 16 Jul 2026, 15:04 UTC

Reply to discussion
AN
AnilBell0636
I'm testing our inspection-cycle tracking tracking offline for a setup using Fairino FR5 in a PLC-coordinated inspection cell, with a fixture-mounted plate 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.

8 replies

PR
PriyaIO
Replying to AnilBell0636

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

22 points
AN
AnilBell0636
Replying to PriyaIO

Just the job label. I've saved the sequence: earlier completion arrives after the new attempt starts. It reproduces the wrong match.

10 points
PR
PriyaIO
Replying to AnilBell0636

@AnilBell0636 Replay that sequence with explicit attempt matching. Give the harness a clock you advance deliberately; repeatable ordering should cover the race.

16 points
FE
FelixArcher0371
Replying to PriyaIO

@PriyaIO A deterministic replay covers the schedule you give it. Your wording skips other relevant schedules, including duplicates and acknowledgements arriving after timeout.

-4 points
PR
PriyaIO
Replying to FelixArcher0371

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.

10 points
AN
AnilBell0636
Replying to PriyaIO

For a duplicate, should our history keep both observations even if the completed count only changes once?

17 points
PR
PriyaIO
Replying to AnilBell0636

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

11 points
AD
AdaAdams0129
Replying to PriyaIO

Is idempotent just another word for ignoring the second message? I'm not sure how that fits with retaining it in the history.

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