Dev.to AI πŸ€– Ai πŸ‘ 2 πŸ“– 1 min read

Replay or Re-run: Decide from the Agent Trace

A support agent times out while updating a ticket. A second run succeeds. That shows the workflow can finish under the new conditions. It leaves two questions open: what failed on the first run, and whether its update la

A support agent times out while updating a ticket. A second run succeeds. That shows the workflow can finish under the new conditions. It leaves two questions open: what failed on the first run, and whether its update landed.

Steps for choosing the next diagnostic

Preserve the original trace and the version of the workflow. Record the span and parent identifiers, the operation identifier, relevant versions and the observations already made. Parallel spans do not have a single execution order just because their timestamps can be sorted. Record the causal dependencies the failed step actually used. Capture only the inputs you are permitted to retain. A redacted input may require a synthetic fixture.

For a read, replay just that step against a stable snapshot with recorded arguments. Compare the result fields used by the next step. A replay against today's database answers a different question. For a write, use a disposable destination or a stub and compare the state before and after. For the original ticket, look up the operation receipt; loss of a reply alone cannot establish whether the change took effect.

A three-case review exercise

  1. The recorded lookup read ticket version 7. Today's version is 8. Use version 7 to investigate the original read and tag a run against version 8 separately.
  2. The update timed out. The ticket history includes the original operation ID and matching change. Record the receipt and replay the caller's handling locally.
  3. The update timed out and the history is inconclusive. Keep the outcome unresolved. Exercise the failure branch against a fake ticket that accepts an update and then drops its reply.

Include the evidence, target and expected observation with the decision. A matching response plus a different state change is a failed replay, even when both runs returned success.

OpenTelemetry trace concepts Β· HTTP semantics, Β§9.2.2

This article was created with AI assistance.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.