FA-5096 / Method resolution / Open access
Cooperative diamond mro: Omits the terminal Root contribution from the cooperative chain · case 01
Omits the terminal Root contribution from the cooperative chain and changes the required Python-language result.
ROOT CAUSE
Omits the terminal Root contribution from the cooperative chain. The executable reproducer isolates this operation from the rest of the contract.
VERIFIED REPAIR
Traverse the actual C3 MRO cooperatively, appending each visited class once. Leaf bases are A,B or B,A and both derive from Root; start chooses normal dispatch or super after a specified class.
Unsuccessful approach: The alternative still fails because it calls both bases explicitly and duplicates downstream cooperative contributions.
Case contract
Traverse the actual C3 MRO cooperatively, appending each visited class once. Leaf bases are A,B or B,A and both derive from Root; start chooses normal dispatch or super after a specified class. Inputs use the finite Python types shown in the fixtures. An error string denotes the specified caught exception, not an unhandled process failure.
Why this case matters
Runs Python standard-library language operations in a deterministic local reproducer. Literal expected answers are authored independently. Related defects share an evaluation group to avoid benchmark split leakage.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(order, start):
class Root:
def trace(self): return []
class A(Root):
def trace(self): return ['A']+super().trace()
class B(Root):
def trace(self): return ['B']+super().trace()
def leaf_trace(self): return ['Leaf']+super(Leaf,self).trace()
Leaf=type('Leaf',(A,B) if order=='AB' else (B,A),{'trace':leaf_trace})
obj=Leaf()
if start=='leaf': return obj.trace()
if start=='after-leaf': return super(Leaf,obj).trace()
if start=='after-A': return super(A,obj).trace()
return super(B,obj).trace()
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('left-first diamond', solve('AB', 'leaf'), ['Leaf', 'A', 'B', 'Root'])
check('right-first diamond', solve('BA', 'leaf'), ['Leaf', 'B', 'A', 'Root'])
check('super after leaf', solve('AB', 'after-leaf'), ['A', 'B', 'Root'])
check('super A follows dynamic MRO', solve('AB', 'after-A'), ['B', 'Root'])
check('super B follows dynamic MRO', solve('BA', 'after-B'), ['A', 'Root'])
check('terminal next', solve('AB', 'after-B'), ['Root'])
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 |
|---|---|---|---|
| left-first diamond | ['Leaf', 'A', 'B'] | ['Leaf', 'A', 'B', 'Root'] | Failed |
| right-first diamond | ['Leaf', 'B', 'A'] | ['Leaf', 'B', 'A', 'Root'] | Failed |
| super after leaf | ['A', 'B'] | ['A', 'B', 'Root'] | Failed |
| super A follows dynamic MRO | ['B'] | ['B', 'Root'] | Failed |
| super B follows dynamic MRO | ['A'] | ['A', 'Root'] | Failed |
| terminal next | [] | ['Root'] | Failed |
SHA-256 / ca902d9d0f8848a64aca730d0e71a0749537f504d529e0fd7be0e2afac77ad75
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(order, start):
class Root:
def trace(self): return ['Root']
class A(Root):
def trace(self): return ['A']+super().trace()
class B(Root):
def trace(self): return ['B']+super().trace()
def leaf_trace(self): return ['Leaf']+A.trace(self)+B.trace(self)
Leaf=type('Leaf',(A,B) if order=='AB' else (B,A),{'trace':leaf_trace})
obj=Leaf()
if start=='leaf': return obj.trace()
if start=='after-leaf': return super(Leaf,obj).trace()
if start=='after-A': return super(A,obj).trace()
return super(B,obj).trace()
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('left-first diamond', solve('AB', 'leaf'), ['Leaf', 'A', 'B', 'Root'])
check('right-first diamond', solve('BA', 'leaf'), ['Leaf', 'B', 'A', 'Root'])
check('super after leaf', solve('AB', 'after-leaf'), ['A', 'B', 'Root'])
check('super A follows dynamic MRO', solve('AB', 'after-A'), ['B', 'Root'])
check('super B follows dynamic MRO', solve('BA', 'after-B'), ['A', 'Root'])
check('terminal next', solve('AB', 'after-B'), ['Root'])
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 |
|---|---|---|---|
| left-first diamond | ['Leaf', 'A', 'B', 'Root', 'B', 'Root'] | ['Leaf', 'A', 'B', 'Root'] | Failed |
| right-first diamond | ['Leaf', 'A', 'Root', 'B', 'A', 'Root'] | ['Leaf', 'B', 'A', 'Root'] | Failed |
| super after leaf | ['A', 'B', 'Root'] | ['A', 'B', 'Root'] | Passed |
| super A follows dynamic MRO | ['B', 'Root'] | ['B', 'Root'] | Passed |
| super B follows dynamic MRO | ['A', 'Root'] | ['A', 'Root'] | Passed |
| terminal next | ['Root'] | ['Root'] | Passed |
SHA-256 / f161b5777ccb86aec822340f6b36b5d843bb7a140b29f05c7409381bc49f95ee
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(order, start):
class Root:
def trace(self): return ['Root']
class A(Root):
def trace(self): return ['A']+super().trace()
class B(Root):
def trace(self): return ['B']+super().trace()
def leaf_trace(self): return ['Leaf']+super(Leaf,self).trace()
Leaf=type('Leaf',(A,B) if order=='AB' else (B,A),{'trace':leaf_trace})
obj=Leaf()
if start=='leaf': return obj.trace()
if start=='after-leaf': return super(Leaf,obj).trace()
if start=='after-A': return super(A,obj).trace()
return super(B,obj).trace()
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('left-first diamond', solve('AB', 'leaf'), ['Leaf', 'A', 'B', 'Root'])
check('right-first diamond', solve('BA', 'leaf'), ['Leaf', 'B', 'A', 'Root'])
check('super after leaf', solve('AB', 'after-leaf'), ['A', 'B', 'Root'])
check('super A follows dynamic MRO', solve('AB', 'after-A'), ['B', 'Root'])
check('super B follows dynamic MRO', solve('BA', 'after-B'), ['A', 'Root'])
check('terminal next', solve('AB', 'after-B'), ['Root'])
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 |
|---|---|---|---|
| left-first diamond | ['Leaf', 'A', 'B', 'Root'] | ['Leaf', 'A', 'B', 'Root'] | Passed |
| right-first diamond | ['Leaf', 'B', 'A', 'Root'] | ['Leaf', 'B', 'A', 'Root'] | Passed |
| super after leaf | ['A', 'B', 'Root'] | ['A', 'B', 'Root'] | Passed |
| super A follows dynamic MRO | ['B', 'Root'] | ['B', 'Root'] | Passed |
| super B follows dynamic MRO | ['A', 'Root'] | ['A', 'Root'] | Passed |
| terminal next | ['Root'] | ['Root'] | Passed |
SHA-256 / 6a0ce6add744568ba0928b9161589df6f0436b32268797f5def5f8b8378c0975
Verification & scope
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:37:45.899198+00:00.
Case digest / ad66f87e005f8509e4b275a3475d7eaf36783b74512f3ee97c7a9fbf2f3f8a93