{"abstract":"dense materialization overwrites duplicate coordinates.","category":"Sparse tensor canonicalization","checks":6,"contract":"Create a rows-by-cols integer matrix initialized to zero and add every COO contribution at its coordinate.","contract_signature":"entries,rows,cols","evaluation_group":"w3-sparse-tensor-canonicalization-coo-to-dense","failed_approach":"Truthiness prevents overwrites but drops additional values whenever a cell is already nonzero.","family":"w3-sparse-tensor-canonicalization-coo-to-dense","id":"FA-100516","implementations":{"attempt":{"sha256":"893a1c2b6fc3b71a42e439b72949814786d1bc3ec38e845acef5449e0950c66f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries,rows,cols):\n    out=[[0]*cols for _ in range(rows)]\n    for r,c,v in entries: out[r][c]=out[r][c] or v\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('duplicate cell',solve([[0,1,N],[0,1,2]],2,2),[[0,N+2],[0,0]])\ncheck('empty shape',solve([],N,1),[[0]]*N)\ncheck('zero dimensions',solve([],0,N),[])\ncheck('single cell',solve([[0,0,7]],1,1),[[7]])\ncheck('cancel to zero',solve([[0,0,N],[0,0,-N]],1,1),[[0]])\ncheck('separate cells',solve([[1,0,3],[0,1,4]],2,2),[[0,4],[3,0]])\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":"822cdc5fe687808ba3f8f11a3688c975c22bca15bacdc4f36a3b4440ec87b99e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries,rows,cols):\n    out=[[0]*cols for _ in range(rows)]\n    for r,c,v in entries: out[r][c]=v\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('duplicate cell',solve([[0,1,N],[0,1,2]],2,2),[[0,N+2],[0,0]])\ncheck('empty shape',solve([],N,1),[[0]]*N)\ncheck('zero dimensions',solve([],0,N),[])\ncheck('single cell',solve([[0,0,7]],1,1),[[7]])\ncheck('cancel to zero',solve([[0,0,N],[0,0,-N]],1,1),[[0]])\ncheck('separate cells',solve([[1,0,3],[0,1,4]],2,2),[[0,4],[3,0]])\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-to-dense","generated_at":"2026-09-30T16:48:36.272592+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":"Duplicate sparse coordinates represent additive contributions to one dense cell.","sha256":"46cf77ab046006167373a3ddc259ad626ad888e4094ea24c8f4db7a1ab97cf3f","title":"Sparse tensor: dense materialization overwrites duplicate 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":28.521,"exit_code":1,"observations":[{"actual":[[0,1],[0,0]],"check":"duplicate cell","expected":[[0,3],[0,0]],"passed":false},{"actual":[[0]],"check":"empty shape","expected":[[0]],"passed":true},{"actual":[],"check":"zero dimensions","expected":[],"passed":true},{"actual":[[7]],"check":"single cell","expected":[[7]],"passed":true},{"actual":[[1]],"check":"cancel to zero","expected":[[0]],"passed":false},{"actual":[[0,4],[3,0]],"check":"separate cells","expected":[[0,4],[3,0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicate cell\", \"actual\": [[0, 1], [0, 0]], \"expected\": [[0, 3], [0, 0]], \"passed\": false}, {\"check\": \"empty shape\", \"actual\": [[0]], \"expected\": [[0]], \"passed\": true}, {\"check\": \"zero dimensions\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single cell\", \"actual\": [[7]], \"expected\": [[7]], \"passed\": true}, {\"check\": \"cancel to zero\", \"actual\": [[1]], \"expected\": [[0]], \"passed\": false}, {\"check\": \"separate cells\", \"actual\": [[0, 4], [3, 0]], \"expected\": [[0, 4], [3, 0]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.406,"exit_code":1,"observations":[{"actual":[[0,2],[0,0]],"check":"duplicate cell","expected":[[0,3],[0,0]],"passed":false},{"actual":[[0]],"check":"empty shape","expected":[[0]],"passed":true},{"actual":[],"check":"zero dimensions","expected":[],"passed":true},{"actual":[[7]],"check":"single cell","expected":[[7]],"passed":true},{"actual":[[-1]],"check":"cancel to zero","expected":[[0]],"passed":false},{"actual":[[0,4],[3,0]],"check":"separate cells","expected":[[0,4],[3,0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicate cell\", \"actual\": [[0, 2], [0, 0]], \"expected\": [[0, 3], [0, 0]], \"passed\": false}, {\"check\": \"empty shape\", \"actual\": [[0]], \"expected\": [[0]], \"passed\": true}, {\"check\": \"zero dimensions\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single cell\", \"actual\": [[7]], \"expected\": [[7]], \"passed\": true}, {\"check\": \"cancel to zero\", \"actual\": [[-1]], \"expected\": [[0]], \"passed\": false}, {\"check\": \"separate cells\", \"actual\": [[0, 4], [3, 0]], \"expected\": [[0, 4], [3, 0]], \"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."}}