{"abstract":"broadcast aligns dimensions from the right.","category":"Tensor stride and reshape semantics","checks":6,"contract":"Return broadcasted shape for two shapes, treating missing leading dimensions as one; incompatible sizes excluded.","contract_signature":"left, right","evaluation_group":"tensor-expand-rank-alignment","failed_approach":"Padding the trailing side pairs unrelated axes when input ranks differ.","family":"w3-tensor-stride-reshape-expand-rank-alignment","id":"FA-98806","implementations":{"attempt":{"sha256":"9b272b2fece96377d16651f004f94900221707577e3c043186f203f1f71ff839","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(left, right):\n    rank=max(len(left),len(right))\n    a=list(left)+[1]*(rank-len(left)); b=list(right)+[1]*(rank-len(right))\n    return [max(x,y) for x,y in zip(a,b)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('leading rank',solve([4,1,3],[4]),[4,1,4])\ncheck('two ranks',solve([2,N],[1,N]),[2,N])\ncheck('both scalar',solve([],[]),[])\ncheck('one scalar',solve([], [N,2]),[N,2])\ncheck('single trailing',solve([1],[N]),[N])\ncheck('unit expansion',solve([2,1],[1,4]),[2,4])\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":"320db64d684dd5289059b0c4f61b697932d53cb02b57c56b9f69e8d47203203c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(left, right):\n    return [max(a,b) for a,b in zip(left,right)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('leading rank',solve([4,1,3],[4]),[4,1,4])\ncheck('two ranks',solve([2,N],[1,N]),[2,N])\ncheck('both scalar',solve([],[]),[])\ncheck('one scalar',solve([], [N,2]),[N,2])\ncheck('single trailing',solve([1],[N]),[N])\ncheck('unit expansion',solve([2,1],[1,4]),[2,4])\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-expand-rank-alignment","generated_at":"2026-09-30T16:48:17.165388+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":"Broadcast dimensions pair from the trailing axes; leading axes are implicitly size one.","sha256":"38705aa8978e19c21a10eb50f70b01f3efe8ce7c7a0967c6ef1313721569e243","title":"Tensor views: broadcast aligns dimensions from the right · 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.933,"exit_code":1,"observations":[{"actual":[4,1,3],"check":"leading rank","expected":[4,1,4],"passed":false},{"actual":[2,1],"check":"two ranks","expected":[2,1],"passed":true},{"actual":[],"check":"both scalar","expected":[],"passed":true},{"actual":[1,2],"check":"one scalar","expected":[1,2],"passed":true},{"actual":[1],"check":"single trailing","expected":[1],"passed":true},{"actual":[2,4],"check":"unit expansion","expected":[2,4],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"leading rank\", \"actual\": [4, 1, 3], \"expected\": [4, 1, 4], \"passed\": false}, {\"check\": \"two ranks\", \"actual\": [2, 1], \"expected\": [2, 1], \"passed\": true}, {\"check\": \"both scalar\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"one scalar\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"single trailing\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"unit expansion\", \"actual\": [2, 4], \"expected\": [2, 4], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.95,"exit_code":1,"observations":[{"actual":[4],"check":"leading rank","expected":[4,1,4],"passed":false},{"actual":[2,1],"check":"two ranks","expected":[2,1],"passed":true},{"actual":[],"check":"both scalar","expected":[],"passed":true},{"actual":[],"check":"one scalar","expected":[1,2],"passed":false},{"actual":[1],"check":"single trailing","expected":[1],"passed":true},{"actual":[2,4],"check":"unit expansion","expected":[2,4],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"leading rank\", \"actual\": [4], \"expected\": [4, 1, 4], \"passed\": false}, {\"check\": \"two ranks\", \"actual\": [2, 1], \"expected\": [2, 1], \"passed\": true}, {\"check\": \"both scalar\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"one scalar\", \"actual\": [], \"expected\": [1, 2], \"passed\": false}, {\"check\": \"single trailing\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"unit expansion\", \"actual\": [2, 4], \"expected\": [2, 4], \"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."}}