{"abstract":"A newly requested cached key is evicted before its hit updates recency.","category":"Caching","checks":4,"contract":"A nonempty full unique-key LRU list receives a read hit or miss, then a distinct incoming key. Return order after touch and one capacity-preserving insertion. Empty capacity stores nothing.","evaluation_group":"xc-lookup-touch-before-eviction","failed_approach":"Removing the hit itself keeps the cold entry and discards the hot entry.","family":"xc-lookup-touch-before-eviction","id":"FA-10421","implementations":{"attempt":{"sha256":"4f629805cb69258c200675831897401cdbb3683038809cd5e0df9974e32087d2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(order, hit, incoming):\n    return [x for x in order if x != hit]+[incoming]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*(['a', 'b'], 'a', 'c')), ['a', 'c'])\ncheck('fixture 2', solve(*(['a', 'b'], 'b', 'c')), ['b', 'c'])\ncheck('fixture 3', solve(*(['a'], 'a', 'b')), ['b'])\ncheck('fixture 4', solve(*(['a', 'b'], 'z', 'c')), ['b', 'c'])\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":"0c4c1470b2ed8ecf2f75e0544e17e736a054bc2f6c195f1aeb048b7d5bcbb277","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(order, hit, incoming):\n    return order[1:]+[incoming]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*(['a', 'b'], 'a', 'c')), ['a', 'c'])\ncheck('fixture 2', solve(*(['a', 'b'], 'b', 'c')), ['b', 'c'])\ncheck('fixture 3', solve(*(['a'], 'a', 'b')), ['b'])\ncheck('fixture 4', solve(*(['a', 'b'], 'z', 'c')), ['b', 'c'])\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":"d34b252667a69c6245f9528be36d9e25a7c8ccdbebb3d3ada5100a173e6a1390","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(order, hit, incoming):\n    updated=[x for x in order if x != hit]+[hit] if hit in order else list(order)\n    return updated[1:]+[incoming] if updated else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*(['a', 'b'], 'a', 'c')), ['a', 'c'])\ncheck('fixture 2', solve(*(['a', 'b'], 'b', 'c')), ['b', 'c'])\ncheck('fixture 3', solve(*(['a'], 'a', 'b')), ['b'])\ncheck('fixture 4', solve(*(['a', 'b'], 'z', 'c')), ['b', 'c'])\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-lookup-touch-before-eviction","generated_at":"2026-09-29T14:38:38.757618+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: A nonempty full unique-key LRU list receives a read hit or miss, then a distinct incoming key. Return order after touch and one capacity-preserving insertion. Empty capacity stores nothing.","root_cause":"The insertion evicts against stale recency that predates the immediately preceding read.","sha256":"cd4d63ed8174bf7ad33e2054e916fd6dac9f58a51594df994746a5398303bf0d","title":"A newly requested cached key is evicted before its hit updates recency · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.075,"exit_code":1,"observations":[{"actual":["b","c"],"check":"fixture 1","expected":["a","c"],"passed":false},{"actual":["a","c"],"check":"fixture 2","expected":["b","c"],"passed":false},{"actual":["b"],"check":"fixture 3","expected":["b"],"passed":true},{"actual":["a","b","c"],"check":"fixture 4","expected":["b","c"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"b\", \"c\"], \"expected\": [\"a\", \"c\"], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [\"a\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [\"b\"], \"expected\": [\"b\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.182,"exit_code":1,"observations":[{"actual":["b","c"],"check":"fixture 1","expected":["a","c"],"passed":false},{"actual":["b","c"],"check":"fixture 2","expected":["b","c"],"passed":true},{"actual":["b"],"check":"fixture 3","expected":["b"],"passed":true},{"actual":["b","c"],"check":"fixture 4","expected":["b","c"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"b\", \"c\"], \"expected\": [\"a\", \"c\"], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"b\"], \"expected\": [\"b\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.533,"exit_code":0,"observations":[{"actual":["a","c"],"check":"fixture 1","expected":["a","c"],"passed":true},{"actual":["b","c"],"check":"fixture 2","expected":["b","c"],"passed":true},{"actual":["b"],"check":"fixture 3","expected":["b"],"passed":true},{"actual":["b","c"],"check":"fixture 4","expected":["b","c"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"a\", \"c\"], \"expected\": [\"a\", \"c\"], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"b\"], \"expected\": [\"b\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}