{"abstract":"stored entry count is reported instead of logical nonzero count.","category":"Sparse tensor canonicalization","checks":6,"contract":"Coalesce duplicate coordinates, remove final zeros, and return the count of remaining logical coordinates.","contract_signature":"entries","evaluation_group":"w3-sparse-tensor-canonicalization-coo-unique-nnz","failed_approach":"Input records that are individually nonzero may cancel after coalescing, so the count must use final coordinate totals.","family":"w3-sparse-tensor-canonicalization-coo-unique-nnz","id":"FA-100511","implementations":{"attempt":{"sha256":"6146e14cd4d88b240b18576322ee28df8a8c045760c5dcb05af1e8ed148df29c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    coords={}\n    for r,c,v in entries: coords[(r,c)]=coords.get((r,c),0)+v\n    return sum(v!=0 for r,c,v in entries)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('duplicates coalesce',solve([[0,0,N],[0,0,2],[1,0,5]]),2)\ncheck('cancellation',solve([[0,0,N],[0,0,-N]]),0)\ncheck('empty',solve([]),0)\ncheck('single zero',solve([[0,0,0]]),0)\ncheck('unique',solve([[0,0,3],[1,1,4]]),2)\ncheck('one surviving',solve([[0,0,0],[1,2,N]]),1)\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":"095c784c1b6bfbf7df46f1fb193eabe31ac42dc1f80c1439aae2094be4b3e74f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries):\n    return len(entries)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('duplicates coalesce',solve([[0,0,N],[0,0,2],[1,0,5]]),2)\ncheck('cancellation',solve([[0,0,N],[0,0,-N]]),0)\ncheck('empty',solve([]),0)\ncheck('single zero',solve([[0,0,0]]),0)\ncheck('unique',solve([[0,0,3],[1,1,4]]),2)\ncheck('one surviving',solve([[0,0,0],[1,2,N]]),1)\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-unique-nnz","generated_at":"2026-09-30T16:48:36.272701+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":"Physical COO records are not equivalent to distinct nonzero tensor coordinates.","sha256":"fd8ec0c0e3cead3b7b431841ed3c898259a22f6cd4a49a9dcb73253b7c3e7724","title":"Sparse tensor: stored entry count is reported instead of logical nonzero count · 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.698,"exit_code":1,"observations":[{"actual":3,"check":"duplicates coalesce","expected":2,"passed":false},{"actual":2,"check":"cancellation","expected":0,"passed":false},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":0,"check":"single zero","expected":0,"passed":true},{"actual":2,"check":"unique","expected":2,"passed":true},{"actual":1,"check":"one surviving","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicates coalesce\", \"actual\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"cancellation\", \"actual\": 2, \"expected\": 0, \"passed\": false}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"single zero\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"unique\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"one surviving\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.274,"exit_code":1,"observations":[{"actual":3,"check":"duplicates coalesce","expected":2,"passed":false},{"actual":2,"check":"cancellation","expected":0,"passed":false},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":1,"check":"single zero","expected":0,"passed":false},{"actual":2,"check":"unique","expected":2,"passed":true},{"actual":2,"check":"one surviving","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicates coalesce\", \"actual\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"cancellation\", \"actual\": 2, \"expected\": 0, \"passed\": false}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"single zero\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"unique\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"one surviving\", \"actual\": 2, \"expected\": 1, \"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."}}