FA-5011 / Descriptor lookup / Open access
Getattr fallback: Calls object.__getattribute__ directly and bypasses __getattr__ fallback · case 01
Calls object.__getattribute__ directly and bypasses __getattr__ fallback and changes the required Python-language result.
ROOT CAUSE
Calls object.__getattribute__ directly and bypasses __getattr__ fallback. The executable reproducer isolates this operation from the rest of the contract.
VERIFIED REPAIR
Read attributes normally: instance attributes override plain class values; __getattr__ supplies missing:name only after AttributeError, including AttributeError from a property getter.
Unsuccessful approach: The alternative still fails because it looks only in the instance dictionary and skips class descriptors.
Case contract
Read attributes normally: instance attributes override plain class values; __getattr__ supplies missing:name only after AttributeError, including AttributeError from a property getter. 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(values, names):
class C:
present='class-value'
@property
def trouble(self):
raise AttributeError('getter failed')
def __getattr__(self,name):
return 'missing:'+name
c=C(); c.__dict__.update(values)
out=[]
for name in names:
try: out.append(object.__getattribute__(c,name))
except Exception as exc: out.append(type(exc).__name__)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('existing class and missing', solve({}, ['present', 'other']), ['class-value', 'missing:other'])
check('instance override', solve({'present': 0}, ['present']), [0])
check('property AttributeError falls back', solve({}, ['trouble']), ['missing:trouble'])
check('stored None is present', solve({'other': None}, ['other', 'absent']), [None, 'missing:absent'])
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 |
|---|---|---|---|
| existing class and missing | ['class-value', 'AttributeError'] | ['class-value', 'missing:other'] | Failed |
| instance override | [0] | [0] | Passed |
| property AttributeError falls back | ['AttributeError'] | ['missing:trouble'] | Failed |
| stored None is present | [None, 'AttributeError'] | [None, 'missing:absent'] | Failed |
SHA-256 / 02267a5c112d5a23a2d53753858141abe36f09a8992ef3f45aee425fd558c610
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(values, names):
class C:
present='class-value'
@property
def trouble(self):
raise AttributeError('getter failed')
def __getattr__(self,name):
return 'missing:'+name
c=C(); c.__dict__.update(values)
out=[]
for name in names:
try: out.append(c.__dict__.get(name,'missing:'+name))
except Exception as exc: out.append(type(exc).__name__)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('existing class and missing', solve({}, ['present', 'other']), ['class-value', 'missing:other'])
check('instance override', solve({'present': 0}, ['present']), [0])
check('property AttributeError falls back', solve({}, ['trouble']), ['missing:trouble'])
check('stored None is present', solve({'other': None}, ['other', 'absent']), [None, 'missing:absent'])
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 |
|---|---|---|---|
| existing class and missing | ['missing:present', 'missing:other'] | ['class-value', 'missing:other'] | Failed |
| instance override | [0] | [0] | Passed |
| property AttributeError falls back | ['missing:trouble'] | ['missing:trouble'] | Passed |
| stored None is present | [None, 'missing:absent'] | [None, 'missing:absent'] | Passed |
SHA-256 / bfdd0b2d3dd326d09990a074b7d9da76e6d866141fd4b4a72274ec7c92d37dc7
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(values, names):
class C:
present='class-value'
@property
def trouble(self):
raise AttributeError('getter failed')
def __getattr__(self,name):
return 'missing:'+name
c=C(); c.__dict__.update(values)
out=[]
for name in names:
try: out.append(getattr(c,name))
except Exception as exc: out.append(type(exc).__name__)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('existing class and missing', solve({}, ['present', 'other']), ['class-value', 'missing:other'])
check('instance override', solve({'present': 0}, ['present']), [0])
check('property AttributeError falls back', solve({}, ['trouble']), ['missing:trouble'])
check('stored None is present', solve({'other': None}, ['other', 'absent']), [None, 'missing:absent'])
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 |
|---|---|---|---|
| existing class and missing | ['class-value', 'missing:other'] | ['class-value', 'missing:other'] | Passed |
| instance override | [0] | [0] | Passed |
| property AttributeError falls back | ['missing:trouble'] | ['missing:trouble'] | Passed |
| stored None is present | [None, 'missing:absent'] | [None, 'missing:absent'] | Passed |
SHA-256 / daf8bbfad47d494e507e263e1c2c755301ceb7f00533587abcc6861b0942c8a2
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.181086+00:00.
Case digest / e7c28c94e0cd7d093a239c2f14632cc19e6d0e678d570692a799890cda1075e5