{"abstract":"Replacing a cached value duplicates its recency entry.","category":"Caching","checks":4,"contract":"Put key at the most-recent end of a unique least-to-most-recent list, removing its previous position.","evaluation_group":"xc-lru-replacement-unique","failed_approach":"Suppressing duplicate insertion fails to promote the replaced entry.","family":"xc-lru-replacement-unique","id":"FA-10386","implementations":{"attempt":{"sha256":"4a619eceb988dd46c62ec9f395a035e6ddbd64a86a0695e4dcd1fa4f7ea66fe9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(order, key):\n    return list(order) if key in order else list(order)+[key]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*(['a', 'b'], 'a')), ['b', 'a'])\ncheck('fixture 2', solve(*(['a', 'b'], 'c')), ['a', 'b', 'c'])\ncheck('fixture 3', solve(*([], 'a')), ['a'])\ncheck('fixture 4', solve(*(['a'], '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":"4914aa90d1b2f689e87ad1f35ff8ef0205de779811211d3b8968f9719657cadc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(order, key):\n    return list(order)+[key]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*(['a', 'b'], 'a')), ['b', 'a'])\ncheck('fixture 2', solve(*(['a', 'b'], 'c')), ['a', 'b', 'c'])\ncheck('fixture 3', solve(*([], 'a')), ['a'])\ncheck('fixture 4', solve(*(['a'], '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":"f58977141e6966b255d57b80a0f411f437c779ff323f72710f2bfe88960ac07e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(order, key):\n    return [x for x in order if x != key]+[key]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*(['a', 'b'], 'a')), ['b', 'a'])\ncheck('fixture 2', solve(*(['a', 'b'], 'c')), ['a', 'b', 'c'])\ncheck('fixture 3', solve(*([], 'a')), ['a'])\ncheck('fixture 4', solve(*(['a'], '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":"xc-lru-replacement-unique","generated_at":"2026-09-29T14:38:38.605245+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: Put key at the most-recent end of a unique least-to-most-recent list, removing its previous position.","root_cause":"Replacement appends a second linked-list entry for the same cache key.","sha256":"20d10b0d85d6adce7ebd2859ea6eaa718f2df1bfc5ac1854f624dbef08d6df1d","title":"Replacing a cached value duplicates its recency entry · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.759,"exit_code":1,"observations":[{"actual":["a","b"],"check":"fixture 1","expected":["b","a"],"passed":false},{"actual":["a","b","c"],"check":"fixture 2","expected":["a","b","c"],"passed":true},{"actual":["a"],"check":"fixture 3","expected":["a"],"passed":true},{"actual":["a"],"check":"fixture 4","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"a\", \"b\"], \"expected\": [\"b\", \"a\"], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.771,"exit_code":1,"observations":[{"actual":["a","b","a"],"check":"fixture 1","expected":["b","a"],"passed":false},{"actual":["a","b","c"],"check":"fixture 2","expected":["a","b","c"],"passed":true},{"actual":["a"],"check":"fixture 3","expected":["a"],"passed":true},{"actual":["a","a"],"check":"fixture 4","expected":["a"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"a\", \"b\", \"a\"], \"expected\": [\"b\", \"a\"], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"a\", \"a\"], \"expected\": [\"a\"], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.639,"exit_code":0,"observations":[{"actual":["b","a"],"check":"fixture 1","expected":["b","a"],"passed":true},{"actual":["a","b","c"],"check":"fixture 2","expected":["a","b","c"],"passed":true},{"actual":["a"],"check":"fixture 3","expected":["a"],"passed":true},{"actual":["a"],"check":"fixture 4","expected":["a"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"b\", \"a\"], \"expected\": [\"b\", \"a\"], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}