FA-5121 / Method resolution / Open access
Classmethod dynamic binding: Reports the bound class metaclass instead of the class name · case 01
Reports the bound class metaclass instead of the class name and changes the required Python-language result.
ROOT CAUSE
Reports the bound class metaclass instead of the class name. The executable reproducer isolates this operation from the rest of the contract.
THE FAILURE
Reports the bound class metaclass instead of the class name. The executable reproducer isolates this operation from the rest of the contract.
Unsuccessful approach: The alternative still fails because it ignores subclass shadowing when reading the bound class label.
Case contract
An inherited classmethod binds the accessing class, including access through an instance or a saved bound method. Return [bound class name,its label,suffix]. 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(mode, suffix):
class Base:
label='base'
@classmethod
def read(cls,suffix): return [type(cls).__name__,cls.label,suffix]
class Child(Base): label='child'
try:
if mode=='base': return Base.read(suffix)
if mode=='child': return Child.read(suffix)
if mode=='instance': return Child().read(suffix)
bound=Child.read
return bound(suffix)
except (TypeError,AttributeError) as exc:
return type(exc).__name__
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('base access', solve('base', 'x'), ['Base', 'base', 'x'])
check('subclass access', solve('child', 'y'), ['Child', 'child', 'y'])
check('instance access', solve('instance', None), ['Child', 'child', None])
check('saved bound method', solve('saved', 0), ['Child', 'child', 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 |
|---|---|---|---|
| base access | ['type', 'base', 'x'] | ['Base', 'base', 'x'] | Failed |
| subclass access | ['type', 'child', 'y'] | ['Child', 'child', 'y'] | Failed |
| instance access | ['type', 'child', None] | ['Child', 'child', None] | Failed |
| saved bound method | ['type', 'child', 0] | ['Child', 'child', 0] | Failed |
SHA-256 / e80ebf3120618dc53b7a2e38fae56b40d501c2b35975a7d875e6c26e41054999
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(mode, suffix):
class Base:
label='base'
@classmethod
def read(cls,suffix): return [cls.__name__,Base.label,suffix]
class Child(Base): label='child'
try:
if mode=='base': return Base.read(suffix)
if mode=='child': return Child.read(suffix)
if mode=='instance': return Child().read(suffix)
bound=Child.read
return bound(suffix)
except (TypeError,AttributeError) as exc:
return type(exc).__name__
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('base access', solve('base', 'x'), ['Base', 'base', 'x'])
check('subclass access', solve('child', 'y'), ['Child', 'child', 'y'])
check('instance access', solve('instance', None), ['Child', 'child', None])
check('saved bound method', solve('saved', 0), ['Child', 'child', 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 |
|---|---|---|---|
| base access | ['Base', 'base', 'x'] | ['Base', 'base', 'x'] | Passed |
| subclass access | ['Child', 'base', 'y'] | ['Child', 'child', 'y'] | Failed |
| instance access | ['Child', 'base', None] | ['Child', 'child', None] | Failed |
| saved bound method | ['Child', 'base', 0] | ['Child', 'child', 0] | Failed |
SHA-256 / 9d53c0f1278bb7817c6ede2bb18c822e9bd3e73b46375da9b5347631191d039c
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 4 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:46.307024+00:00.
Case digest / d72b17af997a8f3b338e2ae9467c13515a58e61335c329d1113bab5a298eaaf3