FA-100521 / Sparse tensor canonicalization / Open access
Sparse tensor: CSR row-pointer intervals are treated as nonempty row markers · case 01
CSR row-pointer intervals are treated as nonempty row markers.
ROOT CAUSE
An empty CSR row is represented by equal adjacent pointers, not a zero-length global array.
THE FAILURE
An empty CSR row is represented by equal adjacent pointers, not a zero-length global array.
Unsuccessful approach: A nonempty row may contain multiple items; emptiness is pointer equality.
Case contract
Return the number of empty rows in a valid CSR row pointer array.
Why this case matters
A small offline sparse-array operation has explicit coordinate and storage semantics.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ptr):
return sum(ptr[i+1]-ptr[i] for i in range(len(ptr)-1))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('interior empty',solve([0,1,1,3]),1)
check('all empty',solve([0,0,0,0]),3)
check('none empty',solve([0,1,2]),0)
check('singleton empty',solve([0,0]),1)
check('mixed',solve([0,2,2,2,5]),2)
check('no rows',solve([0]),0)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| interior empty | 3 | 1 | Failed |
| all empty | 0 | 3 | Failed |
| none empty | 2 | 0 | Failed |
| singleton empty | 0 | 1 | Failed |
| mixed | 5 | 2 | Failed |
| no rows | 0 | 0 | Passed |
SHA-256 / 8d429a6ed3b5c5fa7c01f9647eb2b59bbb3cd68630434f85093f30860c4f82dd
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ptr):
return sum(ptr[i+1]-ptr[i]==1 for i in range(len(ptr)-1))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('interior empty',solve([0,1,1,3]),1)
check('all empty',solve([0,0,0,0]),3)
check('none empty',solve([0,1,2]),0)
check('singleton empty',solve([0,0]),1)
check('mixed',solve([0,2,2,2,5]),2)
check('no rows',solve([0]),0)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| interior empty | 1 | 1 | Passed |
| all empty | 0 | 3 | Failed |
| none empty | 2 | 0 | Failed |
| singleton empty | 0 | 1 | Failed |
| mixed | 0 | 2 | Failed |
| no rows | 0 | 0 | Passed |
SHA-256 / 776a5d17f269064e6ac49a8000253ef45a5872f542bac488baf04864710eca4b
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:36.699476+00:00.
Case digest / 108643536221f2acc54bf64efb05f1181f19da66f62ad077b6da8109756cf20c