Raju Dandigam uses a synthetic tool trace to distinguish retries from duplicate telemetry in Count Attempts, Not JSONL Rows. His AgentInspect example records a failed read and a second read that succeeds. A contract allowing one attempt fails on the fixture, while a contract allowing two passes.
Decide what should survive a retry
The operation identifier represents the request the application is trying to complete. Both calls in the example belong to that operation. Each call has its own attempt identifier, which can appear on multiple lifecycle records for the same call. The retry rule groups explicitly identified attempts within a trace and prefers distinct attempt identifiers when they are present. Counting tool names would merge separate requests that happen to use the same tool. Counting records could count a single call more than once.
For a test of a document lookup, give the lookup one operation identifier, then record the invocation that times out and the invocation that returns the document with different attempt identifiers. Include an unrelated lookup using the same tool name if you also want to test the grouping boundary. The second lookup needs its own operation identifier.
Test redelivery and conflicting records separately
Dandigam appends an exact copy of the second attempt's terminal record and reruns both contracts. In the example the verdicts stay the same. A useful companion test would reuse that attempt identifier on a different execution with different arguments. If the trace consumer always keeps the last record for an identifier, it can hide the disagreement that this second test is meant to surface.
A retry count describes what the trace says was attempted. For a write that timed out, the receiving service's receipt or state is a separate source of evidence about the resulting effect. Keeping both checks in a test makes it possible to report a reasonable attempt count even when the outcome at the destination is still unknown.