{"abstract":"Position IDs include the leading pad cells.","category":"KV cache position mapping","checks":6,"contract":"For a row of booleans where true means a real token, return position IDs beginning at zero for real tokens and -1 for pads.","contract_signature":"valid","evaluation_group":"w3-kv-map-left-padding-position","failed_approach":"Subtracting padding from every physical column makes pad positions negative instead of marking them invalid.","family":"w3-kv-cache-position-mapping-left-padding-position","id":"FA-98566","implementations":{"attempt":{"sha256":"4cd69af9d7b5453487408c4f2ae4495fa80939e173c6a3dbc95f39da9b4010fa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(valid):\n    return [i-sum(not x for x in valid[:i+1]) for i in range(len(valid))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('left pad',solve([False,False,True,True]),[-1,-1,0,1])\ncheck('right pad',solve([True,True,False]),[0,1,-1])\ncheck('no padding',solve([True]*N),list(range(N)))\ncheck('all padding',solve([False]*N),[-1]*N)\ncheck('single token',solve([True]),[0])\ncheck('interior pad',solve([True,False,True]),[0,-1,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":"7242f287094ad15050b22e8ebd51ed1b2e6c4fa09966c81ee0e3af3cbc3b2f14","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(valid):\n    return [i for i,_ in enumerate(valid)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('left pad',solve([False,False,True,True]),[-1,-1,0,1])\ncheck('right pad',solve([True,True,False]),[0,1,-1])\ncheck('no padding',solve([True]*N),list(range(N)))\ncheck('all padding',solve([False]*N),[-1]*N)\ncheck('single token',solve([True]),[0])\ncheck('interior pad',solve([True,False,True]),[0,-1,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-left-padding-position","generated_at":"2026-09-30T16:48:14.544621+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 physical column number is used directly as the model position.","sha256":"5472fe8f2d5995467a28e899847ee9bb4c33923092a6c03555d5f2d7eeae5438","title":"Left padding does not consume logical positions · 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.789,"exit_code":1,"observations":[{"actual":[-1,-1,0,1],"check":"left pad","expected":[-1,-1,0,1],"passed":true},{"actual":[0,1,1],"check":"right pad","expected":[0,1,-1],"passed":false},{"actual":[0],"check":"no padding","expected":[0],"passed":true},{"actual":[-1],"check":"all padding","expected":[-1],"passed":true},{"actual":[0],"check":"single token","expected":[0],"passed":true},{"actual":[0,0,1],"check":"interior pad","expected":[0,-1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"left pad\", \"actual\": [-1, -1, 0, 1], \"expected\": [-1, -1, 0, 1], \"passed\": true}, {\"check\": \"right pad\", \"actual\": [0, 1, 1], \"expected\": [0, 1, -1], \"passed\": false}, {\"check\": \"no padding\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"all padding\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"single token\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"interior pad\", \"actual\": [0, 0, 1], \"expected\": [0, -1, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.465,"exit_code":1,"observations":[{"actual":[0,1,2,3],"check":"left pad","expected":[-1,-1,0,1],"passed":false},{"actual":[0,1,2],"check":"right pad","expected":[0,1,-1],"passed":false},{"actual":[0],"check":"no padding","expected":[0],"passed":true},{"actual":[0],"check":"all padding","expected":[-1],"passed":false},{"actual":[0],"check":"single token","expected":[0],"passed":true},{"actual":[0,1,2],"check":"interior pad","expected":[0,-1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"left pad\", \"actual\": [0, 1, 2, 3], \"expected\": [-1, -1, 0, 1], \"passed\": false}, {\"check\": \"right pad\", \"actual\": [0, 1, 2], \"expected\": [0, 1, -1], \"passed\": false}, {\"check\": \"no padding\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"all padding\", \"actual\": [0], \"expected\": [-1], \"passed\": false}, {\"check\": \"single token\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"interior pad\", \"actual\": [0, 1, 2], \"expected\": [0, -1, 1], \"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."}}