My sample acceptance bookkeeping tracker mixes up consecutive attempts

FionaBrooks0847 · 25 Jul 2026, 16:59 UTC

Reply to discussion
FI
FionaBrooks0847
In our offline test, delivering an old completion after a new attempt starts makes the new sample acceptance bookkeeping attempt look complete. The real setup uses Universal Robots UR5e in a sample inspection setup with recorded job events, with a sample bracket as a reference. I'm trying to exercise delayed and duplicate events reliably; random sleeps keep making the test hard to reproduce.

19 replies

LI
LiamBaker0490
Replying to FionaBrooks0847

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

20 points
FI
FionaBrooks0847
Replying to LiamBaker0490

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.

17 points
LI
LiamBaker0490
Replying to FionaBrooks0847

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

17 points
MA
MayaAdams0127
Replying to LiamBaker0490

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

14 points
LI
LiamBaker0490
Replying to MayaAdams0127

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.

16 points
FI
FionaBrooks0847
Replying to LiamBaker0490

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

20 points
LI
LiamBaker0490
Replying to FionaBrooks0847

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

18 points
AD
AdaChan1086
Replying to LiamBaker0490

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

2 points
LI
LiamBaker0490
Replying to AdaChan1086

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

11 points
RA
RachelBrooks0870
Replying to LiamBaker0490

On my setup, checking the final count alone let a repeated notification slip through. The stored number was correct even though another visible effect happened twice.

19 points
FI
FionaBrooks0847
Replying to RachelBrooks0870

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

7 points
MA
MayaAdams0127
Replying to FionaBrooks0847

@FionaBrooks0847 What state do you expect after timeout? The local wait ending doesn't establish the remote job's final outcome.

0 points
FI
FionaBrooks0847
Replying to MayaAdams0127

@MayaAdams0127 Unknown until matching evidence settles it. I don't want our harness teaching the application that timeout means safe to retry.

14 points
LI
LiamBaker0490
Replying to FionaBrooks0847

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.

24 points
AD
AdaChan1086
Replying to LiamBaker0490

An acknowledgement isn't completion, right? I keep mentally jumping from accepted to finished

10 points
LI
LiamBaker0490
Replying to AdaChan1086

Follow your interface's definitions. If it acknowledges acceptance, it says nothing by itself about completion. Name those events differently in the test.

14 points
FI
FionaBrooks0847
Replying to LiamBaker0490

I'll keep acceptance and completion separate in our fixtures. Our expected-state names need to be as clear as the incoming events.

11 points
FI
FionaBrooks0847
Replying to FionaBrooks0847

Our handling of delayed events remains unresolved. Reproducing the identity mistake hasn't yet established that the corrected handler behaves reliably.

21 points
LI
LiamBaker0490
Replying to FionaBrooks0847

Understood. A repeatable failure helps diagnosis, but doesn't prove the handler can cope with delayed events yet.

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