{"abstract":"duplicate CSR columns are retained as separate coordinates.","category":"Sparse tensor canonicalization","checks":6,"contract":"Within each row, sum equal columns, omit zero totals, and return canonical CSR [row_ptr,columns,values].","contract_signature":"ptr,columns,values","evaluation_group":"w3-sparse-tensor-canonicalization-csr-coalesce-row","failed_approach":"Overwrite order still discards all but one duplicate contribution.","family":"w3-sparse-tensor-canonicalization-csr-coalesce-row","id":"FA-100471","implementations":{"attempt":{"sha256":"f538104b4501b921bac99fffa2bb7151b38d57c8e22f9cf4af8e3834b7c86d67","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ptr,columns,values):\n    outp=[0]; outc=[]; outv=[]\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     for c,v in pairs:\n      if not outc or outp[-1]==len(outc) or outc[-1]!=c: outc.append(c); outv.append(v)\n      else: outv[-1]=v\n     outp.append(len(outc))\n    return [outp,outc,outv]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('duplicates',solve([0,3],[1,1,0],[N,2,4]),[[0,2],[0,1],[4,N+2]])\ncheck('rows isolated',solve([0,2,4],[0,0,0,0],[1,2,3,4]),[[0,1,2],[0,0],[3,7]])\ncheck('empty',solve([0],[],[]),[[0],[],[]])\ncheck('single',solve([0,1],[N],[6]),[[0,1],[N],[6]])\ncheck('cancellation',solve([0,2],[0,0],[N,-N]),[[0,0],[],[]])\ncheck('unsorted unique',solve([0,2],[2,0],[5,3]),[[0,2],[0,2],[3,5]])\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":"0bfa57a57faf4c09ead5b54ba57a437fa0b1a10d9e0d00295380400d1f36c63a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ptr,columns,values):\n    return [ptr,columns,values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('duplicates',solve([0,3],[1,1,0],[N,2,4]),[[0,2],[0,1],[4,N+2]])\ncheck('rows isolated',solve([0,2,4],[0,0,0,0],[1,2,3,4]),[[0,1,2],[0,0],[3,7]])\ncheck('empty',solve([0],[],[]),[[0],[],[]])\ncheck('single',solve([0,1],[N],[6]),[[0,1],[N],[6]])\ncheck('cancellation',solve([0,2],[0,0],[N,-N]),[[0,0],[],[]])\ncheck('unsorted unique',solve([0,2],[2,0],[5,3]),[[0,2],[0,2],[3,5]])\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-coalesce-row","generated_at":"2026-09-30T16:48:35.815395+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 rows can contain duplicate column coordinates whose values contribute to one logical cell.","sha256":"b2945245e97809e6c83a209b6407485edbbd0331c1c04b9fdce23c053e31a53e","title":"Sparse tensor: duplicate CSR columns are retained as separate coordinates · 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.106,"exit_code":1,"observations":[{"actual":[[0,2],[0,1],[4,2]],"check":"duplicates","expected":[[0,2],[0,1],[4,3]],"passed":false},{"actual":[[0,1,2],[0,0],[2,4]],"check":"rows isolated","expected":[[0,1,2],[0,0],[3,7]],"passed":false},{"actual":[[0],[],[]],"check":"empty","expected":[[0],[],[]],"passed":true},{"actual":[[0,1],[1],[6]],"check":"single","expected":[[0,1],[1],[6]],"passed":true},{"actual":[[0,1],[0],[1]],"check":"cancellation","expected":[[0,0],[],[]],"passed":false},{"actual":[[0,2],[0,2],[3,5]],"check":"unsorted unique","expected":[[0,2],[0,2],[3,5]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicates\", \"actual\": [[0, 2], [0, 1], [4, 2]], \"expected\": [[0, 2], [0, 1], [4, 3]], \"passed\": false}, {\"check\": \"rows isolated\", \"actual\": [[0, 1, 2], [0, 0], [2, 4]], \"expected\": [[0, 1, 2], [0, 0], [3, 7]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[0], [], []], \"expected\": [[0], [], []], \"passed\": true}, {\"check\": \"single\", \"actual\": [[0, 1], [1], [6]], \"expected\": [[0, 1], [1], [6]], \"passed\": true}, {\"check\": \"cancellation\", \"actual\": [[0, 1], [0], [1]], \"expected\": [[0, 0], [], []], \"passed\": false}, {\"check\": \"unsorted unique\", \"actual\": [[0, 2], [0, 2], [3, 5]], \"expected\": [[0, 2], [0, 2], [3, 5]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.62,"exit_code":1,"observations":[{"actual":[[0,3],[1,1,0],[1,2,4]],"check":"duplicates","expected":[[0,2],[0,1],[4,3]],"passed":false},{"actual":[[0,2,4],[0,0,0,0],[1,2,3,4]],"check":"rows isolated","expected":[[0,1,2],[0,0],[3,7]],"passed":false},{"actual":[[0],[],[]],"check":"empty","expected":[[0],[],[]],"passed":true},{"actual":[[0,1],[1],[6]],"check":"single","expected":[[0,1],[1],[6]],"passed":true},{"actual":[[0,2],[0,0],[1,-1]],"check":"cancellation","expected":[[0,0],[],[]],"passed":false},{"actual":[[0,2],[2,0],[5,3]],"check":"unsorted unique","expected":[[0,2],[0,2],[3,5]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicates\", \"actual\": [[0, 3], [1, 1, 0], [1, 2, 4]], \"expected\": [[0, 2], [0, 1], [4, 3]], \"passed\": false}, {\"check\": \"rows isolated\", \"actual\": [[0, 2, 4], [0, 0, 0, 0], [1, 2, 3, 4]], \"expected\": [[0, 1, 2], [0, 0], [3, 7]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[0], [], []], \"expected\": [[0], [], []], \"passed\": true}, {\"check\": \"single\", \"actual\": [[0, 1], [1], [6]], \"expected\": [[0, 1], [1], [6]], \"passed\": true}, {\"check\": \"cancellation\", \"actual\": [[0, 2], [0, 0], [1, -1]], \"expected\": [[0, 0], [], []], \"passed\": false}, {\"check\": \"unsorted unique\", \"actual\": [[0, 2], [2, 0], [5, 3]], \"expected\": [[0, 2], [0, 2], [3, 5]], \"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."}}