You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#6 Fix replayed runs showing the unresolved default workflow (read the LAST stage event)
Opening a stored run drew the full, unresolved workflow with every condition visible
(like edit mode), not the resolved lit path the run actually took. Root cause: a live
run upserts each stage node in place (one event), but the STORED trace keeps BOTH the
"running" event (empty data) and the "done" event (which carries the workflow + steps +
verdict) under the same stepId. `readRunGraph`/`readMatchContext` used Array.find, which
returned the FIRST (running, empty) approval/matching event → no workflow, no verdict →
the graph fell back to the generic default and never resolved.
Read the LAST matching event instead (a small findLastEvent helper; Array.findLast needs
a newer lib target). Applied to the approval, matching, and investigation reads. Now a
replayed run resolves the same path + statuses a live run shows.
Verified against the real stored trace on prod: the done approval event (seq 8) carries
the workflow; find grabbed the empty seq-3 one, findLast grabs seq 8.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments