{"abstract":"logical index bounds are checked per axis.","category":"Tensor stride and reshape semantics","checks":6,"contract":"Return None if any index is outside [0,size); otherwise compute offset + dot(index,strides).","contract_signature":"shape, strides, offset, index","evaluation_group":"tensor-offset-index-bounds","failed_approach":"Rejecting negative coordinates still lets indices at or above an axis size through.","family":"w3-tensor-stride-reshape-offset-index-bounds","id":"FA-98821","implementations":{"attempt":{"sha256":"609313bedb567942f5cba8315400131d9c1deaa8a504ce5e96985b12b1f93802","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides, offset, index):\n    if any(i<0 for i in index): return None\n    return offset+sum(i*s for i,s in zip(index,strides))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('last valid',solve([2,N],[N,1],5,[1,N-1]),5+2*N-1)\ncheck('too large',solve([2,3],[3,1],0,[2,0]),None)\ncheck('negative',solve([3],[1],0,[-1]),None)\ncheck('origin',solve([2,2],[2,1],N,[0,0]),N)\ncheck('rank mismatch',solve([2,2],[2,1],0,[1]),None)\ncheck('scalar',solve([],[],7,[]),7)\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":"5c76f1c962d3829cb67e13632391d40de669bdd438922a5d5778c965f197db1b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides, offset, index):\n    return offset+sum(i*s for i,s in zip(index,strides))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('last valid',solve([2,N],[N,1],5,[1,N-1]),5+2*N-1)\ncheck('too large',solve([2,3],[3,1],0,[2,0]),None)\ncheck('negative',solve([3],[1],0,[-1]),None)\ncheck('origin',solve([2,2],[2,1],N,[0,0]),N)\ncheck('rank mismatch',solve([2,2],[2,1],0,[1]),None)\ncheck('scalar',solve([],[],7,[]),7)\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":"Self-contained integer metadata models only; no production framework compatibility or performance claim. 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-tensor-stride-reshape-offset-index-bounds","generated_at":"2026-09-30T16:48:17.165200+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Dense tensor views rely on consistent logical coordinates and physical storage addresses.","root_cause":"The address calculation accepts coordinates outside the logical shape.","sha256":"d48550621fde747dd89be05c32b5b6c565289666e5e26bad528dac2f580239ae","title":"Tensor views: logical index bounds are checked per axis · 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":26.382,"exit_code":1,"observations":[{"actual":6,"check":"last valid","expected":6,"passed":true},{"actual":6,"check":"too large","expected":null,"passed":false},{"actual":null,"check":"negative","expected":null,"passed":true},{"actual":1,"check":"origin","expected":1,"passed":true},{"actual":2,"check":"rank mismatch","expected":null,"passed":false},{"actual":7,"check":"scalar","expected":7,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"last valid\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"too large\", \"actual\": 6, \"expected\": null, \"passed\": false}, {\"check\": \"negative\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"origin\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"rank mismatch\", \"actual\": 2, \"expected\": null, \"passed\": false}, {\"check\": \"scalar\", \"actual\": 7, \"expected\": 7, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.82,"exit_code":1,"observations":[{"actual":6,"check":"last valid","expected":6,"passed":true},{"actual":6,"check":"too large","expected":null,"passed":false},{"actual":-1,"check":"negative","expected":null,"passed":false},{"actual":1,"check":"origin","expected":1,"passed":true},{"actual":2,"check":"rank mismatch","expected":null,"passed":false},{"actual":7,"check":"scalar","expected":7,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"last valid\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"too large\", \"actual\": 6, \"expected\": null, \"passed\": false}, {\"check\": \"negative\", \"actual\": -1, \"expected\": null, \"passed\": false}, {\"check\": \"origin\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"rank mismatch\", \"actual\": 2, \"expected\": null, \"passed\": false}, {\"check\": \"scalar\", \"actual\": 7, \"expected\": 7, \"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."}}