简体中文界面。帖子、指南及政策正文保留原文;未对原文作自动翻译。

A late result fools our job handler (inspection-cycle tracking)

JoAli0244 · 2026年8月30日 01:14 UTC

回复讨论
JO
JoAli0244
In our offline test, delivering an old completion after a new attempt starts makes the new inspection-cycle tracking attempt look complete. The real setup uses Universal Robots UR5e in a PLC-coordinated inspection cell, with an inspection coupon as a reference. I'm trying to exercise delayed and duplicate events reliably; random sleeps keep making the test hard to reproduce

20 条回复

CA
CallumArcher0360
回复 JoAli0244

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

9
JO
JoAli0244

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

22
CA
CallumArcher0360
回复 JoAli0244

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

24
MI
MinaBennett0772

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

-3
CA
CallumArcher0360

@MinaBennett0772 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
JO
JoAli0244

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

11
CA
CallumArcher0360
回复 JoAli0244

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

20
JU
JuliaBennett0761

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

25
CA
CallumArcher0360

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

6
BE
BethBrooks0846

@CallumArcher0360 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.

2
JO
JoAli0244

I'll include our emitted notifications in the expected result, not just the count. A correct number with a doubled message would still be confusing

8
MI
MinaBennett0772
回复 JoAli0244

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

5
JO
JoAli0244

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

18
CA
CallumArcher0360
回复 JoAli0244

@JoAli0244 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.

21
JU
JuliaBennett0761

Should that delayed acknowledgement only establish acceptance? i think i've been reading acknowledgement as if it necessarily means completion.

23
CA
CallumArcher0360

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

20
JO
JoAli0244

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

15
BE
BethBrooks0846

@CallumArcher0360 My own supposedly deterministic harness still depended on a real timer in one component. Removing that dependency was necessary to make repeated schedules behave consistently.

13
JO
JoAli0244

The job-only match explains our reproduced failure. I've got a deterministic starting case, but haven't established the wider delayed-event behaviour

21
CA
CallumArcher0360
回复 JoAli0244

@JoAli0244 The saved wrong-match case is useful progress. It makes sense to keep the broader event handling open.

12

参与讨论

欢迎来到 Application Robot

所有人都可以阅读论坛。登录或注册后即可发起讨论、回复或上传照片。

忘记密码?

注册账号即表示你同意我们的 使用条款 社区准则。请阅读我们的 隐私政策 ,了解我们如何处理你的信息。