{"abstract":"Allocation skips reusable holes and grows the cache unnecessarily.","category":"KV cache position mapping","checks":6,"contract":"Return the lowest nonnegative integer absent from occupied_slots.","contract_signature":"occupied_slots","evaluation_group":"w3-kv-map-first-free-slot","failed_approach":"Choosing the smallest slot from the occupied set can overwrite a live entry.","family":"w3-kv-cache-position-mapping-first-free-slot","id":"FA-98611","implementations":{"attempt":{"sha256":"dec9a3672dcc96db02a9e4e2fe4748262cabe0b1a63fb6880ee90854b8af1233","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(occupied_slots):\n    return min(occupied_slots,default=0)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('hole reused',solve({0,2,3}),1)\ncheck('zero available',solve({1,2}),0)\ncheck('empty allocator',solve(set()),0)\ncheck('dense prefix',solve(set(range(N))),N)\ncheck('high sparse',solve({4,9}),0)\ncheck('nonzero hole',solve({0,1,3,4}),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":"726f3b98fac156a17a5ba627e1f6cca7e9561a87f565191a1cd84a0bb1f82e4c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(occupied_slots):\n    return max(occupied_slots,default=-1)+1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('hole reused',solve({0,2,3}),1)\ncheck('zero available',solve({1,2}),0)\ncheck('empty allocator',solve(set()),0)\ncheck('dense prefix',solve(set(range(N))),N)\ncheck('high sparse',solve({4,9}),0)\ncheck('nonzero hole',solve({0,1,3,4}),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-first-free-slot","generated_at":"2026-09-30T16:48:14.973490+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 allocator only appends after the largest occupied slot.","sha256":"368c9ce83b0f43f2ad2678a819c4bd35588a29b15500616da09eb1cbd3613db5","title":"Slot allocation uses the lowest available physical 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.509,"exit_code":1,"observations":[{"actual":0,"check":"hole reused","expected":1,"passed":false},{"actual":1,"check":"zero available","expected":0,"passed":false},{"actual":0,"check":"empty allocator","expected":0,"passed":true},{"actual":0,"check":"dense prefix","expected":1,"passed":false},{"actual":4,"check":"high sparse","expected":0,"passed":false},{"actual":0,"check":"nonzero hole","expected":2,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"hole reused\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"zero available\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"empty allocator\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"dense prefix\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"high sparse\", \"actual\": 4, \"expected\": 0, \"passed\": false}, {\"check\": \"nonzero hole\", \"actual\": 0, \"expected\": 2, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.279,"exit_code":1,"observations":[{"actual":4,"check":"hole reused","expected":1,"passed":false},{"actual":3,"check":"zero available","expected":0,"passed":false},{"actual":0,"check":"empty allocator","expected":0,"passed":true},{"actual":1,"check":"dense prefix","expected":1,"passed":true},{"actual":10,"check":"high sparse","expected":0,"passed":false},{"actual":5,"check":"nonzero hole","expected":2,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"hole reused\", \"actual\": 4, \"expected\": 1, \"passed\": false}, {\"check\": \"zero available\", \"actual\": 3, \"expected\": 0, \"passed\": false}, {\"check\": \"empty allocator\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"dense prefix\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"high sparse\", \"actual\": 10, \"expected\": 0, \"passed\": false}, {\"check\": \"nonzero hole\", \"actual\": 5, \"expected\": 2, \"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."}}