{"abstract":"The operation returns a result or retained state that violates this contract: Invert the map into value-to-key-lists, preserving all keys and their insertion order.","category":"Mapping semantics","checks":4,"contract":"Invert the map into value-to-key-lists, preserving all keys and their insertion order. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","contract_signature":"x, y=None","evaluation_group":"model-2a7b941d5753568b","failed_approach":"Prepending collisions reverses their original insertion order.","family":"xr-map-invert-groups-collisions","id":"FA-4416","implementations":{"attempt":{"sha256":"968838f079b400a0604d9caed3e19cb42e5896870185b54f10a6b0f3ab58ffbf","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a={}\n    for k,v in x.items(): a.setdefault(v,[]).insert(0,k)\n    return a\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('collision preserves both', solve({'a': 'v', 'b': 'v'}), {'v': ['a', 'b']})\ncheck('distinct values', solve({'a': 'v', 'b': 'w'}), {'v': ['a'], 'w': ['b']})\ncheck('empty', solve({}), {})\ncheck('three-way collision', solve({'c': 'v', 'a': 'v', 'b': 'v'}), {'v': ['c', 'a', 'b']})\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":"0477bfc96422de804216809f48544c44334cb056232b0a14f6f7107a184fdf57","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return {v:[k] for k,v in x.items()}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('collision preserves both', solve({'a': 'v', 'b': 'v'}), {'v': ['a', 'b']})\ncheck('distinct values', solve({'a': 'v', 'b': 'w'}), {'v': ['a'], 'w': ['b']})\ncheck('empty', solve({}), {})\ncheck('three-way collision', solve({'c': 'v', 'a': 'v', 'b': 'v'}), {'v': ['c', 'a', 'b']})\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-map-invert-groups-collisions","generated_at":"2026-09-29T14:37:38.972705+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.","root_cause":"A single inverse binding overwrites earlier keys that share a value.","sha256":"4df75ee7eea5378db6492234f10952a9a75d82dc9c9477f721d7dd2f2e1fbdec","title":"Map invert groups collisions · case 01","variant":1,"variant_policy":"Five execution reruns of a fixed adversarial fixture suite; variant number does not alter semantic inputs.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.932,"exit_code":1,"observations":[{"actual":{"v":["b","a"]},"check":"collision preserves both","expected":{"v":["a","b"]},"passed":false},{"actual":{"v":["a"],"w":["b"]},"check":"distinct values","expected":{"v":["a"],"w":["b"]},"passed":true},{"actual":{},"check":"empty","expected":{},"passed":true},{"actual":{"v":["b","a","c"]},"check":"three-way collision","expected":{"v":["c","a","b"]},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"collision preserves both\", \"actual\": {\"v\": [\"b\", \"a\"]}, \"expected\": {\"v\": [\"a\", \"b\"]}, \"passed\": false}, {\"check\": \"distinct values\", \"actual\": {\"v\": [\"a\"], \"w\": [\"b\"]}, \"expected\": {\"v\": [\"a\"], \"w\": [\"b\"]}, \"passed\": true}, {\"check\": \"empty\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"three-way collision\", \"actual\": {\"v\": [\"b\", \"a\", \"c\"]}, \"expected\": {\"v\": [\"c\", \"a\", \"b\"]}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.527,"exit_code":1,"observations":[{"actual":{"v":["b"]},"check":"collision preserves both","expected":{"v":["a","b"]},"passed":false},{"actual":{"v":["a"],"w":["b"]},"check":"distinct values","expected":{"v":["a"],"w":["b"]},"passed":true},{"actual":{},"check":"empty","expected":{},"passed":true},{"actual":{"v":["b"]},"check":"three-way collision","expected":{"v":["c","a","b"]},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"collision preserves both\", \"actual\": {\"v\": [\"b\"]}, \"expected\": {\"v\": [\"a\", \"b\"]}, \"passed\": false}, {\"check\": \"distinct values\", \"actual\": {\"v\": [\"a\"], \"w\": [\"b\"]}, \"expected\": {\"v\": [\"a\"], \"w\": [\"b\"]}, \"passed\": true}, {\"check\": \"empty\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"three-way collision\", \"actual\": {\"v\": [\"b\"]}, \"expected\": {\"v\": [\"c\", \"a\", \"b\"]}, \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}