{"abstract":"CSR row pointers omit empty rows.","category":"Sparse tensor canonicalization","checks":6,"contract":"Build CSR row pointers for a matrix with given row count and sorted unique COO entries; repeated pointer values represent empty rows.","contract_signature":"rows,entries","evaluation_group":"w3-sparse-tensor-canonicalization-coo-rowptr-count","failed_approach":"The attempt retains empty-row boundaries but invents a stored element for every empty row.","family":"w3-sparse-tensor-canonicalization-coo-rowptr-count","id":"FA-100456","implementations":{"attempt":{"sha256":"e62364851a3391c40d29a7313b1da3ff980a455a5a82e9741a6fa784bee7dbc2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows,entries):\n    counts=[0]*rows\n    for r,c,v in entries: counts[r]+=1\n    ptr=[0]\n    for n in counts: ptr.append(ptr[-1]+max(1,n))\n    return ptr\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('middle empty',solve(N+2,[[0,0,1],[N+1,1,2]]),[0,1]+[1]*N+[2])\ncheck('all empty',solve(N,[]),[0]*(N+1))\ncheck('one row',solve(1,[[0,0,7]]),[0,1])\ncheck('every row',solve(3,[[0,0,1],[1,1,2],[2,2,3]]),[0,1,2,3])\ncheck('two in row',solve(2,[[0,0,1],[0,1,2],[1,0,4]]),[0,2,3])\ncheck('leading empty',solve(3,[[1,1,4]]),[0,0,1,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":"a2669d5eb2edf8a7b7751c73e01704196c12b77ef1aff5e1449ca248fa675ac3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows,entries):\n    counts=[0]*rows\n    for r,c,v in entries: counts[r]+=1\n    ptr=[0]\n    for n in counts:\n     if n: ptr.append(ptr[-1]+n)\n    return ptr\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('middle empty',solve(N+2,[[0,0,1],[N+1,1,2]]),[0,1]+[1]*N+[2])\ncheck('all empty',solve(N,[]),[0]*(N+1))\ncheck('one row',solve(1,[[0,0,7]]),[0,1])\ncheck('every row',solve(3,[[0,0,1],[1,1,2],[2,2,3]]),[0,1,2,3])\ncheck('two in row',solve(2,[[0,0,1],[0,1,2],[1,0,4]]),[0,2,3])\ncheck('leading empty',solve(3,[[1,1,4]]),[0,0,1,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-rowptr-count","generated_at":"2026-09-30T16:48:35.815072+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":"Empty rows do not advance the stored-value offset, but the row boundary still needs its own pointer.","sha256":"33cc4b05922a0434e94095d5967e2d4479d4ad56cdb58eacf344efa925c1d088","title":"Sparse tensor: CSR row pointers omit empty rows · 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.684,"exit_code":1,"observations":[{"actual":[0,1,2,3],"check":"middle empty","expected":[0,1,1,2],"passed":false},{"actual":[0,1],"check":"all empty","expected":[0,0],"passed":false},{"actual":[0,1],"check":"one row","expected":[0,1],"passed":true},{"actual":[0,1,2,3],"check":"every row","expected":[0,1,2,3],"passed":true},{"actual":[0,2,3],"check":"two in row","expected":[0,2,3],"passed":true},{"actual":[0,1,2,3],"check":"leading empty","expected":[0,0,1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"middle empty\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 1, 2], \"passed\": false}, {\"check\": \"all empty\", \"actual\": [0, 1], \"expected\": [0, 0], \"passed\": false}, {\"check\": \"one row\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"every row\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 2, 3], \"passed\": true}, {\"check\": \"two in row\", \"actual\": [0, 2, 3], \"expected\": [0, 2, 3], \"passed\": true}, {\"check\": \"leading empty\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 0, 1, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.231,"exit_code":1,"observations":[{"actual":[0,1,2],"check":"middle empty","expected":[0,1,1,2],"passed":false},{"actual":[0],"check":"all empty","expected":[0,0],"passed":false},{"actual":[0,1],"check":"one row","expected":[0,1],"passed":true},{"actual":[0,1,2,3],"check":"every row","expected":[0,1,2,3],"passed":true},{"actual":[0,2,3],"check":"two in row","expected":[0,2,3],"passed":true},{"actual":[0,1],"check":"leading empty","expected":[0,0,1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"middle empty\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 1, 2], \"passed\": false}, {\"check\": \"all empty\", \"actual\": [0], \"expected\": [0, 0], \"passed\": false}, {\"check\": \"one row\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"every row\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 2, 3], \"passed\": true}, {\"check\": \"two in row\", \"actual\": [0, 2, 3], \"expected\": [0, 2, 3], \"passed\": true}, {\"check\": \"leading empty\", \"actual\": [0, 1], \"expected\": [0, 0, 1, 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."}}