FA-12446 / Molecular graph representation / Open access
Neighbor count replaces encoded bond order · case 01
Neighbor count replaces encoded bond order.
ROOT CAUSE
Degree counts bonds rather than their stored order.
VERIFIED REPAIR
Implement the explicit toy representation contract: For an atom ID, sum integer orders 1..3 of incident undirected bonds [a,b,order]; unique endpoints and no self bonds. This is an order sum, not inferred valence.
Unsuccessful approach: Clamping orders to two loses triple bond contributions.
Case contract
For an atom ID, sum integer orders 1..3 of incident undirected bonds [a,b,order]; unique endpoints and no self bonds. This is an order sum, not inferred valence.
Why this case matters
Controlled molecular graph interchange model; tests isolate atom or bond representation errors without claiming chemical validity or production toolkit equivalence.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(atom, bonds):
return sum(atom in b[:2] for b in bonds)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('double', solve(N, [[N,N+1,2]]), 2)
check('triple', solve(N, [[N,N+1,3]]), 3)
check('single', solve(N, [[N,N+1,1]]), 1)
check('isolated', solve(N, []), 0)
check('mixed', solve(N, [[N,N+1,3],[N+2,N,1]]), 4)
check('unrelated', solve(N, [[N+1,N+2,2]]), 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 |
|---|---|---|---|
| double | 1 | 2 | Failed |
| triple | 1 | 3 | Failed |
| single | 1 | 1 | Passed |
| isolated | 0 | 0 | Passed |
| mixed | 2 | 4 | Failed |
| unrelated | 0 | 0 | Passed |
SHA-256 / c92cc1d24346ee469ed2c77459a7b5f386750541b47feea7fea2d43949da9eac
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(atom, bonds):
return sum(min(order,2) for a,b,order in bonds if atom in (a,b))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('double', solve(N, [[N,N+1,2]]), 2)
check('triple', solve(N, [[N,N+1,3]]), 3)
check('single', solve(N, [[N,N+1,1]]), 1)
check('isolated', solve(N, []), 0)
check('mixed', solve(N, [[N,N+1,3],[N+2,N,1]]), 4)
check('unrelated', solve(N, [[N+1,N+2,2]]), 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 |
|---|---|---|---|
| double | 2 | 2 | Passed |
| triple | 2 | 3 | Failed |
| single | 1 | 1 | Passed |
| isolated | 0 | 0 | Passed |
| mixed | 3 | 4 | Failed |
| unrelated | 0 | 0 | Passed |
SHA-256 / 3d9e55cccbcd75a30192eafee7a52f0eaf88ba8e63f08a0f63e575825847ee8c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(atom, bonds):
return sum(order for a,b,order in bonds if atom in (a,b))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('double', solve(N, [[N,N+1,2]]), 2)
check('triple', solve(N, [[N,N+1,3]]), 3)
check('single', solve(N, [[N,N+1,1]]), 1)
check('isolated', solve(N, []), 0)
check('mixed', solve(N, [[N,N+1,3],[N+2,N,1]]), 4)
check('unrelated', solve(N, [[N+1,N+2,2]]), 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 |
|---|---|---|---|
| double | 2 | 2 | Passed |
| triple | 3 | 3 | Passed |
| single | 1 | 1 | Passed |
| isolated | 0 | 0 | Passed |
| mixed | 4 | 4 | Passed |
| unrelated | 0 | 0 | Passed |
SHA-256 / 296067cf87cec6d52939b33289025b2e7db973effaabd87d055299087323f5a9
Verification & scope
Toy representation only; no valence inference, chemical sanitization, synthesis, or real molecular identity determination. 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-29T14:38:56.853969+00:00.
Case digest / 1aea16b479150d4dbeacd6c2af0505f121d57d55fc0a6801087b63ea333d1f9b