fix(runner): an apply error leaves the action's fate unknown, not undone

A deadline that fires after the tap was dispatched leaves the effect
committed. Reporting nil made the spec see an effect with no action to cause
it, which is how the counting property convicts a healthy app.
This commit is contained in:
pj committed 2026-08-15 13:33:55 +05:30
1 parent 53245fc589
commit 6e52fa0837
1 file changed
+10 -3
+10 -3
View File
@@ -298,11 +298,18 @@ func Run(ctx context.Context, options Options) (Summary, error) {
logger.Warn("apply error; marking step transitional", "step", stepIndex, "err", err)
transitional = true
applySkipped = true
lastAction = nil
// The error says the call failed, not that the gesture never
// reached the app: a deadline that fires after dispatch leaves
// the effect committed. Reporting no action here would let a
// property convict the app for an effect with no cause, so the
// action is reported with its fate unknown instead.
unconfirmed := nextAction
lastAction = &unconfirmed
} else {
consecutiveApplyFailures = 0
actionCopy := nextAction
lastAction = &actionCopy
applied := nextAction
applied.Applied = true
lastAction = &applied
}
} else {
lastAction = nil