{"abstract":"A replayed event increases a total that should change once per event identity.","category":"Queues","checks":3,"contract":"Deduplicate by event identity, preserving distinct events with equal amounts.","evaluation_group":"model-f4f1a054b861d854","failed_approach":"Deduplicating amounts collapses legitimate equal-valued events.","family":"idempotency","id":"FA-001","implementations":{"attempt":{"sha256":"e3474409f621b10e0fb1761e2c8f869b1e8a2e43e146dbd0f64d84eb3a30098b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    return sum(set(e['amount'] for e in events))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nevents = [{'id': 'a', 'amount': N}, {'id': 'a', 'amount': N}, {'id': 'b', 'amount': N}]\ncheck('replayed delivery', solve(events), 2*N)\ncheck('empty stream', solve([]), 0)\ncheck('distinct equal amounts', solve(events[1:]), 2*N)\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":"82649a60bba1130d37a14f4c26126733aebbb4c9098c20d5b7d4e8d09f9e1387","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    return sum(e['amount'] for e in events)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nevents = [{'id': 'a', 'amount': N}, {'id': 'a', 'amount': N}, {'id': 'b', 'amount': N}]\ncheck('replayed delivery', solve(events), 2*N)\ncheck('empty stream', solve([]), 0)\ncheck('distinct equal amounts', solve(events[1:]), 2*N)\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"},"fixed":{"sha256":"7d2776c4e9d6f8fd0de632bd6c9e76d2c12d485dcff06b679d09d240b1184898","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    return sum({e['id']: e['amount'] for e in events}.values())\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nevents = [{'id': 'a', 'amount': N}, {'id': 'a', 'amount': N}, {'id': 'b', 'amount': N}]\ncheck('replayed delivery', solve(events), 2*N)\ncheck('empty stream', solve([]), 0)\ncheck('distinct equal amounts', solve(events[1:]), 2*N)\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":"idempotency","generated_at":"2026-09-29T14:36:49.838454+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A compact reasoning and repair task with executable evidence.","repair":"Deduplicate by event identity, preserving distinct events with equal amounts.","root_cause":"Delivery identity was discarded before aggregation.","sha256":"392ecea4c3b80d482671512f7aa82cc0029e5117b51cc864c2cb16ff250f7271","title":"Duplicate delivery changes an aggregate · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":29.656,"exit_code":1,"observations":[{"actual":1,"check":"replayed delivery","expected":2,"passed":false},{"actual":0,"check":"empty stream","expected":0,"passed":true},{"actual":1,"check":"distinct equal amounts","expected":2,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"replayed delivery\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"empty stream\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"distinct equal amounts\", \"actual\": 1, \"expected\": 2, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.553,"exit_code":1,"observations":[{"actual":3,"check":"replayed delivery","expected":2,"passed":false},{"actual":0,"check":"empty stream","expected":0,"passed":true},{"actual":2,"check":"distinct equal amounts","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"replayed delivery\", \"actual\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"empty stream\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"distinct equal amounts\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":33.343,"exit_code":0,"observations":[{"actual":2,"check":"replayed delivery","expected":2,"passed":true},{"actual":0,"check":"empty stream","expected":0,"passed":true},{"actual":2,"check":"distinct equal amounts","expected":2,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"replayed delivery\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"empty stream\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"distinct equal amounts\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}