{"abstract":"The operation returns a result or retained state that violates this contract: Expand positive integer counts in key insertion order; zero and negative counts produce no elements.","category":"Multiset accounting","checks":4,"contract":"Expand positive integer counts in key insertion order; zero and negative counts produce no elements. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-06b7656d8b531bec","failed_approach":"Sorting keys changes the expansion encounter order.","family":"xr-counter-elements-skip-zero-negative","id":"FA-4676","implementations":{"attempt":{"sha256":"b3ecd13e08c35d88a11fa156b003ba8dce91dac66e7f24c5f0cd6430d2e76d6d","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 for k,v in sorted(x.items()) for _ in range(max(0,v))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('negative omitted and insertion retained', solve({'b': 2, 'a': 1, 'c': -2, 'd': 0}), ['b', 'b', 'a'])\ncheck('zero only', solve({'a': 0}), [])\ncheck('empty', solve({}), [])\ncheck('positive singleton', solve({'a': 2}), ['a', 'a'])\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":"97a71fba558e260060b3aabdb1c3893f6c3cc44e641bf54d1d4655a82e6e9b2e","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 for k,v in x.items() for _ in range(abs(v))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('negative omitted and insertion retained', solve({'b': 2, 'a': 1, 'c': -2, 'd': 0}), ['b', 'b', 'a'])\ncheck('zero only', solve({'a': 0}), [])\ncheck('empty', solve({}), [])\ncheck('positive singleton', solve({'a': 2}), ['a', 'a'])\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":"2ffdceaa93cfae4acff0db31e3e65856dceca2805c8d27c4c2d73894f53cbd65","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 list(Counter(x).elements())\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('negative omitted and insertion retained', solve({'b': 2, 'a': 1, 'c': -2, 'd': 0}), ['b', 'b', 'a'])\ncheck('zero only', solve({'a': 0}), [])\ncheck('empty', solve({}), [])\ncheck('positive singleton', solve({'a': 2}), ['a', 'a'])\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-elements-skip-zero-negative","generated_at":"2026-09-29T14:37:41.508711+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":"Expand positive integer counts in key insertion order; zero and negative counts produce no elements.","root_cause":"Taking absolute values expands negative counts as if they were positive.","sha256":"dfacf4dcc8852c71b6fbff59c79366f1938a052d77aef33de6d1f109285286ab","title":"Counter elements skip zero negative · 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":35.439,"exit_code":1,"observations":[{"actual":["a","b","b"],"check":"negative omitted and insertion retained","expected":["b","b","a"],"passed":false},{"actual":[],"check":"zero only","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a","a"],"check":"positive singleton","expected":["a","a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"negative omitted and insertion retained\", \"actual\": [\"a\", \"b\", \"b\"], \"expected\": [\"b\", \"b\", \"a\"], \"passed\": false}, {\"check\": \"zero only\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"positive singleton\", \"actual\": [\"a\", \"a\"], \"expected\": [\"a\", \"a\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.063,"exit_code":1,"observations":[{"actual":["b","b","a","c","c"],"check":"negative omitted and insertion retained","expected":["b","b","a"],"passed":false},{"actual":[],"check":"zero only","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a","a"],"check":"positive singleton","expected":["a","a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"negative omitted and insertion retained\", \"actual\": [\"b\", \"b\", \"a\", \"c\", \"c\"], \"expected\": [\"b\", \"b\", \"a\"], \"passed\": false}, {\"check\": \"zero only\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"positive singleton\", \"actual\": [\"a\", \"a\"], \"expected\": [\"a\", \"a\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":36.883,"exit_code":0,"observations":[{"actual":["b","b","a"],"check":"negative omitted and insertion retained","expected":["b","b","a"],"passed":true},{"actual":[],"check":"zero only","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a","a"],"check":"positive singleton","expected":["a","a"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"negative omitted and insertion retained\", \"actual\": [\"b\", \"b\", \"a\"], \"expected\": [\"b\", \"b\", \"a\"], \"passed\": true}, {\"check\": \"zero only\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"positive singleton\", \"actual\": [\"a\", \"a\"], \"expected\": [\"a\", \"a\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}