{"abstract":"The operation returns a result or retained state that violates this contract: Keep entries whose keys occur in the supplied allowed-key list, retaining map insertion order.","category":"Mapping semantics","checks":4,"contract":"Keep entries whose keys occur in the supplied allowed-key list, retaining map insertion order. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-079d955db70ec848","failed_approach":"Iterating the allowlist gives its order precedence over map insertion order.","family":"xr-map-filter-keys-not-values","id":"FA-4421","implementations":{"attempt":{"sha256":"73529d36ae8bf2538256002596b0a793dfae26f43b70ca38e67ba59c0a2de5d0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [[k,x[k]] for k in y if k in x]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('key differs from value', solve({'a': 'b', 'b': 'c'}, ['a']), [['a', 'b']])\ncheck('allowed order ignored', solve({'a': 1, 'b': 2}, ['b', 'a']), [['a', 1], ['b', 2]])\ncheck('empty filter', solve({'a': 1}, []), [])\ncheck('empty map', solve({}, ['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":"1dea5cb3dc4cf4ee826b8bd22ab118e95b3de30d92ed9aea6cf5b37591a0d3f4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [[k,v] for k,v in x.items() if v in y]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('key differs from value', solve({'a': 'b', 'b': 'c'}, ['a']), [['a', 'b']])\ncheck('allowed order ignored', solve({'a': 1, 'b': 2}, ['b', 'a']), [['a', 1], ['b', 2]])\ncheck('empty filter', solve({'a': 1}, []), [])\ncheck('empty map', solve({}, ['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":"7beab73bfd41f86dc767a411ddcbe3858d3b908685c30e0504debba3c7a90400","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [[k,v] for k,v in x.items() if k in y]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('key differs from value', solve({'a': 'b', 'b': 'c'}, ['a']), [['a', 'b']])\ncheck('allowed order ignored', solve({'a': 1, 'b': 2}, ['b', 'a']), [['a', 1], ['b', 2]])\ncheck('empty filter', solve({'a': 1}, []), [])\ncheck('empty map', solve({}, ['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-map-filter-keys-not-values","generated_at":"2026-09-29T14:37:39.018564+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":"Keep entries whose keys occur in the supplied allowed-key list, retaining map insertion order.","root_cause":"The predicate tests values against an allowed-key collection.","sha256":"eb4ca79ea81e641f053b44cc573ab83a58a27f0b15e807ee0a55ae90b99101d7","title":"Map filter keys not values · 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.906,"exit_code":1,"observations":[{"actual":[["a","b"]],"check":"key differs from value","expected":[["a","b"]],"passed":true},{"actual":[["b",2],["a",1]],"check":"allowed order ignored","expected":[["a",1],["b",2]],"passed":false},{"actual":[],"check":"empty filter","expected":[],"passed":true},{"actual":[],"check":"empty map","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"key differs from value\", \"actual\": [[\"a\", \"b\"]], \"expected\": [[\"a\", \"b\"]], \"passed\": true}, {\"check\": \"allowed order ignored\", \"actual\": [[\"b\", 2], [\"a\", 1]], \"expected\": [[\"a\", 1], [\"b\", 2]], \"passed\": false}, {\"check\": \"empty filter\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty map\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.147,"exit_code":1,"observations":[{"actual":[],"check":"key differs from value","expected":[["a","b"]],"passed":false},{"actual":[],"check":"allowed order ignored","expected":[["a",1],["b",2]],"passed":false},{"actual":[],"check":"empty filter","expected":[],"passed":true},{"actual":[],"check":"empty map","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"key differs from value\", \"actual\": [], \"expected\": [[\"a\", \"b\"]], \"passed\": false}, {\"check\": \"allowed order ignored\", \"actual\": [], \"expected\": [[\"a\", 1], [\"b\", 2]], \"passed\": false}, {\"check\": \"empty filter\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty map\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.055,"exit_code":0,"observations":[{"actual":[["a","b"]],"check":"key differs from value","expected":[["a","b"]],"passed":true},{"actual":[["a",1],["b",2]],"check":"allowed order ignored","expected":[["a",1],["b",2]],"passed":true},{"actual":[],"check":"empty filter","expected":[],"passed":true},{"actual":[],"check":"empty map","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"key differs from value\", \"actual\": [[\"a\", \"b\"]], \"expected\": [[\"a\", \"b\"]], \"passed\": true}, {\"check\": \"allowed order ignored\", \"actual\": [[\"a\", 1], [\"b\", 2]], \"expected\": [[\"a\", 1], [\"b\", 2]], \"passed\": true}, {\"check\": \"empty filter\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty map\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}