{"abstract":"The operation returns a result or retained state that violates this contract: Counter union takes the maximum count for each member, retaining only positive maxima.","category":"Multiset accounting","checks":4,"contract":"Counter union takes the maximum count for each member, retaining only positive maxima. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-32d1566bdcafb8dc","failed_approach":"Right-biased overwriting can decrease a count and retains nonpositive entries.","family":"xr-counter-union-maximum-positive-count","id":"FA-4701","implementations":{"attempt":{"sha256":"4bd09cd34de5cea8b2ab01c5e6c4e060c009080d5c451ef3c2268ad00b6313de","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom collections import Counter, ChainMap, deque\nimport heapq\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=dict(x); a.update(y); return a\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('maximum instead of sum or overwrite', solve({'a': 3, 'b': 1}, {'a': 2, 'c': 2}), {'a': 3, 'b': 1, 'c': 2})\ncheck('negative maxima omitted', solve({'a': -1}, {'a': -2}), {})\ncheck('zero omitted', solve({'a': 0}, {}), {})\ncheck('empty', solve({}, {}), {})\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":"76df15e14a84ebe2e66975e168c9b21143098a77919ef37d727b9e901569cf16","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom collections import Counter, ChainMap, deque\nimport heapq\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return dict(Counter(x)+Counter(y))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('maximum instead of sum or overwrite', solve({'a': 3, 'b': 1}, {'a': 2, 'c': 2}), {'a': 3, 'b': 1, 'c': 2})\ncheck('negative maxima omitted', solve({'a': -1}, {'a': -2}), {})\ncheck('zero omitted', solve({'a': 0}, {}), {})\ncheck('empty', solve({}, {}), {})\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":"35fa51540348c435c53aea1edbef4b2eca8193f7ebf4377fa312a70bba085db6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom collections import Counter, ChainMap, deque\nimport heapq\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return dict(Counter(x)|Counter(y))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('maximum instead of sum or overwrite', solve({'a': 3, 'b': 1}, {'a': 2, 'c': 2}), {'a': 3, 'b': 1, 'c': 2})\ncheck('negative maxima omitted', solve({'a': -1}, {'a': -2}), {})\ncheck('zero omitted', solve({'a': 0}, {}), {})\ncheck('empty', solve({}, {}), {})\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":"xr-counter-union-maximum-positive-count","generated_at":"2026-09-29T14:37:41.977978+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A controlled local-runtime regression for collection APIs, language semantics, or ownership wrappers. Fixtures include boundary and interaction cases.","repair":"Counter union takes the maximum count for each member, retaining only positive maxima.","root_cause":"Adding counts implements bag addition rather than maximum-count union.","sha256":"e14a9d60ad2454a63169cf859b81d5bffb29acd0fb6766303d75ddada5bed1fe","title":"Counter union maximum positive count · case 01","variant":1,"variant_policy":"Five execution reruns of a fixed adversarial fixture suite; variant number does not alter semantic inputs.","verification":{"attempt":{"elapsed_ms":39.326,"exit_code":1,"observations":[{"actual":{"a":2,"b":1,"c":2},"check":"maximum instead of sum or overwrite","expected":{"a":3,"b":1,"c":2},"passed":false},{"actual":{"a":-2},"check":"negative maxima omitted","expected":{},"passed":false},{"actual":{"a":0},"check":"zero omitted","expected":{},"passed":false},{"actual":{},"check":"empty","expected":{},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"maximum instead of sum or overwrite\", \"actual\": {\"a\": 2, \"b\": 1, \"c\": 2}, \"expected\": {\"a\": 3, \"b\": 1, \"c\": 2}, \"passed\": false}, {\"check\": \"negative maxima omitted\", \"actual\": {\"a\": -2}, \"expected\": {}, \"passed\": false}, {\"check\": \"zero omitted\", \"actual\": {\"a\": 0}, \"expected\": {}, \"passed\": false}, {\"check\": \"empty\", \"actual\": {}, \"expected\": {}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.521,"exit_code":1,"observations":[{"actual":{"a":5,"b":1,"c":2},"check":"maximum instead of sum or overwrite","expected":{"a":3,"b":1,"c":2},"passed":false},{"actual":{},"check":"negative maxima omitted","expected":{},"passed":true},{"actual":{},"check":"zero omitted","expected":{},"passed":true},{"actual":{},"check":"empty","expected":{},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"maximum instead of sum or overwrite\", \"actual\": {\"a\": 5, \"b\": 1, \"c\": 2}, \"expected\": {\"a\": 3, \"b\": 1, \"c\": 2}, \"passed\": false}, {\"check\": \"negative maxima omitted\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"zero omitted\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"empty\", \"actual\": {}, \"expected\": {}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":110.196,"exit_code":0,"observations":[{"actual":{"a":3,"b":1,"c":2},"check":"maximum instead of sum or overwrite","expected":{"a":3,"b":1,"c":2},"passed":true},{"actual":{},"check":"negative maxima omitted","expected":{},"passed":true},{"actual":{},"check":"zero omitted","expected":{},"passed":true},{"actual":{},"check":"empty","expected":{},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"maximum instead of sum or overwrite\", \"actual\": {\"a\": 3, \"b\": 1, \"c\": 2}, \"expected\": {\"a\": 3, \"b\": 1, \"c\": 2}, \"passed\": true}, {\"check\": \"negative maxima omitted\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"zero omitted\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"empty\", \"actual\": {}, \"expected\": {}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}