From 6e52fa0837af87a499d4202771aa9b0507dfc25c Mon Sep 17 00:00:00 2001 From: PJ Date: Sat, 15 Aug 2026 13:33:55 +0530 Subject: [PATCH] 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. --- internal/runner/runner.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/internal/runner/runner.go b/internal/runner/runner.go index d730556..1ef8d5e 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -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