{"abstract":"A retry creates two slot entries for the same logical position.","category":"KV cache position mapping","checks":6,"contract":"Entries are ordered (logical_position, slot). Apply one update; replace that position in place or append if absent.","contract_signature":"entries, logical_position, new_slot","evaluation_group":"w3-kv-map-position-replacement","failed_approach":"Removing every entry that uses the destination slot can delete a different logical position instead of updating only the requested position.","family":"w3-kv-cache-position-mapping-position-replacement","id":"FA-98606","implementations":{"attempt":{"sha256":"b9da4345c0c8fbb53ea9b863137e282a6479b7223dbf8b21e0cede6b4547d5c0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, logical_position, new_slot):\n    out=[e for e in entries if e[1]!=new_slot]; out.append((logical_position,new_slot)); return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('replace middle',solve([(1,4),(2,5),(3,6)],2,9),[(1,4),(2,9),(3,6)])\ncheck('append new',solve([(1,4)],2,8),[(1,4),(2,8)])\ncheck('move to occupied slot',solve([(1,4),(2,5)],1,5),[(1,5),(2,5)])\ncheck('empty',solve([],N,7),[(N,7)])\ncheck('replace only',solve([(N,2)],N,3),[(N,3)])\ncheck('duplicate input normalized',solve([(1,4),(1,5)],1,8),[(1,8)])\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":"412cf22d10da14a1f8e734cc6d9c71f4fcbe9a25b9da4b0222b037eaefd682b8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, logical_position, new_slot):\n    return entries+[(logical_position,new_slot)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('replace middle',solve([(1,4),(2,5),(3,6)],2,9),[(1,4),(2,9),(3,6)])\ncheck('append new',solve([(1,4)],2,8),[(1,4),(2,8)])\ncheck('move to occupied slot',solve([(1,4),(2,5)],1,5),[(1,5),(2,5)])\ncheck('empty',solve([],N,7),[(N,7)])\ncheck('replace only',solve([(N,2)],N,3),[(N,3)])\ncheck('duplicate input normalized',solve([(1,4),(1,5)],1,8),[(1,8)])\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-position-replacement","generated_at":"2026-09-30T16:48:14.973507+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":"Writes append mappings without enforcing unique logical ownership.","sha256":"7fcc5efef573446e22de1b45b827b913f10909a6230f1c55341c6b4555fb6611","title":"Rewriting a logical position replaces its prior slot · 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":27.368,"exit_code":1,"observations":[{"actual":[[1,4],[2,5],[3,6],[2,9]],"check":"replace middle","expected":[[1,4],[2,9],[3,6]],"passed":false},{"actual":[[1,4],[2,8]],"check":"append new","expected":[[1,4],[2,8]],"passed":true},{"actual":[[1,4],[1,5]],"check":"move to occupied slot","expected":[[1,5],[2,5]],"passed":false},{"actual":[[1,7]],"check":"empty","expected":[[1,7]],"passed":true},{"actual":[[1,2],[1,3]],"check":"replace only","expected":[[1,3]],"passed":false},{"actual":[[1,4],[1,5],[1,8]],"check":"duplicate input normalized","expected":[[1,8]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"replace middle\", \"actual\": [[1, 4], [2, 5], [3, 6], [2, 9]], \"expected\": [[1, 4], [2, 9], [3, 6]], \"passed\": false}, {\"check\": \"append new\", \"actual\": [[1, 4], [2, 8]], \"expected\": [[1, 4], [2, 8]], \"passed\": true}, {\"check\": \"move to occupied slot\", \"actual\": [[1, 4], [1, 5]], \"expected\": [[1, 5], [2, 5]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[1, 7]], \"expected\": [[1, 7]], \"passed\": true}, {\"check\": \"replace only\", \"actual\": [[1, 2], [1, 3]], \"expected\": [[1, 3]], \"passed\": false}, {\"check\": \"duplicate input normalized\", \"actual\": [[1, 4], [1, 5], [1, 8]], \"expected\": [[1, 8]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.658,"exit_code":1,"observations":[{"actual":[[1,4],[2,5],[3,6],[2,9]],"check":"replace middle","expected":[[1,4],[2,9],[3,6]],"passed":false},{"actual":[[1,4],[2,8]],"check":"append new","expected":[[1,4],[2,8]],"passed":true},{"actual":[[1,4],[2,5],[1,5]],"check":"move to occupied slot","expected":[[1,5],[2,5]],"passed":false},{"actual":[[1,7]],"check":"empty","expected":[[1,7]],"passed":true},{"actual":[[1,2],[1,3]],"check":"replace only","expected":[[1,3]],"passed":false},{"actual":[[1,4],[1,5],[1,8]],"check":"duplicate input normalized","expected":[[1,8]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"replace middle\", \"actual\": [[1, 4], [2, 5], [3, 6], [2, 9]], \"expected\": [[1, 4], [2, 9], [3, 6]], \"passed\": false}, {\"check\": \"append new\", \"actual\": [[1, 4], [2, 8]], \"expected\": [[1, 4], [2, 8]], \"passed\": true}, {\"check\": \"move to occupied slot\", \"actual\": [[1, 4], [2, 5], [1, 5]], \"expected\": [[1, 5], [2, 5]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[1, 7]], \"expected\": [[1, 7]], \"passed\": true}, {\"check\": \"replace only\", \"actual\": [[1, 2], [1, 3]], \"expected\": [[1, 3]], \"passed\": false}, {\"check\": \"duplicate input normalized\", \"actual\": [[1, 4], [1, 5], [1, 8]], \"expected\": [[1, 8]], \"passed\": false}], \"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."}}