{"abstract":"COO entries retain input order instead of row-major canonical order.","category":"Sparse tensor canonicalization","checks":6,"contract":"Return entries sorted by row then column; coordinates are unique and values are preserved.","contract_signature":"entries","evaluation_group":"w3-sparse-tensor-canonicalization-coo-sort-row-major","failed_approach":"Sorting by row alone leaves columns in arbitrary encounter order.","family":"w3-sparse-tensor-canonicalization-coo-sort-row-major","id":"FA-100446","implementations":{"attempt":{"sha256":"1d4de47caf12f908d8d40e205aa0e9b43d208a415f2d28af0f76fba60785f309","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    return sorted(entries,key=lambda e:e[0])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reverse coordinates',solve([[1,0,N],[0,2,4]]),[[0,2,4],[1,0,N]])\ncheck('column order',solve([[0,2,1],[0,1,2],[0,0,3]]),[[0,0,3],[0,1,2],[0,2,1]])\ncheck('empty',solve([]),[])\ncheck('singleton',solve([[N,1,7]]),[[N,1,7]])\ncheck('row tie',solve([[2,3,1],[2,1,5],[2,2,4]]),[[2,1,5],[2,2,4],[2,3,1]])\ncheck('already ordered',solve([[0,0,1],[1,0,2]]),[[0,0,1],[1,0,2]])\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":"ca89da1d4bbba138bbb947fded54d18db77c353b80df5b48011a1ac1eae1b3ed","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    return entries\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reverse coordinates',solve([[1,0,N],[0,2,4]]),[[0,2,4],[1,0,N]])\ncheck('column order',solve([[0,2,1],[0,1,2],[0,0,3]]),[[0,0,3],[0,1,2],[0,2,1]])\ncheck('empty',solve([]),[])\ncheck('singleton',solve([[N,1,7]]),[[N,1,7]])\ncheck('row tie',solve([[2,3,1],[2,1,5],[2,2,4]]),[[2,1,5],[2,2,4],[2,3,1]])\ncheck('already ordered',solve([[0,0,1],[1,0,2]]),[[0,0,1],[1,0,2]])\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-sort-row-major","generated_at":"2026-09-30T16:48:35.815201+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":"Input encounter order is mistaken for canonical coordinate order.","sha256":"676dfa1113b5562aafef081a7be5b641b191c171673fa67d29462b88393b0040","title":"Sparse tensor: COO entries retain input order instead of row-major canonical order · 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":28.864,"exit_code":1,"observations":[{"actual":[[0,2,4],[1,0,1]],"check":"reverse coordinates","expected":[[0,2,4],[1,0,1]],"passed":true},{"actual":[[0,2,1],[0,1,2],[0,0,3]],"check":"column order","expected":[[0,0,3],[0,1,2],[0,2,1]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[1,1,7]],"check":"singleton","expected":[[1,1,7]],"passed":true},{"actual":[[2,3,1],[2,1,5],[2,2,4]],"check":"row tie","expected":[[2,1,5],[2,2,4],[2,3,1]],"passed":false},{"actual":[[0,0,1],[1,0,2]],"check":"already ordered","expected":[[0,0,1],[1,0,2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse coordinates\", \"actual\": [[0, 2, 4], [1, 0, 1]], \"expected\": [[0, 2, 4], [1, 0, 1]], \"passed\": true}, {\"check\": \"column order\", \"actual\": [[0, 2, 1], [0, 1, 2], [0, 0, 3]], \"expected\": [[0, 0, 3], [0, 1, 2], [0, 2, 1]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [[1, 1, 7]], \"expected\": [[1, 1, 7]], \"passed\": true}, {\"check\": \"row tie\", \"actual\": [[2, 3, 1], [2, 1, 5], [2, 2, 4]], \"expected\": [[2, 1, 5], [2, 2, 4], [2, 3, 1]], \"passed\": false}, {\"check\": \"already ordered\", \"actual\": [[0, 0, 1], [1, 0, 2]], \"expected\": [[0, 0, 1], [1, 0, 2]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.746,"exit_code":1,"observations":[{"actual":[[1,0,1],[0,2,4]],"check":"reverse coordinates","expected":[[0,2,4],[1,0,1]],"passed":false},{"actual":[[0,2,1],[0,1,2],[0,0,3]],"check":"column order","expected":[[0,0,3],[0,1,2],[0,2,1]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[1,1,7]],"check":"singleton","expected":[[1,1,7]],"passed":true},{"actual":[[2,3,1],[2,1,5],[2,2,4]],"check":"row tie","expected":[[2,1,5],[2,2,4],[2,3,1]],"passed":false},{"actual":[[0,0,1],[1,0,2]],"check":"already ordered","expected":[[0,0,1],[1,0,2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse coordinates\", \"actual\": [[1, 0, 1], [0, 2, 4]], \"expected\": [[0, 2, 4], [1, 0, 1]], \"passed\": false}, {\"check\": \"column order\", \"actual\": [[0, 2, 1], [0, 1, 2], [0, 0, 3]], \"expected\": [[0, 0, 3], [0, 1, 2], [0, 2, 1]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [[1, 1, 7]], \"expected\": [[1, 1, 7]], \"passed\": true}, {\"check\": \"row tie\", \"actual\": [[2, 3, 1], [2, 1, 5], [2, 2, 4]], \"expected\": [[2, 1, 5], [2, 2, 4], [2, 3, 1]], \"passed\": false}, {\"check\": \"already ordered\", \"actual\": [[0, 0, 1], [1, 0, 2]], \"expected\": [[0, 0, 1], [1, 0, 2]], \"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."}}