{"abstract":"The operation returns a result or retained state that violates this contract: Counter intersection takes the minimum count for shared members and drops nonpositive results.","category":"Multiset accounting","checks":4,"contract":"Counter intersection takes the minimum count for shared members and drops nonpositive results. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-bf664cb86bf5fccf","failed_approach":"Set intersection loses occurrence counts by assigning one to every shared member.","family":"xr-counter-intersection-minimum-positive-count","id":"FA-4696","implementations":{"attempt":{"sha256":"eb0fdf2c59539a923056fd5d350b5ff2a48095ab1fd9d8adad2f58b3ff690db3","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 {k:1 for k in x if k in y}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('counts matter', solve({'a': 3, 'b': 1}, {'a': 2, 'c': 1}), {'a': 2})\ncheck('nonpositive omitted', solve({'a': -1}, {'a': 2}), {})\ncheck('empty right', solve({'a': 1}, {}), {})\ncheck('empty both', 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":"5de0b855a2a8466a7540df8936d513c75f0045fd285eb436aa7ad15a6ec34030","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 {k:min(v,y.get(k,0)) for k,v in x.items()}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('counts matter', solve({'a': 3, 'b': 1}, {'a': 2, 'c': 1}), {'a': 2})\ncheck('nonpositive omitted', solve({'a': -1}, {'a': 2}), {})\ncheck('empty right', solve({'a': 1}, {}), {})\ncheck('empty both', 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":"59a326a4200fa5c45dd4868c43ac0943d540c70f9aeb72e6d0378dbd951664b0","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('counts matter', solve({'a': 3, 'b': 1}, {'a': 2, 'c': 1}), {'a': 2})\ncheck('nonpositive omitted', solve({'a': -1}, {'a': 2}), {})\ncheck('empty right', solve({'a': 1}, {}), {})\ncheck('empty both', 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-intersection-minimum-positive-count","generated_at":"2026-09-29T14:37:41.865435+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 intersection takes the minimum count for shared members and drops nonpositive results.","root_cause":"Unfiltered minima retain nonpositive counts and absent members as zero.","sha256":"3df3e491c411f3ec17be8019c19062436cf9170c17a0fe035507d7248e27c46a","title":"Counter intersection minimum 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":40.082,"exit_code":1,"observations":[{"actual":{"a":1},"check":"counts matter","expected":{"a":2},"passed":false},{"actual":{"a":1},"check":"nonpositive omitted","expected":{},"passed":false},{"actual":{},"check":"empty right","expected":{},"passed":true},{"actual":{},"check":"empty both","expected":{},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"counts matter\", \"actual\": {\"a\": 1}, \"expected\": {\"a\": 2}, \"passed\": false}, {\"check\": \"nonpositive omitted\", \"actual\": {\"a\": 1}, \"expected\": {}, \"passed\": false}, {\"check\": \"empty right\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"empty both\", \"actual\": {}, \"expected\": {}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.401,"exit_code":1,"observations":[{"actual":{"a":2,"b":0},"check":"counts matter","expected":{"a":2},"passed":false},{"actual":{"a":-1},"check":"nonpositive omitted","expected":{},"passed":false},{"actual":{"a":0},"check":"empty right","expected":{},"passed":false},{"actual":{},"check":"empty both","expected":{},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"counts matter\", \"actual\": {\"a\": 2, \"b\": 0}, \"expected\": {\"a\": 2}, \"passed\": false}, {\"check\": \"nonpositive omitted\", \"actual\": {\"a\": -1}, \"expected\": {}, \"passed\": false}, {\"check\": \"empty right\", \"actual\": {\"a\": 0}, \"expected\": {}, \"passed\": false}, {\"check\": \"empty both\", \"actual\": {}, \"expected\": {}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":36.811,"exit_code":0,"observations":[{"actual":{"a":2},"check":"counts matter","expected":{"a":2},"passed":true},{"actual":{},"check":"nonpositive omitted","expected":{},"passed":true},{"actual":{},"check":"empty right","expected":{},"passed":true},{"actual":{},"check":"empty both","expected":{},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"counts matter\", \"actual\": {\"a\": 2}, \"expected\": {\"a\": 2}, \"passed\": true}, {\"check\": \"nonpositive omitted\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"empty right\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"empty both\", \"actual\": {}, \"expected\": {}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}