{"abstract":"coalesced zero values remain stored.","category":"Sparse tensor canonicalization","checks":6,"contract":"Sum duplicate coordinates and omit coordinates whose final integer value is zero.","contract_signature":"entries","evaluation_group":"w3-sparse-tensor-canonicalization-coo-zero-prune","failed_approach":"Filtering inputs loses zero-valued no-op entries but cannot remove a nonzero coordinate that becomes zero only after coalescing.","family":"w3-sparse-tensor-canonicalization-coo-zero-prune","id":"FA-100451","implementations":{"attempt":{"sha256":"855f85533c8a8ad3a6e7bd18e397fd32f56fe016644a0a1745a33371fd1880e0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    out={}\n    for r,c,v in entries:\n     if v: out[(r,c)]=out.get((r,c),0)+v\n    return [[r,c,v] for (r,c),v in sorted(out.items())]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('cancellation',solve([[0,0,N],[0,0,-N]]),[])\ncheck('retain nonzero',solve([[0,1,N],[0,1,2]]),[[0,1,N+2]])\ncheck('explicit zero',solve([[1,1,0]]),[])\ncheck('empty',solve([]),[])\ncheck('partial cancel',solve([[0,0,N+2],[0,0,-1]]),[[0,0,N+1]])\ncheck('mixed',solve([[1,0,3],[0,2,0],[1,0,-3]]),[])\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":"37a3f1b0574ce9e1c86b76e2d830b7ed21f2567bb96a64f7f054db92c7f68045","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    out={}\n    for r,c,v in entries: out[(r,c)]=out.get((r,c),0)+v\n    return [[r,c,v] for (r,c),v in sorted(out.items())]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('cancellation',solve([[0,0,N],[0,0,-N]]),[])\ncheck('retain nonzero',solve([[0,1,N],[0,1,2]]),[[0,1,N+2]])\ncheck('explicit zero',solve([[1,1,0]]),[])\ncheck('empty',solve([]),[])\ncheck('partial cancel',solve([[0,0,N+2],[0,0,-1]]),[[0,0,N+1]])\ncheck('mixed',solve([[1,0,3],[0,2,0],[1,0,-3]]),[])\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-zero-prune","generated_at":"2026-09-30T16:48:35.815298+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":"A coordinate is retained even when duplicate contributions cancel exactly.","sha256":"87a9c383c6e05db333b5b1b80622336bf00a57af79c3dc9444d0c2f103c50cb8","title":"Sparse tensor: coalesced zero values remain stored · 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.316,"exit_code":1,"observations":[{"actual":[[0,0,0]],"check":"cancellation","expected":[],"passed":false},{"actual":[[0,1,3]],"check":"retain nonzero","expected":[[0,1,3]],"passed":true},{"actual":[],"check":"explicit zero","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[0,0,2]],"check":"partial cancel","expected":[[0,0,2]],"passed":true},{"actual":[[1,0,0]],"check":"mixed","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cancellation\", \"actual\": [[0, 0, 0]], \"expected\": [], \"passed\": false}, {\"check\": \"retain nonzero\", \"actual\": [[0, 1, 3]], \"expected\": [[0, 1, 3]], \"passed\": true}, {\"check\": \"explicit zero\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial cancel\", \"actual\": [[0, 0, 2]], \"expected\": [[0, 0, 2]], \"passed\": true}, {\"check\": \"mixed\", \"actual\": [[1, 0, 0]], \"expected\": [], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.035,"exit_code":1,"observations":[{"actual":[[0,0,0]],"check":"cancellation","expected":[],"passed":false},{"actual":[[0,1,3]],"check":"retain nonzero","expected":[[0,1,3]],"passed":true},{"actual":[[1,1,0]],"check":"explicit zero","expected":[],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[0,0,2]],"check":"partial cancel","expected":[[0,0,2]],"passed":true},{"actual":[[0,2,0],[1,0,0]],"check":"mixed","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cancellation\", \"actual\": [[0, 0, 0]], \"expected\": [], \"passed\": false}, {\"check\": \"retain nonzero\", \"actual\": [[0, 1, 3]], \"expected\": [[0, 1, 3]], \"passed\": true}, {\"check\": \"explicit zero\", \"actual\": [[1, 1, 0]], \"expected\": [], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial cancel\", \"actual\": [[0, 0, 2]], \"expected\": [[0, 0, 2]], \"passed\": true}, {\"check\": \"mixed\", \"actual\": [[0, 2, 0], [1, 0, 0]], \"expected\": [], \"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."}}