{"abstract":"LFU eviction breaks equal-frequency ties by key name.","category":"Caching","checks":4,"contract":"Entries are [key,frequency,last-access sequence]. Return the minimum (frequency,last access,key) victim, or None for an empty cache.","evaluation_group":"xc-lfu-tie-by-recency","failed_approach":"Pure LRU discards the frequency ordering instead of fixing its tie-break.","family":"xc-lfu-tie-by-recency","id":"FA-10426","implementations":{"attempt":{"sha256":"c9be40ced3987f86945c0e2b98710d615f2ddcfba063b54cc42f24c1eabbe0d2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    return min(entries,key=lambda x:x[2])[0] if entries else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*([['z', 1, 2], ['a', 1, 9]],)), 'z')\ncheck('fixture 2', solve(*([['a', 3, 1], ['b', 1, 8]],)), 'b')\ncheck('fixture 3', solve(*([['a', 1, 4]],)), 'a')\ncheck('fixture 4', solve(*([],)), 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":"3bb7c31adc34694122637e0fb1d50de266a0439e4ab034624a6846d7ac11d2bb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    return min(entries,key=lambda x:(x[1],x[0]))[0] if entries else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*([['z', 1, 2], ['a', 1, 9]],)), 'z')\ncheck('fixture 2', solve(*([['a', 3, 1], ['b', 1, 8]],)), 'b')\ncheck('fixture 3', solve(*([['a', 1, 4]],)), 'a')\ncheck('fixture 4', solve(*([],)), 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":"005aa1584f0810d0c1e1e5bf46ebb77b0e8fb3b1469588653cdf2997aa20c678","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    return min(entries,key=lambda x:(x[1],x[2],x[0]))[0] if entries else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*([['z', 1, 2], ['a', 1, 9]],)), 'z')\ncheck('fixture 2', solve(*([['a', 3, 1], ['b', 1, 8]],)), 'b')\ncheck('fixture 3', solve(*([['a', 1, 4]],)), 'a')\ncheck('fixture 4', solve(*([],)), 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-lfu-tie-by-recency","generated_at":"2026-09-29T14:38:38.881054+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: Entries are [key,frequency,last-access sequence]. Return the minimum (frequency,last access,key) victim, or None for an empty cache.","root_cause":"Lexical identity replaces the least-recent access timestamp for frequency ties.","sha256":"3bb0a2e653ad98fbd0a269763bd8f10ac60f62b5cc89f21429c45769a8351835","title":"LFU eviction breaks equal-frequency ties by key name · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.61,"exit_code":1,"observations":[{"actual":"z","check":"fixture 1","expected":"z","passed":true},{"actual":"a","check":"fixture 2","expected":"b","passed":false},{"actual":"a","check":"fixture 3","expected":"a","passed":true},{"actual":null,"check":"fixture 4","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": \"z\", \"expected\": \"z\", \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.883,"exit_code":1,"observations":[{"actual":"a","check":"fixture 1","expected":"z","passed":false},{"actual":"b","check":"fixture 2","expected":"b","passed":true},{"actual":"a","check":"fixture 3","expected":"a","passed":true},{"actual":null,"check":"fixture 4","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": \"a\", \"expected\": \"z\", \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.314,"exit_code":0,"observations":[{"actual":"z","check":"fixture 1","expected":"z","passed":true},{"actual":"b","check":"fixture 2","expected":"b","passed":true},{"actual":"a","check":"fixture 3","expected":"a","passed":true},{"actual":null,"check":"fixture 4","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": \"z\", \"expected\": \"z\", \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}