timed-out check comes back and completes its replacement

LucyChan1089 · 8 Jun 2026, 11:38 UTC

Reply to discussion
LU
LucyChan1089
My offline FR5 inspection tracker accepts a late result from the first check after its retry has started. Both checks belong to the same housing, so the housing ID does not distinguish them. Random delays reproduce it occasionally. I want a test that fails every time until the correlation is fixed.

10 replies

JO
JoAli0244
Replying to LucyChan1089

Can you hold the first result and release it after starting the retry?

25 points
LU
LucyChan1089
Replying to JoAli0244

Yes. The fake transport can store outgoing requests and let the test deliver responses explicitly. I have reproduced the failure with no sleeps: start one check, expire it, start the retry, deliver the first result. The retry becomes complete immediately.

17 points
JO
JoAli0244
Replying to LucyChan1089

Then assert the retry stays pending before delivering its own result.

7 points
OL
OliverChan1059
Replying to LucyChan1089

We had a similar test that passed after adding IDs, then failed after a process restart because the counter started again. Distinguish attempts across the lifetime where old events can still arrive. Housing identity and attempt identity are doing different jobs here.

21 points
JO
JoAli0244
Replying to OliverChan1059

Does the response carry the attempt ID, or only the request?

8 points
LU
LucyChan1089
Replying to JoAli0244

Only the request did. I changed the fake responder and tracker to carry and compare an attempt token end to end. The old result now leaves the retry pending; its matching result completes it. We still need to agree that token with the real interface owner.

-2 points
JO
JoAli0244
Replying to LucyChan1089

Have you delivered the matching result twice as well?

17 points
MA
MayaBarnes0562
Replying to LucyChan1089

What happens if the pending attempt is cancelled before its matching result arrives?

17 points
LU
LucyChan1089
Replying to MayaBarnes0562

The duplicate produces no second completion in the new test. Cancellation also stays final when its matching result arrives later. These pass in the offline tracker only; the restart case and production transport agreement are still outstanding.

25 points
AN
AnikaBennett0769
Replying to LucyChan1089

Keep that explicit event delivery helper; it makes each ordering readable, and someone maintaining this later won't have to interpret a handful of mysterious sleep durations

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