{"abstract":"CSR expansion loses rows with repeated row pointers.","category":"Sparse tensor canonicalization","checks":6,"contract":"Expand valid CSR arrays into [row,column,value] entries, including correct row identity after empty rows.","contract_signature":"ptr,columns,values","evaluation_group":"w3-sparse-tensor-canonicalization-csr-expand-rowptr","failed_approach":"Strictly-before counting maps an offset exactly at a row boundary to the preceding row, so the attempted mapping still mislabels the first value in a row.","family":"w3-sparse-tensor-canonicalization-csr-expand-rowptr","id":"FA-100461","implementations":{"attempt":{"sha256":"e0b67f66676d016aa8d28003a5ab4ec007b313cfa3216de92831b58025a63ba9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ptr,columns,values):\n    return [[sum(ptr[i+1]<k for i in range(len(ptr)-1)),columns[k],values[k]] for k in range(len(values))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty middle',solve([0,1,1,2],[2,0],[5,7]),[[0,2,5],[2,0,7]])\ncheck('leading empty',solve([0,0,1],[N],[8]),[[1,N,8]])\ncheck('all empty',solve([0,0,0],[],[]),[])\ncheck('single row',solve([0,1],[3],[N]),[[0,3,N]])\ncheck('two per row',solve([0,2,4],[0,1,2,3],[1,2,3,4]),[[0,0,1],[0,1,2],[1,2,3],[1,3,4]])\ncheck('trailing empty',solve([0,1,1,1],[N],[6]),[[0,N,6]])\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":"16460bbf91c7db1a43d9f79298a6a29b34eaf45f9bdf0347cd341439a078cba0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ptr,columns,values):\n    return [[min(i for i in range(len(ptr)-1) if ptr[i]<=k),columns[k],values[k]] for k in range(len(values))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty middle',solve([0,1,1,2],[2,0],[5,7]),[[0,2,5],[2,0,7]])\ncheck('leading empty',solve([0,0,1],[N],[8]),[[1,N,8]])\ncheck('all empty',solve([0,0,0],[],[]),[])\ncheck('single row',solve([0,1],[3],[N]),[[0,3,N]])\ncheck('two per row',solve([0,2,4],[0,1,2,3],[1,2,3,4]),[[0,0,1],[0,1,2],[1,2,3],[1,3,4]])\ncheck('trailing empty',solve([0,1,1,1],[N],[6]),[[0,N,6]])\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-expand-rowptr","generated_at":"2026-09-30T16:48:35.815662+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":"Rows are inferred from pointer intervals; repeated offsets encode valid empty rows.","sha256":"8511d0f6a9dbe15739059246a2ec6301cdcdb23699e1cef7fd177de6d3dc8bf8","title":"Sparse tensor: CSR expansion loses rows with repeated row pointers · 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.31,"exit_code":1,"observations":[{"actual":[[0,2,5],[0,0,7]],"check":"empty middle","expected":[[0,2,5],[2,0,7]],"passed":false},{"actual":[[0,1,8]],"check":"leading empty","expected":[[1,1,8]],"passed":false},{"actual":[],"check":"all empty","expected":[],"passed":true},{"actual":[[0,3,1]],"check":"single row","expected":[[0,3,1]],"passed":true},{"actual":[[0,0,1],[0,1,2],[0,2,3],[1,3,4]],"check":"two per row","expected":[[0,0,1],[0,1,2],[1,2,3],[1,3,4]],"passed":false},{"actual":[[0,1,6]],"check":"trailing empty","expected":[[0,1,6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty middle\", \"actual\": [[0, 2, 5], [0, 0, 7]], \"expected\": [[0, 2, 5], [2, 0, 7]], \"passed\": false}, {\"check\": \"leading empty\", \"actual\": [[0, 1, 8]], \"expected\": [[1, 1, 8]], \"passed\": false}, {\"check\": \"all empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single row\", \"actual\": [[0, 3, 1]], \"expected\": [[0, 3, 1]], \"passed\": true}, {\"check\": \"two per row\", \"actual\": [[0, 0, 1], [0, 1, 2], [0, 2, 3], [1, 3, 4]], \"expected\": [[0, 0, 1], [0, 1, 2], [1, 2, 3], [1, 3, 4]], \"passed\": false}, {\"check\": \"trailing empty\", \"actual\": [[0, 1, 6]], \"expected\": [[0, 1, 6]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.658,"exit_code":1,"observations":[{"actual":[[0,2,5],[0,0,7]],"check":"empty middle","expected":[[0,2,5],[2,0,7]],"passed":false},{"actual":[[0,1,8]],"check":"leading empty","expected":[[1,1,8]],"passed":false},{"actual":[],"check":"all empty","expected":[],"passed":true},{"actual":[[0,3,1]],"check":"single row","expected":[[0,3,1]],"passed":true},{"actual":[[0,0,1],[0,1,2],[0,2,3],[0,3,4]],"check":"two per row","expected":[[0,0,1],[0,1,2],[1,2,3],[1,3,4]],"passed":false},{"actual":[[0,1,6]],"check":"trailing empty","expected":[[0,1,6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty middle\", \"actual\": [[0, 2, 5], [0, 0, 7]], \"expected\": [[0, 2, 5], [2, 0, 7]], \"passed\": false}, {\"check\": \"leading empty\", \"actual\": [[0, 1, 8]], \"expected\": [[1, 1, 8]], \"passed\": false}, {\"check\": \"all empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single row\", \"actual\": [[0, 3, 1]], \"expected\": [[0, 3, 1]], \"passed\": true}, {\"check\": \"two per row\", \"actual\": [[0, 0, 1], [0, 1, 2], [0, 2, 3], [0, 3, 4]], \"expected\": [[0, 0, 1], [0, 1, 2], [1, 2, 3], [1, 3, 4]], \"passed\": false}, {\"check\": \"trailing empty\", \"actual\": [[0, 1, 6]], \"expected\": [[0, 1, 6]], \"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."}}