FA-33901 / Notification interfaces / Open access
Notification undo affordance: undo-failure from undo-pending · case 01
The undo-failure event leaves a notification in restored instead of retry-offered.
ROOT CAUSE
Failed reversal is optimistically shown as restored.
THE FAILURE
Failed reversal is optimistically shown as restored.
Unsuccessful approach: Removing the recovery affordance hides a retryable failure.
Case contract
Notification undo affordance is a bounded visual-notification workflow with mutable policy state {'deadline': 20, 'now': 5, 'applied': True, 'requests': 0}. Its default transition relation is {('offered', 'undo-click'): 'undo-pending', ('undo-pending', 'undo-success'): 'restored', ('undo-pending', 'undo-failure'): 'retry-offered', ('offered', 'window-end'): 'committed', ('undo-pending', 'window-end'): 'undo-pending', ('retry-offered', 'retry-click'): 'undo-pending', ('restored', 'late-window-end'): 'restored', ('committed', 'late-undo-click'): 'too-late', ('too-late', 'acknowledge'): 'closed', ('retry-offered', 'dismiss-error'): 'committed'}; domain inputs can suppress or redirect transitions and update policy fields, as specified in solve. Different-generation events are inert. Batches apply in order. Optional observe returns the selected policy field alongside the phase.
Why this case matters
Visual notification lifecycle ordering can leave an inbox or toast showing the wrong actionable state even when transport succeeds.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(initial, events, generation, payload=None, observe=None):
table = {('offered', 'undo-click'): 'undo-pending', ('undo-pending', 'undo-success'): 'restored', ('undo-pending', 'undo-failure'): 'restored', ('offered', 'window-end'): 'committed', ('undo-pending', 'window-end'): 'undo-pending', ('retry-offered', 'retry-click'): 'undo-pending', ('restored', 'late-window-end'): 'restored', ('committed', 'late-undo-click'): 'too-late', ('too-late', 'acknowledge'): 'closed', ('retry-offered', 'dismiss-error'): 'committed'}
data = json.loads(json.dumps({'deadline': 20, 'now': 5, 'applied': True, 'requests': 0})) if payload is None else {**json.loads(json.dumps({'deadline': 20, 'now': 5, 'applied': True, 'requests': 0})), **json.loads(json.dumps(payload))}
state = initial
for delivery in events:
event, event_generation = delivery[:2]
arg = delivery[2] if len(delivery) > 2 else {}
if event_generation == generation:
previous = state
data['now'] = max(data['now'], arg.get('now', data['now']))
if event in ('undo-click', 'retry-click'):
if data['now'] >= data['deadline']: event = 'window-end'
else: data['requests'] += 1
if event == 'window-end' and data['now'] < data['deadline'] and 'now' in arg: event = 'unknown-event'
state = table.get((state, event), state)
if state == 'restored': data['applied'] = False
if state == 'committed': data['applied'] = True
return {'phase': state, 'value': data[observe]} if observe else state
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('offered / undo-click', solve('offered', [('undo-click', N)], N), 'undo-pending')
check('undo-pending / undo-success', solve('undo-pending', [('undo-success', N)], N), 'restored')
check('undo-pending / undo-failure', solve('undo-pending', [('undo-failure', N)], N), 'retry-offered')
check('offered / window-end', solve('offered', [('window-end', N)], N), 'committed')
check('undo-pending / window-end', solve('undo-pending', [('window-end', N)], N), 'undo-pending')
check('retry-offered / retry-click', solve('retry-offered', [('retry-click', N)], N), 'undo-pending')
check('restored / late-window-end', solve('restored', [('late-window-end', N)], N), 'restored')
check('committed / late-undo-click', solve('committed', [('late-undo-click', N)], N), 'too-late')
check('too-late / acknowledge', solve('too-late', [('acknowledge', N)], N), 'closed')
check('retry-offered / dismiss-error', solve('retry-offered', [('dismiss-error', N)], N), 'committed')
check('older notification incarnation', solve('offered', [('undo-click', N - 1)], N), 'offered')
check('future notification incarnation', solve('offered', [('undo-click', N + 1)], N), 'offered')
check('unknown event is inert', solve('offered', [('unknown-event', N)], N), 'offered')
check('empty delivery batch', solve('offered', [], N), 'offered')
check('N stale deliveries before current delivery', solve('offered', [('undo-click', N - 1)] * N + [('undo-click', N)], N), 'undo-pending')
check('trace undo-click then undo-success', solve('offered', [('undo-click', N), ('undo-success', N)], N), 'restored')
check('trace undo-click then undo-failure', solve('offered', [('undo-click', N), ('undo-failure', N)], N), 'retry-offered')
check('trace undo-click then window-end', solve('offered', [('undo-click', N), ('window-end', N)], N), 'undo-pending')
check('trace undo-success then late-window-end', solve('undo-pending', [('undo-success', N), ('late-window-end', N)], N), 'restored')
check('trace undo-failure then retry-click', solve('undo-pending', [('undo-failure', N), ('retry-click', N)], N), 'undo-pending')
check('trace undo-failure then dismiss-error', solve('undo-pending', [('undo-failure', N), ('dismiss-error', N)], N), 'committed')
check('trace window-end then late-undo-click', solve('offered', [('window-end', N), ('late-undo-click', N)], N), 'too-late')
check('trace window-end then undo-success', solve('undo-pending', [('window-end', N), ('undo-success', N)], N), 'restored')
check('trace window-end then undo-failure', solve('undo-pending', [('window-end', N), ('undo-failure', N)], N), 'retry-offered')
check('trace window-end then window-end', solve('undo-pending', [('window-end', N), ('window-end', N)], N), 'undo-pending')
check('trace retry-click then undo-success', solve('retry-offered', [('retry-click', N), ('undo-success', N)], N), 'restored')
check('trace retry-click then undo-failure', solve('retry-offered', [('retry-click', N), ('undo-failure', N)], N), 'retry-offered')
check('trace retry-click then window-end', solve('retry-offered', [('retry-click', N), ('window-end', N)], N), 'undo-pending')
check('trace late-window-end then late-window-end', solve('restored', [('late-window-end', N), ('late-window-end', N)], N), 'restored')
check('trace late-undo-click then acknowledge', solve('committed', [('late-undo-click', N), ('acknowledge', N)], N), 'closed')
check('trace dismiss-error then late-undo-click', solve('retry-offered', [('dismiss-error', N), ('late-undo-click', N)], N), 'too-late')
check('domain state regression 1: requests', solve('offered', [('undo-click', N, {'now': 19})], N, {}, 'requests'), {'phase': 'undo-pending', 'value': 1})
check('domain state regression 2: requests', solve('offered', [('undo-click', N, {'now': 20})], N, {}, 'requests'), {'phase': 'committed', 'value': 0})
check('domain state regression 3: applied', solve('offered', [('window-end', N, {'now': 19})], N, {}, 'applied'), {'phase': 'offered', 'value': True})
check('domain state regression 4: applied', solve('undo-pending', [('undo-success', N, {})], N, {}, 'applied'), {'phase': 'restored', 'value': False})
check('domain state regression 5: requests', solve('retry-offered', [('retry-click', N, {'now': 8})], N, {'requests': 1}, 'requests'), {'phase': 'undo-pending', 'value': 2})
check('domain state regression 6: now', solve('offered', [('undo-click', N, {'now': 2})], N, {}, 'now'), {'phase': 'undo-pending', 'value': 5})
check('domain state regression 7: applied', solve('offered', [('undo-click', N, {'now': 19}), ('window-end', N, {'now': 20}), ('undo-success', N, {})], N, {}, 'applied'), {'phase': 'restored', 'value': False})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| offered / undo-click | undo-pending | undo-pending | Passed |
| undo-pending / undo-success | restored | restored | Passed |
| undo-pending / undo-failure | restored | retry-offered | Failed |
| offered / window-end | committed | committed | Passed |
| undo-pending / window-end | undo-pending | undo-pending | Passed |
| retry-offered / retry-click | undo-pending | undo-pending | Passed |
| restored / late-window-end | restored | restored | Passed |
| committed / late-undo-click | too-late | too-late | Passed |
| too-late / acknowledge | closed | closed | Passed |
| retry-offered / dismiss-error | committed | committed | Passed |
| older notification incarnation | offered | offered | Passed |
| future notification incarnation | offered | offered | Passed |
| unknown event is inert | offered | offered | Passed |
| empty delivery batch | offered | offered | Passed |
| N stale deliveries before current delivery | undo-pending | undo-pending | Passed |
| trace undo-click then undo-success | restored | restored | Passed |
| trace undo-click then undo-failure | restored | retry-offered | Failed |
| trace undo-click then window-end | undo-pending | undo-pending | Passed |
| trace undo-success then late-window-end | restored | restored | Passed |
| trace undo-failure then retry-click | restored | undo-pending | Failed |
| trace undo-failure then dismiss-error | restored | committed | Failed |
| trace window-end then late-undo-click | too-late | too-late | Passed |
| trace window-end then undo-success | restored | restored | Passed |
| trace window-end then undo-failure | restored | retry-offered | Failed |
| trace window-end then window-end | undo-pending | undo-pending | Passed |
| trace retry-click then undo-success | restored | restored | Passed |
| trace retry-click then undo-failure | restored | retry-offered | Failed |
| trace retry-click then window-end | undo-pending | undo-pending | Passed |
| trace late-window-end then late-window-end | restored | restored | Passed |
| trace late-undo-click then acknowledge | closed | closed | Passed |
| trace dismiss-error then late-undo-click | too-late | too-late | Passed |
| domain state regression 1: requests | {'phase': 'undo-pending', 'value': 1} | {'phase': 'undo-pending', 'value': 1} | Passed |
| domain state regression 2: requests | {'phase': 'committed', 'value': 0} | {'phase': 'committed', 'value': 0} | Passed |
| domain state regression 3: applied | {'phase': 'offered', 'value': True} | {'phase': 'offered', 'value': True} | Passed |
| domain state regression 4: applied | {'phase': 'restored', 'value': False} | {'phase': 'restored', 'value': False} | Passed |
| domain state regression 5: requests | {'phase': 'undo-pending', 'value': 2} | {'phase': 'undo-pending', 'value': 2} | Passed |
| domain state regression 6: now | {'phase': 'undo-pending', 'value': 5} | {'phase': 'undo-pending', 'value': 5} | Passed |
| domain state regression 7: applied | {'phase': 'restored', 'value': False} | {'phase': 'restored', 'value': False} | Passed |
SHA-256 / 5101b7be39687b2dafed5a745ffb5fbd86e8990a3f99d9452ce3d9fe5ef01c0d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(initial, events, generation, payload=None, observe=None):
table = {('offered', 'undo-click'): 'undo-pending', ('undo-pending', 'undo-success'): 'restored', ('undo-pending', 'undo-failure'): 'committed', ('offered', 'window-end'): 'committed', ('undo-pending', 'window-end'): 'undo-pending', ('retry-offered', 'retry-click'): 'undo-pending', ('restored', 'late-window-end'): 'restored', ('committed', 'late-undo-click'): 'too-late', ('too-late', 'acknowledge'): 'closed', ('retry-offered', 'dismiss-error'): 'committed'}
data = json.loads(json.dumps({'deadline': 20, 'now': 5, 'applied': True, 'requests': 0})) if payload is None else {**json.loads(json.dumps({'deadline': 20, 'now': 5, 'applied': True, 'requests': 0})), **json.loads(json.dumps(payload))}
state = initial
for delivery in events:
event, event_generation = delivery[:2]
arg = delivery[2] if len(delivery) > 2 else {}
if event_generation == generation:
previous = state
data['now'] = max(data['now'], arg.get('now', data['now']))
if event in ('undo-click', 'retry-click'):
if data['now'] >= data['deadline']: event = 'window-end'
else: data['requests'] += 1
if event == 'window-end' and data['now'] < data['deadline'] and 'now' in arg: event = 'unknown-event'
state = table.get((state, event), state)
if state == 'restored': data['applied'] = False
if state == 'committed': data['applied'] = True
return {'phase': state, 'value': data[observe]} if observe else state
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('offered / undo-click', solve('offered', [('undo-click', N)], N), 'undo-pending')
check('undo-pending / undo-success', solve('undo-pending', [('undo-success', N)], N), 'restored')
check('undo-pending / undo-failure', solve('undo-pending', [('undo-failure', N)], N), 'retry-offered')
check('offered / window-end', solve('offered', [('window-end', N)], N), 'committed')
check('undo-pending / window-end', solve('undo-pending', [('window-end', N)], N), 'undo-pending')
check('retry-offered / retry-click', solve('retry-offered', [('retry-click', N)], N), 'undo-pending')
check('restored / late-window-end', solve('restored', [('late-window-end', N)], N), 'restored')
check('committed / late-undo-click', solve('committed', [('late-undo-click', N)], N), 'too-late')
check('too-late / acknowledge', solve('too-late', [('acknowledge', N)], N), 'closed')
check('retry-offered / dismiss-error', solve('retry-offered', [('dismiss-error', N)], N), 'committed')
check('older notification incarnation', solve('offered', [('undo-click', N - 1)], N), 'offered')
check('future notification incarnation', solve('offered', [('undo-click', N + 1)], N), 'offered')
check('unknown event is inert', solve('offered', [('unknown-event', N)], N), 'offered')
check('empty delivery batch', solve('offered', [], N), 'offered')
check('N stale deliveries before current delivery', solve('offered', [('undo-click', N - 1)] * N + [('undo-click', N)], N), 'undo-pending')
check('trace undo-click then undo-success', solve('offered', [('undo-click', N), ('undo-success', N)], N), 'restored')
check('trace undo-click then undo-failure', solve('offered', [('undo-click', N), ('undo-failure', N)], N), 'retry-offered')
check('trace undo-click then window-end', solve('offered', [('undo-click', N), ('window-end', N)], N), 'undo-pending')
check('trace undo-success then late-window-end', solve('undo-pending', [('undo-success', N), ('late-window-end', N)], N), 'restored')
check('trace undo-failure then retry-click', solve('undo-pending', [('undo-failure', N), ('retry-click', N)], N), 'undo-pending')
check('trace undo-failure then dismiss-error', solve('undo-pending', [('undo-failure', N), ('dismiss-error', N)], N), 'committed')
check('trace window-end then late-undo-click', solve('offered', [('window-end', N), ('late-undo-click', N)], N), 'too-late')
check('trace window-end then undo-success', solve('undo-pending', [('window-end', N), ('undo-success', N)], N), 'restored')
check('trace window-end then undo-failure', solve('undo-pending', [('window-end', N), ('undo-failure', N)], N), 'retry-offered')
check('trace window-end then window-end', solve('undo-pending', [('window-end', N), ('window-end', N)], N), 'undo-pending')
check('trace retry-click then undo-success', solve('retry-offered', [('retry-click', N), ('undo-success', N)], N), 'restored')
check('trace retry-click then undo-failure', solve('retry-offered', [('retry-click', N), ('undo-failure', N)], N), 'retry-offered')
check('trace retry-click then window-end', solve('retry-offered', [('retry-click', N), ('window-end', N)], N), 'undo-pending')
check('trace late-window-end then late-window-end', solve('restored', [('late-window-end', N), ('late-window-end', N)], N), 'restored')
check('trace late-undo-click then acknowledge', solve('committed', [('late-undo-click', N), ('acknowledge', N)], N), 'closed')
check('trace dismiss-error then late-undo-click', solve('retry-offered', [('dismiss-error', N), ('late-undo-click', N)], N), 'too-late')
check('domain state regression 1: requests', solve('offered', [('undo-click', N, {'now': 19})], N, {}, 'requests'), {'phase': 'undo-pending', 'value': 1})
check('domain state regression 2: requests', solve('offered', [('undo-click', N, {'now': 20})], N, {}, 'requests'), {'phase': 'committed', 'value': 0})
check('domain state regression 3: applied', solve('offered', [('window-end', N, {'now': 19})], N, {}, 'applied'), {'phase': 'offered', 'value': True})
check('domain state regression 4: applied', solve('undo-pending', [('undo-success', N, {})], N, {}, 'applied'), {'phase': 'restored', 'value': False})
check('domain state regression 5: requests', solve('retry-offered', [('retry-click', N, {'now': 8})], N, {'requests': 1}, 'requests'), {'phase': 'undo-pending', 'value': 2})
check('domain state regression 6: now', solve('offered', [('undo-click', N, {'now': 2})], N, {}, 'now'), {'phase': 'undo-pending', 'value': 5})
check('domain state regression 7: applied', solve('offered', [('undo-click', N, {'now': 19}), ('window-end', N, {'now': 20}), ('undo-success', N, {})], N, {}, 'applied'), {'phase': 'restored', 'value': False})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| offered / undo-click | undo-pending | undo-pending | Passed |
| undo-pending / undo-success | restored | restored | Passed |
| undo-pending / undo-failure | committed | retry-offered | Failed |
| offered / window-end | committed | committed | Passed |
| undo-pending / window-end | undo-pending | undo-pending | Passed |
| retry-offered / retry-click | undo-pending | undo-pending | Passed |
| restored / late-window-end | restored | restored | Passed |
| committed / late-undo-click | too-late | too-late | Passed |
| too-late / acknowledge | closed | closed | Passed |
| retry-offered / dismiss-error | committed | committed | Passed |
| older notification incarnation | offered | offered | Passed |
| future notification incarnation | offered | offered | Passed |
| unknown event is inert | offered | offered | Passed |
| empty delivery batch | offered | offered | Passed |
| N stale deliveries before current delivery | undo-pending | undo-pending | Passed |
| trace undo-click then undo-success | restored | restored | Passed |
| trace undo-click then undo-failure | committed | retry-offered | Failed |
| trace undo-click then window-end | undo-pending | undo-pending | Passed |
| trace undo-success then late-window-end | restored | restored | Passed |
| trace undo-failure then retry-click | committed | undo-pending | Failed |
| trace undo-failure then dismiss-error | committed | committed | Passed |
| trace window-end then late-undo-click | too-late | too-late | Passed |
| trace window-end then undo-success | restored | restored | Passed |
| trace window-end then undo-failure | committed | retry-offered | Failed |
| trace window-end then window-end | undo-pending | undo-pending | Passed |
| trace retry-click then undo-success | restored | restored | Passed |
| trace retry-click then undo-failure | committed | retry-offered | Failed |
| trace retry-click then window-end | undo-pending | undo-pending | Passed |
| trace late-window-end then late-window-end | restored | restored | Passed |
| trace late-undo-click then acknowledge | closed | closed | Passed |
| trace dismiss-error then late-undo-click | too-late | too-late | Passed |
| domain state regression 1: requests | {'phase': 'undo-pending', 'value': 1} | {'phase': 'undo-pending', 'value': 1} | Passed |
| domain state regression 2: requests | {'phase': 'committed', 'value': 0} | {'phase': 'committed', 'value': 0} | Passed |
| domain state regression 3: applied | {'phase': 'offered', 'value': True} | {'phase': 'offered', 'value': True} | Passed |
| domain state regression 4: applied | {'phase': 'restored', 'value': False} | {'phase': 'restored', 'value': False} | Passed |
| domain state regression 5: requests | {'phase': 'undo-pending', 'value': 2} | {'phase': 'undo-pending', 'value': 2} | Passed |
| domain state regression 6: now | {'phase': 'undo-pending', 'value': 5} | {'phase': 'undo-pending', 'value': 5} | Passed |
| domain state regression 7: applied | {'phase': 'restored', 'value': False} | {'phase': 'restored', 'value': False} | Passed |
SHA-256 / 09d3953273c8d655ec78ef009b9e56b428ccf4255b7c612c7108e782f5dc6472
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 38 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Stipulated single-notification state and policy model only. Event delivery and acknowledgements are explicit test inputs. No DOM, accessibility announcements, live timers, networking, actual rendering, or production-platform conformance is simulated. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:42:27.056159+00:00.
Case digest / f28bf99c14d3ef4b7b6c85acf35add309a9d36f95965552e8516ae6bd5d14ed8