{"abstract":"Clear-all removes only the newest toast.","category":"Notification interfaces","checks":9,"contract":"Toast IDs deduplicate additions; equal content may belong to distinct IDs; keep newest within capacity; update/dismiss target one ID; clear removes all.","contract_signature":"items, event, ident, message, limit","evaluation_group":"xi-toast","failed_approach":"Removing only the oldest also leaves queued toasts.","family":"xi-toast-clear","id":"FA-8726","implementations":{"attempt":{"sha256":"b3eabde0a655b80b630485cc1ebba5637d461b4c397920dc66557d8b9d6b2841","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(items, event, ident, message, limit):\n    items = [dict(x) for x in items]\n    if event == 'add':\n        if any(x['id'] == ident for x in items): return items\n        items.append({'id': ident, 'message': message})\n        return items[-limit:] if limit else []\n    if event == 'update':\n        for x in items:\n            if x['id'] == ident: x['message'] = message\n    if event == 'dismiss': items = [x for x in items if x['id'] != ident]\n    if event == 'clear': items = items[1:]\n    return items\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('distinct messages equal', solve([dict(id='a',message='same')], 'add', 'b', 'same', 3), [{'id': 'a', 'message': 'same'}, {'id': 'b', 'message': 'same'}])\ncheck('retry identity', solve([dict(id='a',message='first')], 'add', 'a', 'new', 3), [{'id': 'a', 'message': 'first'}])\ncheck('capacity', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'add', 'c', 'c', 2), [{'id': 'b', 'message': 'b'}, {'id': 'c', 'message': 'c'}])\ncheck('zero', solve([], 'add', 'a', 'a', 0), [])\ncheck('update', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'update', 'a', 'new', 3), [{'id': 'a', 'message': 'new'}, {'id': 'b', 'message': 'b'}])\ncheck('dismiss', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'dismiss', 'a', None, 3), [{'id': 'b', 'message': 'b'}])\ncheck('clear', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'clear', None, None, 3), [])\ncheck('parameterized toast identity', solve([], 'add', str(N), 'message'+str(N), 2), [dict(id=str(N),message='message'+str(N))])\nfor repetition in range(N):\n    check('repeat clear', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'clear', None, None, 3), [])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"11f355d229410a3f9b99cd71ecfb98c861870afecd46c4a5ab5ecc8e6d7bae67","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(items, event, ident, message, limit):\n    items = [dict(x) for x in items]\n    if event == 'add':\n        if any(x['id'] == ident for x in items): return items\n        items.append({'id': ident, 'message': message})\n        return items[-limit:] if limit else []\n    if event == 'update':\n        for x in items:\n            if x['id'] == ident: x['message'] = message\n    if event == 'dismiss': items = [x for x in items if x['id'] != ident]\n    if event == 'clear': items = items[:-1]\n    return items\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('distinct messages equal', solve([dict(id='a',message='same')], 'add', 'b', 'same', 3), [{'id': 'a', 'message': 'same'}, {'id': 'b', 'message': 'same'}])\ncheck('retry identity', solve([dict(id='a',message='first')], 'add', 'a', 'new', 3), [{'id': 'a', 'message': 'first'}])\ncheck('capacity', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'add', 'c', 'c', 2), [{'id': 'b', 'message': 'b'}, {'id': 'c', 'message': 'c'}])\ncheck('zero', solve([], 'add', 'a', 'a', 0), [])\ncheck('update', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'update', 'a', 'new', 3), [{'id': 'a', 'message': 'new'}, {'id': 'b', 'message': 'b'}])\ncheck('dismiss', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'dismiss', 'a', None, 3), [{'id': 'b', 'message': 'b'}])\ncheck('clear', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'clear', None, None, 3), [])\ncheck('parameterized toast identity', solve([], 'add', str(N), 'message'+str(N), 2), [dict(id=str(N),message='message'+str(N))])\nfor repetition in range(N):\n    check('repeat clear', solve([dict(id='a',message='a'),dict(id='b',message='b')], 'clear', None, None, 3), [])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xi-toast-clear","generated_at":"2026-09-29T14:38:23.819316+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of toast queue lifecycle; this isolates one interface invariant without requiring a browser.","root_cause":"The clear operation uses `if event == 'clear': items = items[:-1]` where the contract requires `if event == 'clear': items = []`.","sha256":"e35f8341154e0502dac821c44e261969e0a0ce69d55873a6808578219e47e442","title":"Toast queue lifecycle: Clear-all removes only the newest toast · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.015,"exit_code":1,"observations":[{"actual":[{"id":"a","message":"same"},{"id":"b","message":"same"}],"check":"distinct messages equal","expected":[{"id":"a","message":"same"},{"id":"b","message":"same"}],"passed":true},{"actual":[{"id":"a","message":"first"}],"check":"retry identity","expected":[{"id":"a","message":"first"}],"passed":true},{"actual":[{"id":"b","message":"b"},{"id":"c","message":"c"}],"check":"capacity","expected":[{"id":"b","message":"b"},{"id":"c","message":"c"}],"passed":true},{"actual":[],"check":"zero","expected":[],"passed":true},{"actual":[{"id":"a","message":"new"},{"id":"b","message":"b"}],"check":"update","expected":[{"id":"a","message":"new"},{"id":"b","message":"b"}],"passed":true},{"actual":[{"id":"b","message":"b"}],"check":"dismiss","expected":[{"id":"b","message":"b"}],"passed":true},{"actual":[{"id":"b","message":"b"}],"check":"clear","expected":[],"passed":false},{"actual":[{"id":"1","message":"message1"}],"check":"parameterized toast identity","expected":[{"id":"1","message":"message1"}],"passed":true},{"actual":[{"id":"b","message":"b"}],"check":"repeat clear","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"distinct messages equal\", \"actual\": [{\"id\": \"a\", \"message\": \"same\"}, {\"id\": \"b\", \"message\": \"same\"}], \"expected\": [{\"id\": \"a\", \"message\": \"same\"}, {\"id\": \"b\", \"message\": \"same\"}], \"passed\": true}, {\"check\": \"retry identity\", \"actual\": [{\"id\": \"a\", \"message\": \"first\"}], \"expected\": [{\"id\": \"a\", \"message\": \"first\"}], \"passed\": true}, {\"check\": \"capacity\", \"actual\": [{\"id\": \"b\", \"message\": \"b\"}, {\"id\": \"c\", \"message\": \"c\"}], \"expected\": [{\"id\": \"b\", \"message\": \"b\"}, {\"id\": \"c\", \"message\": \"c\"}], \"passed\": true}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"update\", \"actual\": [{\"id\": \"a\", \"message\": \"new\"}, {\"id\": \"b\", \"message\": \"b\"}], \"expected\": [{\"id\": \"a\", \"message\": \"new\"}, {\"id\": \"b\", \"message\": \"b\"}], \"passed\": true}, {\"check\": \"dismiss\", \"actual\": [{\"id\": \"b\", \"message\": \"b\"}], \"expected\": [{\"id\": \"b\", \"message\": \"b\"}], \"passed\": true}, {\"check\": \"clear\", \"actual\": [{\"id\": \"b\", \"message\": \"b\"}], \"expected\": [], \"passed\": false}, {\"check\": \"parameterized toast identity\", \"actual\": [{\"id\": \"1\", \"message\": \"message1\"}], \"expected\": [{\"id\": \"1\", \"message\": \"message1\"}], \"passed\": true}, {\"check\": \"repeat clear\", \"actual\": [{\"id\": \"b\", \"message\": \"b\"}], \"expected\": [], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.516,"exit_code":1,"observations":[{"actual":[{"id":"a","message":"same"},{"id":"b","message":"same"}],"check":"distinct messages equal","expected":[{"id":"a","message":"same"},{"id":"b","message":"same"}],"passed":true},{"actual":[{"id":"a","message":"first"}],"check":"retry identity","expected":[{"id":"a","message":"first"}],"passed":true},{"actual":[{"id":"b","message":"b"},{"id":"c","message":"c"}],"check":"capacity","expected":[{"id":"b","message":"b"},{"id":"c","message":"c"}],"passed":true},{"actual":[],"check":"zero","expected":[],"passed":true},{"actual":[{"id":"a","message":"new"},{"id":"b","message":"b"}],"check":"update","expected":[{"id":"a","message":"new"},{"id":"b","message":"b"}],"passed":true},{"actual":[{"id":"b","message":"b"}],"check":"dismiss","expected":[{"id":"b","message":"b"}],"passed":true},{"actual":[{"id":"a","message":"a"}],"check":"clear","expected":[],"passed":false},{"actual":[{"id":"1","message":"message1"}],"check":"parameterized toast identity","expected":[{"id":"1","message":"message1"}],"passed":true},{"actual":[{"id":"a","message":"a"}],"check":"repeat clear","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"distinct messages equal\", \"actual\": [{\"id\": \"a\", \"message\": \"same\"}, {\"id\": \"b\", \"message\": \"same\"}], \"expected\": [{\"id\": \"a\", \"message\": \"same\"}, {\"id\": \"b\", \"message\": \"same\"}], \"passed\": true}, {\"check\": \"retry identity\", \"actual\": [{\"id\": \"a\", \"message\": \"first\"}], \"expected\": [{\"id\": \"a\", \"message\": \"first\"}], \"passed\": true}, {\"check\": \"capacity\", \"actual\": [{\"id\": \"b\", \"message\": \"b\"}, {\"id\": \"c\", \"message\": \"c\"}], \"expected\": [{\"id\": \"b\", \"message\": \"b\"}, {\"id\": \"c\", \"message\": \"c\"}], \"passed\": true}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"update\", \"actual\": [{\"id\": \"a\", \"message\": \"new\"}, {\"id\": \"b\", \"message\": \"b\"}], \"expected\": [{\"id\": \"a\", \"message\": \"new\"}, {\"id\": \"b\", \"message\": \"b\"}], \"passed\": true}, {\"check\": \"dismiss\", \"actual\": [{\"id\": \"b\", \"message\": \"b\"}], \"expected\": [{\"id\": \"b\", \"message\": \"b\"}], \"passed\": true}, {\"check\": \"clear\", \"actual\": [{\"id\": \"a\", \"message\": \"a\"}], \"expected\": [], \"passed\": false}, {\"check\": \"parameterized toast identity\", \"actual\": [{\"id\": \"1\", \"message\": \"message1\"}], \"expected\": [{\"id\": \"1\", \"message\": \"message1\"}], \"passed\": true}, {\"check\": \"repeat clear\", \"actual\": [{\"id\": \"a\", \"message\": \"a\"}], \"expected\": [], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}