{"abstract":"flatten view combines adjacent strides.","category":"Tensor stride and reshape semantics","checks":6,"contract":"Flatten axes [start,end] into one dimension; merged stride is stride[end], and other strides persist.","contract_signature":"shape, strides, start, end","evaluation_group":"tensor-flatten-stride","failed_approach":"Using the last stride handles ordinary flattening but ignores whether the merged axes can be coalesced.","family":"w3-tensor-stride-reshape-flatten-stride","id":"FA-98781","implementations":{"attempt":{"sha256":"8b76aaaae4cac5260cf1a5b4a6321faf1744f6754b9c74354d2ff7aef472fe21","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides, start, end):\n    out=list(shape[:start])+[__import__(\"math\").prod(shape[start:end+1])]+list(shape[end+1:])\n    s=list(strides[:start])+[strides[start]]+list(strides[end+1:])\n    return out,s\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contiguous middle',solve([2,N,3],[N*3,3,1],1,2),([2,3*N],[N*3,1]))\ncheck('single axis',solve([2,N],[N,1],1,1),([2,N],[N,1]))\ncheck('all axes',solve([2,3,4],[12,4,1],0,2),([24],[1]))\ncheck('outer pair',solve([2,3,4],[12,4,1],0,1),([6,4],[4,1]))\ncheck('noncontiguous',solve([2,3,4],[12,1,3],1,2),([2,12],[12,3]))\ncheck('singleton stride',solve([2,1,3],[3,99,1],1,2),([2,3],[3,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":"517ffc6199942938303dce0d2af970bd532924c3d7a437d0d771adbe13c08321","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides, start, end):\n    out=list(shape[:start])+[__import__('math').prod(shape[start:end+1])]+list(shape[end+1:])\n    return out,list(strides[:start])+[strides[start]]+list(strides[end+1:])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contiguous middle',solve([2,N,3],[N*3,3,1],1,2),([2,3*N],[N*3,1]))\ncheck('single axis',solve([2,N],[N,1],1,1),([2,N],[N,1]))\ncheck('all axes',solve([2,3,4],[12,4,1],0,2),([24],[1]))\ncheck('outer pair',solve([2,3,4],[12,4,1],0,1),([6,4],[4,1]))\ncheck('noncontiguous',solve([2,3,4],[12,1,3],1,2),([2,12],[12,3]))\ncheck('singleton stride',solve([2,1,3],[3,99,1],1,2),([2,3],[3,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":"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-flatten-stride","generated_at":"2026-09-30T16:48:16.724714+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 flattened dimension keeps the first stride even when later axes determine its address step.","sha256":"e7d7f1fdabe954df5960cc0446aab493ae91e9634f30cb25e003d30f85bf3593","title":"Tensor views: flatten view combines adjacent strides · 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.032,"exit_code":1,"observations":[{"actual":[[2,3],[3,3]],"check":"contiguous middle","expected":[[2,3],[3,1]],"passed":false},{"actual":[[2,1],[1,1]],"check":"single axis","expected":[[2,1],[1,1]],"passed":true},{"actual":[[24],[12]],"check":"all axes","expected":[[24],[1]],"passed":false},{"actual":[[6,4],[12,1]],"check":"outer pair","expected":[[6,4],[4,1]],"passed":false},{"actual":[[2,12],[12,1]],"check":"noncontiguous","expected":[[2,12],[12,3]],"passed":false},{"actual":[[2,3],[3,99]],"check":"singleton stride","expected":[[2,3],[3,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contiguous middle\", \"actual\": [[2, 3], [3, 3]], \"expected\": [[2, 3], [3, 1]], \"passed\": false}, {\"check\": \"single axis\", \"actual\": [[2, 1], [1, 1]], \"expected\": [[2, 1], [1, 1]], \"passed\": true}, {\"check\": \"all axes\", \"actual\": [[24], [12]], \"expected\": [[24], [1]], \"passed\": false}, {\"check\": \"outer pair\", \"actual\": [[6, 4], [12, 1]], \"expected\": [[6, 4], [4, 1]], \"passed\": false}, {\"check\": \"noncontiguous\", \"actual\": [[2, 12], [12, 1]], \"expected\": [[2, 12], [12, 3]], \"passed\": false}, {\"check\": \"singleton stride\", \"actual\": [[2, 3], [3, 99]], \"expected\": [[2, 3], [3, 1]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.778,"exit_code":1,"observations":[{"actual":[[2,3],[3,3]],"check":"contiguous middle","expected":[[2,3],[3,1]],"passed":false},{"actual":[[2,1],[1,1]],"check":"single axis","expected":[[2,1],[1,1]],"passed":true},{"actual":[[24],[12]],"check":"all axes","expected":[[24],[1]],"passed":false},{"actual":[[6,4],[12,1]],"check":"outer pair","expected":[[6,4],[4,1]],"passed":false},{"actual":[[2,12],[12,1]],"check":"noncontiguous","expected":[[2,12],[12,3]],"passed":false},{"actual":[[2,3],[3,99]],"check":"singleton stride","expected":[[2,3],[3,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contiguous middle\", \"actual\": [[2, 3], [3, 3]], \"expected\": [[2, 3], [3, 1]], \"passed\": false}, {\"check\": \"single axis\", \"actual\": [[2, 1], [1, 1]], \"expected\": [[2, 1], [1, 1]], \"passed\": true}, {\"check\": \"all axes\", \"actual\": [[24], [12]], \"expected\": [[24], [1]], \"passed\": false}, {\"check\": \"outer pair\", \"actual\": [[6, 4], [12, 1]], \"expected\": [[6, 4], [4, 1]], \"passed\": false}, {\"check\": \"noncontiguous\", \"actual\": [[2, 12], [12, 1]], \"expected\": [[2, 12], [12, 3]], \"passed\": false}, {\"check\": \"singleton stride\", \"actual\": [[2, 3], [3, 99]], \"expected\": [[2, 3], [3, 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."}}