{"abstract":"Eviction removes the initial sink positions along with stale middle positions.","category":"KV cache position mapping","checks":6,"contract":"Given ordered (position,value) entries, retain positions below sink_count or in the inclusive window [current-window+1,current].","contract_signature":"entries, sink_count, current_position, window","evaluation_group":"w3-kv-map-sink-window-retention","failed_approach":"Adding the sink prefix but leaving the recent suffix unbounded also admits positions beyond the current position.","family":"w3-kv-cache-position-mapping-sink-window-retention","id":"FA-98591","implementations":{"attempt":{"sha256":"18bef65e4597df97c758ae8ef1ac35337828bccc29d2ce0314d0f68181376785","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, sink_count, current_position, window):\n    return [(p,v) for p,v in entries if p<sink_count or p>=current_position-window+1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nentries=[(p,p) for p in range(N+6)]\ncheck('sink and recent',solve(entries,2,N+4,2),[(0,0),(1,1),(N+3,N+3),(N+4,N+4)])\ncheck('middle evicted',solve(entries,1,N+4,1),[(0,0),(N+4,N+4)])\ncheck('recent starts at zero',solve(entries,2,1,3),[(0,0),(1,1)])\ncheck('future clipped',solve([(0,'s'),(4,'f')],1,2,3),[(0,'s')])\ncheck('no sink',solve(entries,0,N+2,1),[(N+2,N+2)])\ncheck('empty',solve([],2,N,2),[])\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":"cc694b45c2af1dad542f3c849870c45f598b7094228e66c92964c4987049fe6c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, sink_count, current_position, window):\n    return [(p,v) for p,v in entries if p>=current_position-window+1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nentries=[(p,p) for p in range(N+6)]\ncheck('sink and recent',solve(entries,2,N+4,2),[(0,0),(1,1),(N+3,N+3),(N+4,N+4)])\ncheck('middle evicted',solve(entries,1,N+4,1),[(0,0),(N+4,N+4)])\ncheck('recent starts at zero',solve(entries,2,1,3),[(0,0),(1,1)])\ncheck('future clipped',solve([(0,'s'),(4,'f')],1,2,3),[(0,'s')])\ncheck('no sink',solve(entries,0,N+2,1),[(N+2,N+2)])\ncheck('empty',solve([],2,N,2),[])\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-sink-window-retention","generated_at":"2026-09-30T16:48:14.544863+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 retained region is modeled as one contiguous suffix.","sha256":"a81a2898a46c1e5320c7576eee51c93f2250e4799773e62fee38481281456d1c","title":"Sink tokens survive rolling-window eviction · 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":25.905,"exit_code":1,"observations":[{"actual":[[0,0],[1,1],[4,4],[5,5],[6,6]],"check":"sink and recent","expected":[[0,0],[1,1],[4,4],[5,5]],"passed":false},{"actual":[[0,0],[5,5],[6,6]],"check":"middle evicted","expected":[[0,0],[5,5]],"passed":false},{"actual":[[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]],"check":"recent starts at zero","expected":[[0,0],[1,1]],"passed":false},{"actual":[[0,"s"],[4,"f"]],"check":"future clipped","expected":[[0,"s"]],"passed":false},{"actual":[[3,3],[4,4],[5,5],[6,6]],"check":"no sink","expected":[[3,3]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"sink and recent\", \"actual\": [[0, 0], [1, 1], [4, 4], [5, 5], [6, 6]], \"expected\": [[0, 0], [1, 1], [4, 4], [5, 5]], \"passed\": false}, {\"check\": \"middle evicted\", \"actual\": [[0, 0], [5, 5], [6, 6]], \"expected\": [[0, 0], [5, 5]], \"passed\": false}, {\"check\": \"recent starts at zero\", \"actual\": [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6]], \"expected\": [[0, 0], [1, 1]], \"passed\": false}, {\"check\": \"future clipped\", \"actual\": [[0, \"s\"], [4, \"f\"]], \"expected\": [[0, \"s\"]], \"passed\": false}, {\"check\": \"no sink\", \"actual\": [[3, 3], [4, 4], [5, 5], [6, 6]], \"expected\": [[3, 3]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.159,"exit_code":1,"observations":[{"actual":[[4,4],[5,5],[6,6]],"check":"sink and recent","expected":[[0,0],[1,1],[4,4],[5,5]],"passed":false},{"actual":[[5,5],[6,6]],"check":"middle evicted","expected":[[0,0],[5,5]],"passed":false},{"actual":[[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]],"check":"recent starts at zero","expected":[[0,0],[1,1]],"passed":false},{"actual":[[0,"s"],[4,"f"]],"check":"future clipped","expected":[[0,"s"]],"passed":false},{"actual":[[3,3],[4,4],[5,5],[6,6]],"check":"no sink","expected":[[3,3]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"sink and recent\", \"actual\": [[4, 4], [5, 5], [6, 6]], \"expected\": [[0, 0], [1, 1], [4, 4], [5, 5]], \"passed\": false}, {\"check\": \"middle evicted\", \"actual\": [[5, 5], [6, 6]], \"expected\": [[0, 0], [5, 5]], \"passed\": false}, {\"check\": \"recent starts at zero\", \"actual\": [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6]], \"expected\": [[0, 0], [1, 1]], \"passed\": false}, {\"check\": \"future clipped\", \"actual\": [[0, \"s\"], [4, \"f\"]], \"expected\": [[0, \"s\"]], \"passed\": false}, {\"check\": \"no sink\", \"actual\": [[3, 3], [4, 4], [5, 5], [6, 6]], \"expected\": [[3, 3]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"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."}}