{"abstract":"CSR conversion assigns entries using value offsets as row numbers.","category":"Sparse tensor canonicalization","checks":6,"contract":"Convert valid CSR storage to row-major COO [row,column,value] entries.","contract_signature":"ptr,columns,values","evaluation_group":"w3-sparse-tensor-canonicalization-csr-to-coo","failed_approach":"The end pointer is exclusive; iterating inclusively can steal the first element of the following row.","family":"w3-sparse-tensor-canonicalization-csr-to-coo","id":"FA-100536","implementations":{"attempt":{"sha256":"92b7df115bd6fca724d9eb8bcab2a00b7844ac0f3693f11701a7b935567917ae","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ptr,columns,values):\n    out=[]\n    for r in range(len(ptr)-1):\n     for k in range(ptr[r],ptr[r+1]+1):\n      if k<len(values): out.append([r,columns[k],values[k]])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty row',solve([0,1,1,3],[2,0,1],[5,6,7]),[[0,2,5],[2,0,6],[2,1,7]])\ncheck('single row',solve([0,2],[N,1],[4,8]),[[0,N,4],[0,1,8]])\ncheck('all empty',solve([0,0,0],[],[]),[])\ncheck('three rows',solve([0,1,2,3],[0,1,2],[3,4,5]),[[0,0,3],[1,1,4],[2,2,5]])\ncheck('leading empty',solve([0,0,1],[N],[7]),[[1,N,7]])\ncheck('trailing empty',solve([0,1,1],[2],[9]),[[0,2,9]])\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":"d94cf374ca4199035712b7dbf46788430f5d63d841b44f736de1c5fca0151efc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ptr,columns,values):\n    return [[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 row',solve([0,1,1,3],[2,0,1],[5,6,7]),[[0,2,5],[2,0,6],[2,1,7]])\ncheck('single row',solve([0,2],[N,1],[4,8]),[[0,N,4],[0,1,8]])\ncheck('all empty',solve([0,0,0],[],[]),[])\ncheck('three rows',solve([0,1,2,3],[0,1,2],[3,4,5]),[[0,0,3],[1,1,4],[2,2,5]])\ncheck('leading empty',solve([0,0,1],[N],[7]),[[1,N,7]])\ncheck('trailing empty',solve([0,1,1],[2],[9]),[[0,2,9]])\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-to-coo","generated_at":"2026-09-30T16:48:36.730700+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":"CSR row identities come from pointer intervals, while the value-array offset selects the stored element.","sha256":"c05bfad0a2c6d368f1f6b7ed4536f8d1392f77342d6848909cdfd038812d3b11","title":"Sparse tensor: CSR conversion assigns entries using value offsets as row numbers · 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":27.769,"exit_code":1,"observations":[{"actual":[[0,2,5],[0,0,6],[1,0,6],[2,0,6],[2,1,7]],"check":"empty row","expected":[[0,2,5],[2,0,6],[2,1,7]],"passed":false},{"actual":[[0,1,4],[0,1,8]],"check":"single row","expected":[[0,1,4],[0,1,8]],"passed":true},{"actual":[],"check":"all empty","expected":[],"passed":true},{"actual":[[0,0,3],[0,1,4],[1,1,4],[1,2,5],[2,2,5]],"check":"three rows","expected":[[0,0,3],[1,1,4],[2,2,5]],"passed":false},{"actual":[[0,1,7],[1,1,7]],"check":"leading empty","expected":[[1,1,7]],"passed":false},{"actual":[[0,2,9]],"check":"trailing empty","expected":[[0,2,9]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty row\", \"actual\": [[0, 2, 5], [0, 0, 6], [1, 0, 6], [2, 0, 6], [2, 1, 7]], \"expected\": [[0, 2, 5], [2, 0, 6], [2, 1, 7]], \"passed\": false}, {\"check\": \"single row\", \"actual\": [[0, 1, 4], [0, 1, 8]], \"expected\": [[0, 1, 4], [0, 1, 8]], \"passed\": true}, {\"check\": \"all empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"three rows\", \"actual\": [[0, 0, 3], [0, 1, 4], [1, 1, 4], [1, 2, 5], [2, 2, 5]], \"expected\": [[0, 0, 3], [1, 1, 4], [2, 2, 5]], \"passed\": false}, {\"check\": \"leading empty\", \"actual\": [[0, 1, 7], [1, 1, 7]], \"expected\": [[1, 1, 7]], \"passed\": false}, {\"check\": \"trailing empty\", \"actual\": [[0, 2, 9]], \"expected\": [[0, 2, 9]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.117,"exit_code":1,"observations":[{"actual":[[0,2,5],[1,0,6],[2,1,7]],"check":"empty row","expected":[[0,2,5],[2,0,6],[2,1,7]],"passed":false},{"actual":[[0,1,4],[1,1,8]],"check":"single row","expected":[[0,1,4],[0,1,8]],"passed":false},{"actual":[],"check":"all empty","expected":[],"passed":true},{"actual":[[0,0,3],[1,1,4],[2,2,5]],"check":"three rows","expected":[[0,0,3],[1,1,4],[2,2,5]],"passed":true},{"actual":[[0,1,7]],"check":"leading empty","expected":[[1,1,7]],"passed":false},{"actual":[[0,2,9]],"check":"trailing empty","expected":[[0,2,9]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty row\", \"actual\": [[0, 2, 5], [1, 0, 6], [2, 1, 7]], \"expected\": [[0, 2, 5], [2, 0, 6], [2, 1, 7]], \"passed\": false}, {\"check\": \"single row\", \"actual\": [[0, 1, 4], [1, 1, 8]], \"expected\": [[0, 1, 4], [0, 1, 8]], \"passed\": false}, {\"check\": \"all empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"three rows\", \"actual\": [[0, 0, 3], [1, 1, 4], [2, 2, 5]], \"expected\": [[0, 0, 3], [1, 1, 4], [2, 2, 5]], \"passed\": true}, {\"check\": \"leading empty\", \"actual\": [[0, 1, 7]], \"expected\": [[1, 1, 7]], \"passed\": false}, {\"check\": \"trailing empty\", \"actual\": [[0, 2, 9]], \"expected\": [[0, 2, 9]], \"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."}}