{"abstract":"A key just outside the trailing window remains in the cache.","category":"KV cache position mapping","checks":6,"contract":"Filter (position,value) entries to the inclusive trailing window ending at current_position. Window is positive.","contract_signature":"entries, current_position, window","evaluation_group":"w3-kv-map-sliding-window-eviction","failed_approach":"Using a strict comparison against current_position - window + 1 drops the oldest visible token.","family":"w3-kv-cache-position-mapping-sliding-window-eviction","id":"FA-98586","implementations":{"attempt":{"sha256":"f671702aa19f39652d5de81a86cf2017e185acc915cc9f04fc6004fdcb3ef454","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, current_position, window):\n    return [(p,v) for p,v in entries if current_position-window+1 < p <= current_position]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nentries=[(p,str(p)) for p in range(N+5)]\ncheck('inclusive lower edge',solve(entries,N+3,3),[(N+1,str(N+1)),(N+2,str(N+2)),(N+3,str(N+3))])\ncheck('window one',solve(entries,N,1),[(N,str(N))])\ncheck('future ignored',solve([(N+1,'future'),(N,'now')],N,2),[(N,'now')])\ncheck('older ignored',solve([(0,'old'),(N+2,'new')],N+2,1),[(N+2,'new')])\ncheck('empty',solve([],N,4),[])\ncheck('out of order input',solve([(N+1,'b'),(N,'a')],N+1,2),[(N+1,'b'),(N,'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":"81c3c6d384ba5b00ae8e5b3740044fab89b9faede31f99b2be49bfec4839b067","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, current_position, window):\n    return [(p,v) for p,v in entries if current_position-window <= p <= current_position]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nentries=[(p,str(p)) for p in range(N+5)]\ncheck('inclusive lower edge',solve(entries,N+3,3),[(N+1,str(N+1)),(N+2,str(N+2)),(N+3,str(N+3))])\ncheck('window one',solve(entries,N,1),[(N,str(N))])\ncheck('future ignored',solve([(N+1,'future'),(N,'now')],N,2),[(N,'now')])\ncheck('older ignored',solve([(0,'old'),(N+2,'new')],N+2,1),[(N+2,'new')])\ncheck('empty',solve([],N,4),[])\ncheck('out of order input',solve([(N+1,'b'),(N,'a')],N+1,2),[(N+1,'b'),(N,'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":"These toy integer maps omit tensor layout, concurrency, device memory, and model-specific cache formats. 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":"w3-kv-cache-position-mapping-sliding-window-eviction","generated_at":"2026-09-30T16:48:14.544827+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small in-memory model makes the cache address contract explicit for a serving component.","root_cause":"The cutoff is set to current_position - window and that boundary is included.","sha256":"ebe6bf22bcaae05fe8cb84b8135405f48b5409e411d51166cf65a82ba0bca47c","title":"Sliding eviction retains one stale position · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":26.656,"exit_code":1,"observations":[{"actual":[[3,"3"],[4,"4"]],"check":"inclusive lower edge","expected":[[2,"2"],[3,"3"],[4,"4"]],"passed":false},{"actual":[],"check":"window one","expected":[[1,"1"]],"passed":false},{"actual":[[1,"now"]],"check":"future ignored","expected":[[1,"now"]],"passed":true},{"actual":[],"check":"older ignored","expected":[[3,"new"]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[2,"b"]],"check":"out of order input","expected":[[2,"b"],[1,"a"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"inclusive lower edge\", \"actual\": [[3, \"3\"], [4, \"4\"]], \"expected\": [[2, \"2\"], [3, \"3\"], [4, \"4\"]], \"passed\": false}, {\"check\": \"window one\", \"actual\": [], \"expected\": [[1, \"1\"]], \"passed\": false}, {\"check\": \"future ignored\", \"actual\": [[1, \"now\"]], \"expected\": [[1, \"now\"]], \"passed\": true}, {\"check\": \"older ignored\", \"actual\": [], \"expected\": [[3, \"new\"]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"out of order input\", \"actual\": [[2, \"b\"]], \"expected\": [[2, \"b\"], [1, \"a\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":25.651,"exit_code":1,"observations":[{"actual":[[1,"1"],[2,"2"],[3,"3"],[4,"4"]],"check":"inclusive lower edge","expected":[[2,"2"],[3,"3"],[4,"4"]],"passed":false},{"actual":[[0,"0"],[1,"1"]],"check":"window one","expected":[[1,"1"]],"passed":false},{"actual":[[1,"now"]],"check":"future ignored","expected":[[1,"now"]],"passed":true},{"actual":[[3,"new"]],"check":"older ignored","expected":[[3,"new"]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[2,"b"],[1,"a"]],"check":"out of order input","expected":[[2,"b"],[1,"a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"inclusive lower edge\", \"actual\": [[1, \"1\"], [2, \"2\"], [3, \"3\"], [4, \"4\"]], \"expected\": [[2, \"2\"], [3, \"3\"], [4, \"4\"]], \"passed\": false}, {\"check\": \"window one\", \"actual\": [[0, \"0\"], [1, \"1\"]], \"expected\": [[1, \"1\"]], \"passed\": false}, {\"check\": \"future ignored\", \"actual\": [[1, \"now\"]], \"expected\": [[1, \"now\"]], \"passed\": true}, {\"check\": \"older ignored\", \"actual\": [[3, \"new\"]], \"expected\": [[3, \"new\"]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"out of order input\", \"actual\": [[2, \"b\"], [1, \"a\"]], \"expected\": [[2, \"b\"], [1, \"a\"]], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}