OptionalchannelExplicit channel discriminant — see FlowErrorEvent.channel.
The attempt: timing, outcome, category, decision, and the served error without raw.
Stable stage identifier from the builder (matches spec node id).
OptionalstructuredThe attempt's served error with raw — absent for a success or a pause.
Optionaltraversal
Event passed to FlowRecorder.onAttempt — one attempt, at its end (10.1): a stage's own under its retry policy, a
timeoutMsor a run deadline (record.kind === 'stage'), or — during the stage — a call it made ('call',scope.$call) or an outside attempt it reported ('observed', P2).stageName/stageId/traversalContextare the stage's in every case; filter onrecord.kindto count one kind.WHY this event exists:
onStageRetrysays "attempt N failed, retrying" and nothing else — not how long a try took, not why the series stopped, and nothing at all whenretryOndeclined. Every attempt is an AttemptRecord instead, whatever its outcome, with the decision that followed it in the shapedecide()records — the same records the stage's execution-tree node keeps (StageSnapshot.attempts).Fires once per attempt, before
onStageRetry(when the attempt is retried) and beforeonError/onStageExecuted(for the last). The record is frozen and survivesstructuredClone;structuredErroris the served error withraw, as on FlowStageRetryEvent — except for an observed attempt, whose error the library never threw (rawis undefined).