{"abstract":"transpose swaps shape but leaves coordinates unchanged.","category":"Sparse tensor canonicalization","checks":6,"contract":"Transpose COO entries by swapping each row and column coordinate, then sort row-major.","contract_signature":"entries","evaluation_group":"w3-sparse-tensor-canonicalization-coo-transpose","failed_approach":"Sorting by original row-first order after swapping can leave entries grouped by their new column, so the result is not canonical row-major order.","family":"w3-sparse-tensor-canonicalization-coo-transpose","id":"FA-100491","implementations":{"attempt":{"sha256":"eac7c40b7a4e70d6ffe41ee585e2ff2798617e273c53812a967de15aaa84b7a2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    return sorted([[c,r,v] for r,c,v in entries],key=lambda x:(x[1],x[0]))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('off diagonal',solve([[0,N+3,7],[N+1,1,3]]),[[1,N+1,3],[N+3,0,7]])\ncheck('diagonal',solve([[N,N,4]]),[[N,N,4]])\ncheck('empty',solve([]),[])\ncheck('sort after swap',solve([[2,0,1],[1,2,5],[0,1,3]]),[[0,2,1],[1,0,3],[2,1,5]])\ncheck('singleton',solve([[0,1,N]]),[[1,0,N]])\ncheck('same transposed row',solve([[0,2,1],[1,2,4]]),[[2,0,1],[2,1,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":"7e78799981f2afe75395fb4df7b1b0b9dc0298347b48109bff851097b9aa031a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    return sorted(entries)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('off diagonal',solve([[0,N+3,7],[N+1,1,3]]),[[1,N+1,3],[N+3,0,7]])\ncheck('diagonal',solve([[N,N,4]]),[[N,N,4]])\ncheck('empty',solve([]),[])\ncheck('sort after swap',solve([[2,0,1],[1,2,5],[0,1,3]]),[[0,2,1],[1,0,3],[2,1,5]])\ncheck('singleton',solve([[0,1,N]]),[[1,0,N]])\ncheck('same transposed row',solve([[0,2,1],[1,2,4]]),[[2,0,1],[2,1,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":"These are toy integer-valued COO or CSR contracts; they make no claim about a framework API, floating point policy, or large tensor performance. 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-sparse-tensor-canonicalization-coo-transpose","generated_at":"2026-09-30T16:48:36.273208+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small offline sparse-array operation has explicit coordinate and storage semantics.","root_cause":"The COO row and column labels are copied unchanged when the tensor axes are transposed.","sha256":"05e3d4ee94f7f07082f79a3e2efa7400bfa63bf3e7eb0949b930ffef7d6ac845","title":"Sparse tensor: transpose swaps shape but leaves coordinates unchanged · 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":29.03,"exit_code":1,"observations":[{"actual":[[4,0,7],[1,2,3]],"check":"off diagonal","expected":[[1,2,3],[4,0,7]],"passed":false},{"actual":[[1,1,4]],"check":"diagonal","expected":[[1,1,4]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[1,0,3],[2,1,5],[0,2,1]],"check":"sort after swap","expected":[[0,2,1],[1,0,3],[2,1,5]],"passed":false},{"actual":[[1,0,1]],"check":"singleton","expected":[[1,0,1]],"passed":true},{"actual":[[2,0,1],[2,1,4]],"check":"same transposed row","expected":[[2,0,1],[2,1,4]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"off diagonal\", \"actual\": [[4, 0, 7], [1, 2, 3]], \"expected\": [[1, 2, 3], [4, 0, 7]], \"passed\": false}, {\"check\": \"diagonal\", \"actual\": [[1, 1, 4]], \"expected\": [[1, 1, 4]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"sort after swap\", \"actual\": [[1, 0, 3], [2, 1, 5], [0, 2, 1]], \"expected\": [[0, 2, 1], [1, 0, 3], [2, 1, 5]], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [[1, 0, 1]], \"expected\": [[1, 0, 1]], \"passed\": true}, {\"check\": \"same transposed row\", \"actual\": [[2, 0, 1], [2, 1, 4]], \"expected\": [[2, 0, 1], [2, 1, 4]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.562,"exit_code":1,"observations":[{"actual":[[0,4,7],[2,1,3]],"check":"off diagonal","expected":[[1,2,3],[4,0,7]],"passed":false},{"actual":[[1,1,4]],"check":"diagonal","expected":[[1,1,4]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[0,1,3],[1,2,5],[2,0,1]],"check":"sort after swap","expected":[[0,2,1],[1,0,3],[2,1,5]],"passed":false},{"actual":[[0,1,1]],"check":"singleton","expected":[[1,0,1]],"passed":false},{"actual":[[0,2,1],[1,2,4]],"check":"same transposed row","expected":[[2,0,1],[2,1,4]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"off diagonal\", \"actual\": [[0, 4, 7], [2, 1, 3]], \"expected\": [[1, 2, 3], [4, 0, 7]], \"passed\": false}, {\"check\": \"diagonal\", \"actual\": [[1, 1, 4]], \"expected\": [[1, 1, 4]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"sort after swap\", \"actual\": [[0, 1, 3], [1, 2, 5], [2, 0, 1]], \"expected\": [[0, 2, 1], [1, 0, 3], [2, 1, 5]], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [[0, 1, 1]], \"expected\": [[1, 0, 1]], \"passed\": false}, {\"check\": \"same transposed row\", \"actual\": [[0, 2, 1], [1, 2, 4]], \"expected\": [[2, 0, 1], [2, 1, 4]], \"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."}}