{"abstract":"Matching token prefixes are reused across incompatible cache namespaces.","category":"KV cache position mapping","checks":6,"contract":"Return the common token prefix length only when cache_namespace equals request_namespace; otherwise return zero.","contract_signature":"cache_namespace, request_namespace, cached_tokens, requested_tokens","evaluation_group":"w3-kv-map-prefix-namespace","failed_approach":"Checking namespace equality but returning the shorter sequence length ignores a token mismatch inside that namespace.","family":"w3-kv-cache-position-mapping-prefix-namespace","id":"FA-98601","implementations":{"attempt":{"sha256":"36de0d8c913eb43955c0cd9fe2f0afb88f3125d2f9db4144e0e099d71b3a5978","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cache_namespace, request_namespace, cached_tokens, requested_tokens):\n    return 0 if cache_namespace!=request_namespace else min(len(cached_tokens),len(requested_tokens))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('same namespace prefix',solve('m','m',['a']*N,['a']*N+['b']),N)\ncheck('different model',solve('m1','m2',['a','b'],['a','b']),0)\ncheck('same namespace mismatch',solve('x','x',['a','b'],['a','c']),1)\ncheck('same namespace empty',solve('x','x',[],['a']),0)\ncheck('different namespace empty',solve('x','y',['a'],[]),0)\ncheck('same namespace full',solve('ad','ad',['q'],['q']),1)\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":"c0f17e5133a634fee01f91b2d7756054e6d8f16f992650969c46dfe8b7c30038","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cache_namespace, request_namespace, cached_tokens, requested_tokens):\n    return sum(a==b for a,b in zip(cached_tokens,requested_tokens))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('same namespace prefix',solve('m','m',['a']*N,['a']*N+['b']),N)\ncheck('different model',solve('m1','m2',['a','b'],['a','b']),0)\ncheck('same namespace mismatch',solve('x','x',['a','b'],['a','c']),1)\ncheck('same namespace empty',solve('x','x',[],['a']),0)\ncheck('different namespace empty',solve('x','y',['a'],[]),0)\ncheck('same namespace full',solve('ad','ad',['q'],['q']),1)\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-prefix-namespace","generated_at":"2026-09-30T16:48:14.973463+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 lookup key includes token content but omits model or adapter identity.","sha256":"26879dd220025eec4a05d22672fb0e191fc9576ee0194cabd8d05b7195affe98","title":"Prefix cache reuse crosses namespace boundaries · 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.208,"exit_code":1,"observations":[{"actual":1,"check":"same namespace prefix","expected":1,"passed":true},{"actual":0,"check":"different model","expected":0,"passed":true},{"actual":2,"check":"same namespace mismatch","expected":1,"passed":false},{"actual":0,"check":"same namespace empty","expected":0,"passed":true},{"actual":0,"check":"different namespace empty","expected":0,"passed":true},{"actual":1,"check":"same namespace full","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same namespace prefix\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"different model\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"same namespace mismatch\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"same namespace empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"different namespace empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"same namespace full\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.273,"exit_code":1,"observations":[{"actual":1,"check":"same namespace prefix","expected":1,"passed":true},{"actual":2,"check":"different model","expected":0,"passed":false},{"actual":1,"check":"same namespace mismatch","expected":1,"passed":true},{"actual":0,"check":"same namespace empty","expected":0,"passed":true},{"actual":0,"check":"different namespace empty","expected":0,"passed":true},{"actual":1,"check":"same namespace full","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same namespace prefix\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"different model\", \"actual\": 2, \"expected\": 0, \"passed\": false}, {\"check\": \"same namespace mismatch\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"same namespace empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"different namespace empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"same namespace full\", \"actual\": 1, \"expected\": 1, \"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."}}