{"abstract":"A handle from a prior owner resolves to a newly reused slot.","category":"KV cache position mapping","checks":6,"contract":"A handle (slot,generation) is valid only when live maps slot to that generation; return its slot or -1.","contract_signature":"live_generations, handle","evaluation_group":"w3-kv-map-generation-handle-validation","failed_approach":"Checking generation alone accepts a handle whose slot number belongs to another owner.","family":"w3-kv-cache-position-mapping-generation-handle-validation","id":"FA-98631","implementations":{"attempt":{"sha256":"9db62cbf8165f742320854f14d27fa6671f3258c0601df40f5739e9f3da28a6c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(live_generations, handle):\n    return handle[0] if handle[1] in live_generations.values() else -1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nlive={2:N,5:N+1}\ncheck('current handle',solve(live,[2,N]),2)\ncheck('stale generation',solve(live,[2,N-1]),-1)\ncheck('wrong slot same generation',solve(live,[7,N]),-1)\ncheck('second live slot',solve(live,[5,N+1]),5)\ncheck('empty live table',solve({},[0,0]),-1)\ncheck('slot zero',solve({0:3},[0,3]),0)\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":"6b88644daae389aca7ff12a9367b20465f69824cfafdbb24f3ae98f631ac3d60","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(live_generations, handle):\n    return handle[0] if handle[0] in live_generations else -1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nlive={2:N,5:N+1}\ncheck('current handle',solve(live,[2,N]),2)\ncheck('stale generation',solve(live,[2,N-1]),-1)\ncheck('wrong slot same generation',solve(live,[7,N]),-1)\ncheck('second live slot',solve(live,[5,N+1]),5)\ncheck('empty live table',solve({},[0,0]),-1)\ncheck('slot zero',solve({0:3},[0,3]),0)\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-generation-handle-validation","generated_at":"2026-09-30T16:48:14.972342+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":"Slot identity is checked without validating its generation counter.","sha256":"5eecfcbca121079dad615737638561da8967c32e1a064eddcb7e49a1a4c4ab35","title":"Reused slot handles reject stale generations · 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":28.103,"exit_code":1,"observations":[{"actual":2,"check":"current handle","expected":2,"passed":true},{"actual":-1,"check":"stale generation","expected":-1,"passed":true},{"actual":7,"check":"wrong slot same generation","expected":-1,"passed":false},{"actual":5,"check":"second live slot","expected":5,"passed":true},{"actual":-1,"check":"empty live table","expected":-1,"passed":true},{"actual":0,"check":"slot zero","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"current handle\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"stale generation\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"wrong slot same generation\", \"actual\": 7, \"expected\": -1, \"passed\": false}, {\"check\": \"second live slot\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"empty live table\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"slot zero\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.082,"exit_code":1,"observations":[{"actual":2,"check":"current handle","expected":2,"passed":true},{"actual":2,"check":"stale generation","expected":-1,"passed":false},{"actual":-1,"check":"wrong slot same generation","expected":-1,"passed":true},{"actual":5,"check":"second live slot","expected":5,"passed":true},{"actual":-1,"check":"empty live table","expected":-1,"passed":true},{"actual":0,"check":"slot zero","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"current handle\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"stale generation\", \"actual\": 2, \"expected\": -1, \"passed\": false}, {\"check\": \"wrong slot same generation\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"second live slot\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"empty live table\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"slot zero\", \"actual\": 0, \"expected\": 0, \"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."}}