{"abstract":"The operation returns a result or retained state that violates this contract: Unary minus returns positive magnitudes of negative counts only.","category":"Multiset accounting","checks":4,"contract":"Unary minus returns positive magnitudes of negative counts only. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-80a7a22dc15644e7","failed_approach":"Absolute values incorrectly include originally positive entries.","family":"xr-counter-unary-minus-selects-negative-side","id":"FA-4691","implementations":{"attempt":{"sha256":"2e6afeaf7abb5c5bc1fa93a3277d1c89d1fa4ac3c2938bfa8d58c432da8c7592","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:abs(v) for k,v in x.items() if v!=0}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed signs', solve({'a': 2, 'b': 0, 'c': -1}), {'c': 1})\ncheck('positive omitted', solve({'a': 2}), {})\ncheck('negative becomes positive', solve({'a': -2}), {'a': 2})\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":"ac2470fa58dd03da401e45e491ebc81c6f4bfa74c22e8da9856505092ad73cbe","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:-v for k,v in x.items()}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed signs', solve({'a': 2, 'b': 0, 'c': -1}), {'c': 1})\ncheck('positive omitted', solve({'a': 2}), {})\ncheck('negative becomes positive', solve({'a': -2}), {'a': 2})\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":"31af9645fc76d8d8c3fac904290ae9b1db5f87ac6af703455ca2a6c36e6ca72c","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))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed signs', solve({'a': 2, 'b': 0, 'c': -1}), {'c': 1})\ncheck('positive omitted', solve({'a': 2}), {})\ncheck('negative becomes positive', solve({'a': -2}), {'a': 2})\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-unary-minus-selects-negative-side","generated_at":"2026-09-29T14:37:41.826752+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":"Unary minus returns positive magnitudes of negative counts only.","root_cause":"Negating every count creates negative output from originally positive entries.","sha256":"ef5b956664ff88d2b55d60f061eb34875d9a9d8d37062ec335a6a2e6afc9efa9","title":"Counter unary minus selects negative side · 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.538,"exit_code":1,"observations":[{"actual":{"a":2,"c":1},"check":"mixed signs","expected":{"c":1},"passed":false},{"actual":{"a":2},"check":"positive omitted","expected":{},"passed":false},{"actual":{"a":2},"check":"negative becomes positive","expected":{"a":2},"passed":true},{"actual":{},"check":"empty","expected":{},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed signs\", \"actual\": {\"a\": 2, \"c\": 1}, \"expected\": {\"c\": 1}, \"passed\": false}, {\"check\": \"positive omitted\", \"actual\": {\"a\": 2}, \"expected\": {}, \"passed\": false}, {\"check\": \"negative becomes positive\", \"actual\": {\"a\": 2}, \"expected\": {\"a\": 2}, \"passed\": true}, {\"check\": \"empty\", \"actual\": {}, \"expected\": {}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.24,"exit_code":1,"observations":[{"actual":{"a":-2,"b":0,"c":1},"check":"mixed signs","expected":{"c":1},"passed":false},{"actual":{"a":-2},"check":"positive omitted","expected":{},"passed":false},{"actual":{"a":2},"check":"negative becomes positive","expected":{"a":2},"passed":true},{"actual":{},"check":"empty","expected":{},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed signs\", \"actual\": {\"a\": -2, \"b\": 0, \"c\": 1}, \"expected\": {\"c\": 1}, \"passed\": false}, {\"check\": \"positive omitted\", \"actual\": {\"a\": -2}, \"expected\": {}, \"passed\": false}, {\"check\": \"negative becomes positive\", \"actual\": {\"a\": 2}, \"expected\": {\"a\": 2}, \"passed\": true}, {\"check\": \"empty\", \"actual\": {}, \"expected\": {}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.988,"exit_code":0,"observations":[{"actual":{"c":1},"check":"mixed signs","expected":{"c":1},"passed":true},{"actual":{},"check":"positive omitted","expected":{},"passed":true},{"actual":{"a":2},"check":"negative becomes positive","expected":{"a":2},"passed":true},{"actual":{},"check":"empty","expected":{},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed signs\", \"actual\": {\"c\": 1}, \"expected\": {\"c\": 1}, \"passed\": true}, {\"check\": \"positive omitted\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"negative becomes positive\", \"actual\": {\"a\": 2}, \"expected\": {\"a\": 2}, \"passed\": true}, {\"check\": \"empty\", \"actual\": {}, \"expected\": {}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}