{"abstract":"The first position beyond the requested half-open span remains in the cache.","category":"KV cache position mapping","checks":6,"contract":"Return ordered (position,value) entries in the half-open logical span [start,end).","contract_signature":"entries, start, end","evaluation_group":"w3-kv-map-truncate-position-span","failed_approach":"Making the end exclusive still drops the required entry at the inclusive start.","family":"w3-kv-cache-position-mapping-truncate-position-span","id":"FA-98621","implementations":{"attempt":{"sha256":"21db05d3a601deb155c8025be8a7c4f97fa0ec83b89d479cad69e30c1eaec7e8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, start, end):\n    return [(p,v) for p,v in entries if start<p<end]\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+4)]\ncheck('middle span',solve(entries,N,N+3),[(N,str(N)),(N+1,str(N+1)),(N+2,str(N+2))])\ncheck('empty span',solve(entries,N,N),[])\ncheck('single position',solve(entries,N,N+1),[(N,str(N))])\ncheck('before all entries',solve(entries,N+9,N+10),[])\ncheck('from zero',solve(entries,0,2),[(0,'0'),(1,'1')])\ncheck('input order kept',solve([(2,'b'),(1,'a')],1,3),[(2,'b'),(1,'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":"c3f0ac90ea4021430403c1e8097d2a7347f933c00962e86f348b46ac4ca384ae","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, start, end):\n    return [(p,v) for p,v in entries if start<=p<=end]\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+4)]\ncheck('middle span',solve(entries,N,N+3),[(N,str(N)),(N+1,str(N+1)),(N+2,str(N+2))])\ncheck('empty span',solve(entries,N,N),[])\ncheck('single position',solve(entries,N,N+1),[(N,str(N))])\ncheck('before all entries',solve(entries,N+9,N+10),[])\ncheck('from zero',solve(entries,0,2),[(0,'0'),(1,'1')])\ncheck('input order kept',solve([(2,'b'),(1,'a')],1,3),[(2,'b'),(1,'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-truncate-position-span","generated_at":"2026-09-30T16:48:14.972223+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 trimming predicate includes the end position even though the span is half-open.","sha256":"547ec490bd4cb6761ae498f39c8ee24bac7062648d4d146e5cd10f4e157e46e2","title":"Cache trimming includes the exclusive end 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.504,"exit_code":1,"observations":[{"actual":[[2,"2"],[3,"3"]],"check":"middle span","expected":[[1,"1"],[2,"2"],[3,"3"]],"passed":false},{"actual":[],"check":"empty span","expected":[],"passed":true},{"actual":[],"check":"single position","expected":[[1,"1"]],"passed":false},{"actual":[],"check":"before all entries","expected":[],"passed":true},{"actual":[[1,"1"]],"check":"from zero","expected":[[0,"0"],[1,"1"]],"passed":false},{"actual":[[2,"b"]],"check":"input order kept","expected":[[2,"b"],[1,"a"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"middle span\", \"actual\": [[2, \"2\"], [3, \"3\"]], \"expected\": [[1, \"1\"], [2, \"2\"], [3, \"3\"]], \"passed\": false}, {\"check\": \"empty span\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single position\", \"actual\": [], \"expected\": [[1, \"1\"]], \"passed\": false}, {\"check\": \"before all entries\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"from zero\", \"actual\": [[1, \"1\"]], \"expected\": [[0, \"0\"], [1, \"1\"]], \"passed\": false}, {\"check\": \"input order kept\", \"actual\": [[2, \"b\"]], \"expected\": [[2, \"b\"], [1, \"a\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.261,"exit_code":1,"observations":[{"actual":[[1,"1"],[2,"2"],[3,"3"],[4,"4"]],"check":"middle span","expected":[[1,"1"],[2,"2"],[3,"3"]],"passed":false},{"actual":[[1,"1"]],"check":"empty span","expected":[],"passed":false},{"actual":[[1,"1"],[2,"2"]],"check":"single position","expected":[[1,"1"]],"passed":false},{"actual":[],"check":"before all entries","expected":[],"passed":true},{"actual":[[0,"0"],[1,"1"],[2,"2"]],"check":"from zero","expected":[[0,"0"],[1,"1"]],"passed":false},{"actual":[[2,"b"],[1,"a"]],"check":"input order kept","expected":[[2,"b"],[1,"a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"middle span\", \"actual\": [[1, \"1\"], [2, \"2\"], [3, \"3\"], [4, \"4\"]], \"expected\": [[1, \"1\"], [2, \"2\"], [3, \"3\"]], \"passed\": false}, {\"check\": \"empty span\", \"actual\": [[1, \"1\"]], \"expected\": [], \"passed\": false}, {\"check\": \"single position\", \"actual\": [[1, \"1\"], [2, \"2\"]], \"expected\": [[1, \"1\"]], \"passed\": false}, {\"check\": \"before all entries\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"from zero\", \"actual\": [[0, \"0\"], [1, \"1\"], [2, \"2\"]], \"expected\": [[0, \"0\"], [1, \"1\"]], \"passed\": false}, {\"check\": \"input order kept\", \"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."}}