{"abstract":"squeeze removes only unit dimensions.","category":"Tensor stride and reshape semantics","checks":6,"contract":"Remove all dimensions of size one and their corresponding strides.","contract_signature":"shape, strides","evaluation_group":"tensor-squeeze-unit-axes","failed_approach":"Removing only boundary unit axes leaves interior unit dimensions behind.","family":"w3-tensor-stride-reshape-squeeze-unit-axes","id":"FA-98796","implementations":{"attempt":{"sha256":"6de6140918c3e92cb3a871f6f8a1621f06cf20b08e092a1ad1784e42e61fe279","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides):\n    lo=0; hi=len(shape)\n    if lo<hi and shape[lo]==1: lo+=1\n    if lo<hi and shape[hi-1]==1: hi-=1\n    return list(shape[lo:hi]),list(strides[lo:hi])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('interleaved units',solve([1,N+1,1,3],[99,3,88,1]),([N+1,3],[3,1]))\ncheck('no units',solve([2,3],[3,1]),([2,3],[3,1]))\ncheck('all units',solve([1,1],[8,2]),([],[]))\ncheck('rank zero',solve([],[]),([],[]))\ncheck('leading unit',solve([1,4],[4,1]),([4],[1]))\ncheck('trailing unit',solve([2,1],[1,1]),([2],[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":"8d18fb42c9a2624348c2998379cc81971dc107288ebc9dfdeef3a0762571d9f7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides):\n    return [d for d in shape if d!=1],list(strides)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('interleaved units',solve([1,N+1,1,3],[99,3,88,1]),([N+1,3],[3,1]))\ncheck('no units',solve([2,3],[3,1]),([2,3],[3,1]))\ncheck('all units',solve([1,1],[8,2]),([],[]))\ncheck('rank zero',solve([],[]),([],[]))\ncheck('leading unit',solve([1,4],[4,1]),([4],[1]))\ncheck('trailing unit',solve([2,1],[1,1]),([2],[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-squeeze-unit-axes","generated_at":"2026-09-30T16:48:16.725051+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":"Removing unit dimensions from shape without removing the corresponding stride entries breaks rank alignment.","sha256":"727525514e5e08649fdd015b24e73ba47efdb233c90534971a7515a357e64f3f","title":"Tensor views: squeeze removes only unit dimensions · 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":27.45,"exit_code":1,"observations":[{"actual":[[2,1,3],[3,88,1]],"check":"interleaved units","expected":[[2,3],[3,1]],"passed":false},{"actual":[[2,3],[3,1]],"check":"no units","expected":[[2,3],[3,1]],"passed":true},{"actual":[[],[]],"check":"all units","expected":[[],[]],"passed":true},{"actual":[[],[]],"check":"rank zero","expected":[[],[]],"passed":true},{"actual":[[4],[1]],"check":"leading unit","expected":[[4],[1]],"passed":true},{"actual":[[2],[1]],"check":"trailing unit","expected":[[2],[1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"interleaved units\", \"actual\": [[2, 1, 3], [3, 88, 1]], \"expected\": [[2, 3], [3, 1]], \"passed\": false}, {\"check\": \"no units\", \"actual\": [[2, 3], [3, 1]], \"expected\": [[2, 3], [3, 1]], \"passed\": true}, {\"check\": \"all units\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"rank zero\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"leading unit\", \"actual\": [[4], [1]], \"expected\": [[4], [1]], \"passed\": true}, {\"check\": \"trailing unit\", \"actual\": [[2], [1]], \"expected\": [[2], [1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":25.077,"exit_code":1,"observations":[{"actual":[[2,3],[99,3,88,1]],"check":"interleaved units","expected":[[2,3],[3,1]],"passed":false},{"actual":[[2,3],[3,1]],"check":"no units","expected":[[2,3],[3,1]],"passed":true},{"actual":[[],[8,2]],"check":"all units","expected":[[],[]],"passed":false},{"actual":[[],[]],"check":"rank zero","expected":[[],[]],"passed":true},{"actual":[[4],[4,1]],"check":"leading unit","expected":[[4],[1]],"passed":false},{"actual":[[2],[1,1]],"check":"trailing unit","expected":[[2],[1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"interleaved units\", \"actual\": [[2, 3], [99, 3, 88, 1]], \"expected\": [[2, 3], [3, 1]], \"passed\": false}, {\"check\": \"no units\", \"actual\": [[2, 3], [3, 1]], \"expected\": [[2, 3], [3, 1]], \"passed\": true}, {\"check\": \"all units\", \"actual\": [[], [8, 2]], \"expected\": [[], []], \"passed\": false}, {\"check\": \"rank zero\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"leading unit\", \"actual\": [[4], [4, 1]], \"expected\": [[4], [1]], \"passed\": false}, {\"check\": \"trailing unit\", \"actual\": [[2], [1, 1]], \"expected\": [[2], [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."}}