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

A completion from the abandoned attempt finishes my new plate inspection

MiaCarter0992 · 2026年8月16日 07:42 UTC

回复讨论
MI
MiaCarter0992
I've got an offline FR10 plate-inspection tracker where an old completion can finish the next attempt. Random sleeps occasionally expose it, then I can't get the same order again. I want to pin down which attempt the handler thinks it's finishing, not cure it by waiting longer.

15 条回复

FE
FelixBell0632

What exactly reaches the handler: an event tied to an attempt, or just complete? Need to know what information you're throwing away, if any.

13
LU
LucaBennett0700

Replace the sleeps with a queue you release by hand. Start A, abandon A, start B, deliver A's completion. No timing lottery needed for that sequence.

3
AM
AmyBennett0728

I like Luca's queue, but don't quietly give the fake messages an identity the real interface hasn't promised. You can label them in the test harness to explain their origin without pretending your application can read that label.

4
ME
MeiArcher0429

Log handler input and chosen attempt separately. A neat event log won't expose the bug if the log itself uses whichever attempt is current.

9
MI
MiaCarter0992

The offline jobs already have attempt objects. The callback closes over a shared current-attempt variable instead of the object that scheduled it. So the information exists, then my handler looks elsewhere.

5
FE
FelixBell0632

There it is. Can you show the abandoned object's callback changing B without either job running physically?

20
MI
MiaCarter0992

Yes, queued that sequence and B switches to finished as soon as I release A's callback. No controller involved. Mei was right too, the old log printed B's name and disguised where it came from.

7
AM
AmyBennett0728

That's a properly annoying log. I'd keep the origin in it even after fixing the callback, because otherwise the first duplicate you investigate will look like a fresh completion again. Does abandoning A leave its queued callback alive deliberately, or is cancellation failing as well?

7
LU
LucaBennett0700

Cancellation can be a separate issue. The handler should still refuse an obsolete completion if it arrives after cancellation was requested; don't make the test disappear just by emptying the queue.

16
ME
MeiArcher0429

Also release A twice in the test, then B. You want one accepted completion for B, not merely a screen that ends up looking right.

9
MI
MiaCarter0992

Changed the callback to retain its originating attempt and check whether that attempt is still eligible. Old A is now recorded as ignored; B stays pending until its own callback. The double-A case leaves B's accepted count at zero.

3
FE
FelixBell0632

And double B? Same valid callback arriving twice is a different hole.

13
MI
MiaCarter0992

Caught that one. My first change accepted B twice. Added an already-completed check, and the second B callback now leaves the accepted count alone.

17
AM
AmyBennett0728

Thanks for testing it instead of just saying the guard should cover it. I was wondering whether your count and the visible state shared that rule.

10
MI
MiaCarter0992

They do now. Saved deterministic tests cover obsolete A, repeated A, valid B and repeated B, with state and accepted count checked independently. That's the offline tracker bug fixed; I haven't inferred anything about live controller event identity from it.

2

参与讨论

欢迎来到 Application Robot

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

忘记密码?

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