FA-5101 / Method resolution / Open access
Cooperative diamond mro: Calls both bases explicitly and duplicates downstream cooperative contributions · case 01
Calls both bases explicitly and duplicates downstream cooperative contributions and changes the required Python-language result.
ROOT CAUSE
Calls both bases explicitly and duplicates downstream cooperative contributions. The executable reproducer isolates this operation from the rest of the contract.
THE FAILURE
Calls both bases explicitly and duplicates downstream cooperative contributions. The executable reproducer isolates this operation from the rest of the contract.
Unsuccessful approach: The alternative still fails because it hardcodes A delegation to Root and skips a sibling in the MRO.
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 ['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
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']+Root.trace(self)
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', 'Root'] | ['Leaf', 'A', 'B', 'Root'] | Failed |
| right-first diamond | ['Leaf', 'B', 'A', 'Root'] | ['Leaf', 'B', 'A', 'Root'] | Passed |
| super after leaf | ['A', 'Root'] | ['A', 'B', 'Root'] | Failed |
| 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 / fcd41b67981e24d16a8adf34fc4499f4c3860f9b913d31791cee887846fec5fd
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
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.981747+00:00.
Case digest / 47fb8d86181fa1b3facc36ca50863f3777b707c83a6b727477154c7a6f2a3b07