I cannot trust an FR10 result test whose timing changes every run

HazelBrooks0832 · 29 Jul 2026, 22:55 UTC

Reply to discussion
HA
HazelBrooks0832
Offline FR10 inspection reconciliation marks a new coupon attempt complete when I deliver an older completion. Same job label. How can I control delayed and duplicate events without random sleeps?

17 replies

MI
MinaAbbott0076
Replying to HazelBrooks0832

Can your test choose the next delivered event explicitly? Start with one fixed sequence: attempt A starts, attempt B starts, completion A arrives. Assert that B remains incomplete.

19 points
HA
HazelBrooks0832
Replying to MinaAbbott0076

Yes, delivery is ours to control; the sleep was only pretending to be a network delay.

17 points
JO
JonasAllen0285
Replying to HazelBrooks0832

Keep a readable event trace when the assertion fails. Otherwise the next maintainer has to reverse-engineer which fictional delay produced the result.

2 points
SA
SarahAli0241
Replying to MinaAbbott0076

I'd give each test a tiny script of events, then reuse the same handler as the application. My first impulse was separate fake logic, but that could test the fake beautifully while missing your actual bug.

10 points
MI
MinaAbbott0076
Replying to HazelBrooks0832

What information distinguishes the attempts in the events you receive, rather than only in the test?

11 points
HA
HazelBrooks0832
Replying to MinaAbbott0076

Currently just the job label reaches reconciliation. We lose the attempt distinction before matching the result.

24 points
PR
PriyaChen1177
Replying to HazelBrooks0832

Then fixing the scheduling test isn't the whole repair. Establish whether the upstream record carries reliable attempt correlation, and define an unresolved state when it doesn't. Don't infer identity from whichever attempt happens to be current.

2 points
SA
SarahAli0241
Replying to PriyaChen1177

Priya, would you still keep the job label in the test? I don't want to remove the exact collision Hazel found.

11 points
PR
PriyaChen1177
Replying to SarahAli0241

Definitely. Keep the label the same and make the attempts distinct. I meant stop treating that shared label as sufficient evidence, not remove it.

7 points
JO
JonasAllen0285
Replying to PriyaChen1177

Also try the current completion twice. Different-attempt protection and duplicate handling are different assertions, even if both currently add an extra result.

11 points
HA
HazelBrooks0832
Replying to SarahAli0241

The deterministic test now fails every time on the old matcher. Thanks, Sarah, it's using the actual handler.

9 points
SA
SarahAli0241
Replying to HazelBrooks0832

That should make the repair much easier to check. Keep that failing sequence unchanged when you change the matcher.

10 points
HA
HazelBrooks0832
Replying to JonasAllen0285

The revised offline matcher passes old and duplicate completion cases. Missing correlation stays unresolved instead of borrowing the newest attempt.

20 points
MI
MinaAbbott0076
Replying to HazelBrooks0832

Does it also preserve the unmatched event for later reconciliation, rather than just drop it?

9 points
PR
PriyaChen1177
Replying to HazelBrooks0832

And an offline unresolved state must not become permission to repeat a physical operation. The application's real recovery decision still needs its own review.

19 points
JO
JonasAllen0285
Replying to MinaAbbott0076

When you hand this over, show the missing-correlation example beside a matched late result. That tells support what evidence is absent instead of sending them chasing a timing setting.

20 points
HA
HazelBrooks0832
Replying to MinaAbbott0076

Unmatched events are retained. Real interface mapping and recovery review remain open; the reproducible offline tests are ready for the maintainer.

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