{"abstract":"broadcast strides align with leading singleton axes.","category":"Tensor stride and reshape semantics","checks":6,"contract":"Align source strides to target rank by adding leading zero strides; expanded singleton dimensions use stride zero.","contract_signature":"shape, strides, target","evaluation_group":"tensor-broadcast-strides-align","failed_approach":"Zeroing expanded strides without first aligning ranks pairs the wrong source and target axes.","family":"w3-tensor-stride-reshape-broadcast-strides-align","id":"FA-98831","implementations":{"attempt":{"sha256":"4d5139709d8905fb383bb8a2d30fcf985d5aa7af363fa22e80740bf9eb0c419d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides, target):\n    return [s if d==t else 0 for d,s,t in zip(shape,strides,target)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('prepend batch',solve([N,3],[3,1],[2,N,3]),[0,3,1])\ncheck('expand leading singleton',solve([1,3],[3,1],[4,3]),[0,1])\ncheck('expand trailing',solve([2,1],[1,1],[2,4]),[1,0])\ncheck('unchanged',solve([2,3],[3,1],[2,3]),[3,1])\ncheck('rank one source',solve([N],[2],[4,N]),[0,2])\ncheck('multiple new axes',solve([1],[7],[2,3,1]),[0,0,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":"f35062e5b35fbfc45c272d97436f9064ca8916dd8cf579fd567d009f3a075dff","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides, target):\n    return list(strides)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('prepend batch',solve([N,3],[3,1],[2,N,3]),[0,3,1])\ncheck('expand leading singleton',solve([1,3],[3,1],[4,3]),[0,1])\ncheck('expand trailing',solve([2,1],[1,1],[2,4]),[1,0])\ncheck('unchanged',solve([2,3],[3,1],[2,3]),[3,1])\ncheck('rank one source',solve([N],[2],[4,N]),[0,2])\ncheck('multiple new axes',solve([1],[7],[2,3,1]),[0,0,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-broadcast-strides-align","generated_at":"2026-09-30T16:48:17.164556+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":"When target rank grows, source axes must align to the right after adding leading singleton axes.","sha256":"68096e97a9a5170be8298b43a45bc5a42dd811e5d4362470f565002422e0af1e","title":"Tensor views: broadcast strides align with leading singleton axes · 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.399,"exit_code":1,"observations":[{"actual":[0,0],"check":"prepend batch","expected":[0,3,1],"passed":false},{"actual":[0,1],"check":"expand leading singleton","expected":[0,1],"passed":true},{"actual":[1,0],"check":"expand trailing","expected":[1,0],"passed":true},{"actual":[3,1],"check":"unchanged","expected":[3,1],"passed":true},{"actual":[0],"check":"rank one source","expected":[0,2],"passed":false},{"actual":[0],"check":"multiple new axes","expected":[0,0,7],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"prepend batch\", \"actual\": [0, 0], \"expected\": [0, 3, 1], \"passed\": false}, {\"check\": \"expand leading singleton\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"expand trailing\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"unchanged\", \"actual\": [3, 1], \"expected\": [3, 1], \"passed\": true}, {\"check\": \"rank one source\", \"actual\": [0], \"expected\": [0, 2], \"passed\": false}, {\"check\": \"multiple new axes\", \"actual\": [0], \"expected\": [0, 0, 7], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.242,"exit_code":1,"observations":[{"actual":[3,1],"check":"prepend batch","expected":[0,3,1],"passed":false},{"actual":[3,1],"check":"expand leading singleton","expected":[0,1],"passed":false},{"actual":[1,1],"check":"expand trailing","expected":[1,0],"passed":false},{"actual":[3,1],"check":"unchanged","expected":[3,1],"passed":true},{"actual":[2],"check":"rank one source","expected":[0,2],"passed":false},{"actual":[7],"check":"multiple new axes","expected":[0,0,7],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"prepend batch\", \"actual\": [3, 1], \"expected\": [0, 3, 1], \"passed\": false}, {\"check\": \"expand leading singleton\", \"actual\": [3, 1], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"expand trailing\", \"actual\": [1, 1], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"unchanged\", \"actual\": [3, 1], \"expected\": [3, 1], \"passed\": true}, {\"check\": \"rank one source\", \"actual\": [2], \"expected\": [0, 2], \"passed\": false}, {\"check\": \"multiple new axes\", \"actual\": [7], \"expected\": [0, 0, 7], \"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."}}