{"abstract":"Batch cache retrieval loses request order and duplicate positions.","category":"Caching","checks":4,"contract":"Return one [key,hit-or-miss,value-or-None] result for every requested key in original order, including repeated keys and cached negative values.","evaluation_group":"xc-batch-get-position","failed_approach":"Deduplicating request keys still collapses independent output slots and omits misses.","family":"xc-batch-get-position","id":"FA-10521","implementations":{"attempt":{"sha256":"cffd40162c9f228cee0f845c70f3b262d4ac78ac721af7324c63b32d1c75057a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cache, keys):\n    return [[k,\"hit\",cache[k]] if k in cache else [k,\"miss\",None] for k in dict.fromkeys(keys)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*({'a': 1, 'b': 2}, ['b', 'a', 'b'])), [['b', 'hit', 2], ['a', 'hit', 1], ['b', 'hit', 2]])\ncheck('fixture 2', solve(*({'a': None}, ['a', 'z'])), [['a', 'hit', None], ['z', 'miss', None]])\ncheck('fixture 3', solve(*({}, [])), [])\ncheck('fixture 4', solve(*({}, ['a'])), [['a', 'miss', None]])\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":"49f8811356e6aefcfcc7157b717271492687225001a8d0144630084eaaeb2334","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cache, keys):\n    return [[k,\"hit\",cache[k]] for k in cache if k in keys]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*({'a': 1, 'b': 2}, ['b', 'a', 'b'])), [['b', 'hit', 2], ['a', 'hit', 1], ['b', 'hit', 2]])\ncheck('fixture 2', solve(*({'a': None}, ['a', 'z'])), [['a', 'hit', None], ['z', 'miss', None]])\ncheck('fixture 3', solve(*({}, [])), [])\ncheck('fixture 4', solve(*({}, ['a'])), [['a', 'miss', None]])\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":"5a46395513c048ae8a3b0fb10b9da3e5c5b759745d6e0e1a83dfbd60d614fae8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cache, keys):\n    return [[k,'hit',cache[k]] if k in cache else [k,'miss',None] for k in keys]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*({'a': 1, 'b': 2}, ['b', 'a', 'b'])), [['b', 'hit', 2], ['a', 'hit', 1], ['b', 'hit', 2]])\ncheck('fixture 2', solve(*({'a': None}, ['a', 'z'])), [['a', 'hit', None], ['z', 'miss', None]])\ncheck('fixture 3', solve(*({}, [])), [])\ncheck('fixture 4', solve(*({}, ['a'])), [['a', 'miss', None]])\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":"xc-batch-get-position","generated_at":"2026-09-29T14:38:39.786843+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic cache state transformation. Inputs are copied or treated as immutable; no remote storage, real clock, or concurrent interleaving is simulated.","repair":"Preserve the cache-state invariant: Return one [key,hit-or-miss,value-or-None] result for every requested key in original order, including repeated keys and cached negative values.","root_cause":"Iterating the cache map loses request positions, duplicate requests and misses.","sha256":"edce8176f9ff9804912f317ec2b277c4d5d47ebe6adcdfca37f62a3a459cafef","title":"Batch cache retrieval loses request order and duplicate positions · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.143,"exit_code":1,"observations":[{"actual":[["b","hit",2],["a","hit",1]],"check":"fixture 1","expected":[["b","hit",2],["a","hit",1],["b","hit",2]],"passed":false},{"actual":[["a","hit",null],["z","miss",null]],"check":"fixture 2","expected":[["a","hit",null],["z","miss",null]],"passed":true},{"actual":[],"check":"fixture 3","expected":[],"passed":true},{"actual":[["a","miss",null]],"check":"fixture 4","expected":[["a","miss",null]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"b\", \"hit\", 2], [\"a\", \"hit\", 1]], \"expected\": [[\"b\", \"hit\", 2], [\"a\", \"hit\", 1], [\"b\", \"hit\", 2]], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"hit\", null], [\"z\", \"miss\", null]], \"expected\": [[\"a\", \"hit\", null], [\"z\", \"miss\", null]], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"a\", \"miss\", null]], \"expected\": [[\"a\", \"miss\", null]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.334,"exit_code":1,"observations":[{"actual":[["a","hit",1],["b","hit",2]],"check":"fixture 1","expected":[["b","hit",2],["a","hit",1],["b","hit",2]],"passed":false},{"actual":[["a","hit",null]],"check":"fixture 2","expected":[["a","hit",null],["z","miss",null]],"passed":false},{"actual":[],"check":"fixture 3","expected":[],"passed":true},{"actual":[],"check":"fixture 4","expected":[["a","miss",null]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"a\", \"hit\", 1], [\"b\", \"hit\", 2]], \"expected\": [[\"b\", \"hit\", 2], [\"a\", \"hit\", 1], [\"b\", \"hit\", 2]], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"hit\", null]], \"expected\": [[\"a\", \"hit\", null], [\"z\", \"miss\", null]], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [], \"expected\": [[\"a\", \"miss\", null]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.386,"exit_code":0,"observations":[{"actual":[["b","hit",2],["a","hit",1],["b","hit",2]],"check":"fixture 1","expected":[["b","hit",2],["a","hit",1],["b","hit",2]],"passed":true},{"actual":[["a","hit",null],["z","miss",null]],"check":"fixture 2","expected":[["a","hit",null],["z","miss",null]],"passed":true},{"actual":[],"check":"fixture 3","expected":[],"passed":true},{"actual":[["a","miss",null]],"check":"fixture 4","expected":[["a","miss",null]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"b\", \"hit\", 2], [\"a\", \"hit\", 1], [\"b\", \"hit\", 2]], \"expected\": [[\"b\", \"hit\", 2], [\"a\", \"hit\", 1], [\"b\", \"hit\", 2]], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"hit\", null], [\"z\", \"miss\", null]], \"expected\": [[\"a\", \"hit\", null], [\"z\", \"miss\", null]], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"a\", \"miss\", null]], \"expected\": [[\"a\", \"miss\", null]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}