{"abstract":"columns inside each CSR row are not canonicalized.","category":"Sparse tensor canonicalization","checks":6,"contract":"Sort each CSR row by column while keeping each column paired with its original value.","contract_signature":"ptr,columns,values","evaluation_group":"w3-sparse-tensor-canonicalization-csr-column-sort","failed_approach":"The attempt computes row-local ordering but breaks the column/value association.","family":"w3-sparse-tensor-canonicalization-csr-column-sort","id":"FA-100466","implementations":{"attempt":{"sha256":"23b8a2c0b0df544a1abc2f83f123463b346aa6b966dfe073d0d03a60fa8aeaa8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ptr,columns,values):\n    outc=columns[:]; outv=values[:]\n    for r in range(len(ptr)-1):\n     pairs=sorted(zip(columns[ptr[r]:ptr[r+1]],values[ptr[r]:ptr[r+1]]))\n     outc[ptr[r]:ptr[r+1]]=[p[0] for p in pairs]\n    return [outc,outv]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('paired sort',solve([0,2],[N,1],[50,20]),[[1,N],[20,50]])\ncheck('two rows',solve([0,2,3],[2,0,1],[8,4,7]),[[0,2,1],[4,8,7]])\ncheck('empty',solve([0],[],[]),[[],[]])\ncheck('singleton row',solve([0,1],[N],[3]),[[N],[3]])\ncheck('already sorted',solve([0,2],[0,1],[5,6]),[[0,1],[5,6]])\ncheck('empty first row',solve([0,0,2],[3,1],[9,2]),[[1,3],[2,9]])\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":"007ad27bafadab2a7c41e8b6815e9a9095d3c2ac0d9290cb8c27c57beb13e79a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ptr,columns,values):\n    return [columns,values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('paired sort',solve([0,2],[N,1],[50,20]),[[1,N],[20,50]])\ncheck('two rows',solve([0,2,3],[2,0,1],[8,4,7]),[[0,2,1],[4,8,7]])\ncheck('empty',solve([0],[],[]),[[],[]])\ncheck('singleton row',solve([0,1],[N],[3]),[[N],[3]])\ncheck('already sorted',solve([0,2],[0,1],[5,6]),[[0,1],[5,6]])\ncheck('empty first row',solve([0,0,2],[3,1],[9,2]),[[1,3],[2,9]])\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-csr-column-sort","generated_at":"2026-09-30T16:48:35.815725+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":"CSR canonical form orders column indices within each row and values must follow their columns.","sha256":"676e873237880cf201c6275e219f2301f829f472aaf9d276b72d4abb7a2279c1","title":"Sparse tensor: columns inside each CSR row are not canonicalized · 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.496,"exit_code":1,"observations":[{"actual":[[1,1],[50,20]],"check":"paired sort","expected":[[1,1],[20,50]],"passed":false},{"actual":[[0,2,1],[8,4,7]],"check":"two rows","expected":[[0,2,1],[4,8,7]],"passed":false},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true},{"actual":[[1],[3]],"check":"singleton row","expected":[[1],[3]],"passed":true},{"actual":[[0,1],[5,6]],"check":"already sorted","expected":[[0,1],[5,6]],"passed":true},{"actual":[[1,3],[9,2]],"check":"empty first row","expected":[[1,3],[2,9]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"paired sort\", \"actual\": [[1, 1], [50, 20]], \"expected\": [[1, 1], [20, 50]], \"passed\": false}, {\"check\": \"two rows\", \"actual\": [[0, 2, 1], [8, 4, 7]], \"expected\": [[0, 2, 1], [4, 8, 7]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"singleton row\", \"actual\": [[1], [3]], \"expected\": [[1], [3]], \"passed\": true}, {\"check\": \"already sorted\", \"actual\": [[0, 1], [5, 6]], \"expected\": [[0, 1], [5, 6]], \"passed\": true}, {\"check\": \"empty first row\", \"actual\": [[1, 3], [9, 2]], \"expected\": [[1, 3], [2, 9]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.904,"exit_code":1,"observations":[{"actual":[[1,1],[50,20]],"check":"paired sort","expected":[[1,1],[20,50]],"passed":false},{"actual":[[2,0,1],[8,4,7]],"check":"two rows","expected":[[0,2,1],[4,8,7]],"passed":false},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true},{"actual":[[1],[3]],"check":"singleton row","expected":[[1],[3]],"passed":true},{"actual":[[0,1],[5,6]],"check":"already sorted","expected":[[0,1],[5,6]],"passed":true},{"actual":[[3,1],[9,2]],"check":"empty first row","expected":[[1,3],[2,9]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"paired sort\", \"actual\": [[1, 1], [50, 20]], \"expected\": [[1, 1], [20, 50]], \"passed\": false}, {\"check\": \"two rows\", \"actual\": [[2, 0, 1], [8, 4, 7]], \"expected\": [[0, 2, 1], [4, 8, 7]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"singleton row\", \"actual\": [[1], [3]], \"expected\": [[1], [3]], \"passed\": true}, {\"check\": \"already sorted\", \"actual\": [[0, 1], [5, 6]], \"expected\": [[0, 1], [5, 6]], \"passed\": true}, {\"check\": \"empty first row\", \"actual\": [[3, 1], [9, 2]], \"expected\": [[1, 3], [2, 9]], \"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."}}