FA-4971 / Descriptor lookup / Open access
Data descriptor storage: Returns an instance default for descriptor access on the class · case 01
Returns an instance default for descriptor access on the class and changes the required Python-language result.
ROOT CAUSE
Returns an instance default for descriptor access on the class. The executable reproducer isolates this operation from the rest of the contract.
THE FAILURE
Returns an instance default for descriptor access on the class. The executable reproducer isolates this operation from the rest of the contract.
Unsuccessful approach: The alternative still fails because it replaces a known zero backing value with the missing-value default.
Case contract
A data descriptor field takes precedence over an instance field shadow. Its backing key is _value, missing reads return 7, writes update that key, deletion removes it, and class access returns class-descriptor. Return [read results,final instance dictionary]. 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(initial, commands):
class D:
def __get__(self, obj, owner):
if obj is None: return 7
return obj.__dict__.get('_value',7)
def __set__(self, obj, value):
obj.__dict__['_value']=value
def __delete__(self, obj):
obj.__dict__.pop('_value',None)
class C:
field=D()
c=C(); c.__dict__.update(initial); out=[]
for op,value in commands:
if op=='get': out.append(c.field)
elif op=='class': out.append(C.field)
elif op=='set': c.field=value
elif op=='delete': del c.field
return [out,dict(c.__dict__)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('descriptor beats shadow', solve({'field': 99, '_value': 2}, [['get', None], ['class', None]]), [[2, 'class-descriptor'], {'field': 99, '_value': 2}])
check('set and delete dispatch', solve({}, [['set', 5], ['get', None], ['delete', None], ['get', None]]), [[5, 7], {}])
check('zero is stored', solve({'_value': 0}, [['get', None]]), [[0], {'_value': 0}])
check('shadow survives descriptor delete', solve({'field': 4, '_value': 8}, [['delete', None], ['get', None]]), [[7], {'field': 4}])
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 |
|---|---|---|---|
| descriptor beats shadow | [[2, 7], {'_value': 2, 'field': 99}] | [[2, 'class-descriptor'], {'_value': 2, 'field': 99}] | Failed |
| set and delete dispatch | [[5, 7], {}] | [[5, 7], {}] | Passed |
| zero is stored | [[0], {'_value': 0}] | [[0], {'_value': 0}] | Passed |
| shadow survives descriptor delete | [[7], {'field': 4}] | [[7], {'field': 4}] | Passed |
SHA-256 / 78f1b2a68748982adb640dd3aeb10f9d784dc697e0239f7efac5a3eead722a82
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(initial, commands):
class D:
def __get__(self, obj, owner):
if obj is None: return 'class-descriptor'
return obj.__dict__.get('_value') or 7
def __set__(self, obj, value):
obj.__dict__['_value']=value
def __delete__(self, obj):
obj.__dict__.pop('_value',None)
class C:
field=D()
c=C(); c.__dict__.update(initial); out=[]
for op,value in commands:
if op=='get': out.append(c.field)
elif op=='class': out.append(C.field)
elif op=='set': c.field=value
elif op=='delete': del c.field
return [out,dict(c.__dict__)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('descriptor beats shadow', solve({'field': 99, '_value': 2}, [['get', None], ['class', None]]), [[2, 'class-descriptor'], {'field': 99, '_value': 2}])
check('set and delete dispatch', solve({}, [['set', 5], ['get', None], ['delete', None], ['get', None]]), [[5, 7], {}])
check('zero is stored', solve({'_value': 0}, [['get', None]]), [[0], {'_value': 0}])
check('shadow survives descriptor delete', solve({'field': 4, '_value': 8}, [['delete', None], ['get', None]]), [[7], {'field': 4}])
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 |
|---|---|---|---|
| descriptor beats shadow | [[2, 'class-descriptor'], {'_value': 2, 'field': 99}] | [[2, 'class-descriptor'], {'_value': 2, 'field': 99}] | Passed |
| set and delete dispatch | [[5, 7], {}] | [[5, 7], {}] | Passed |
| zero is stored | [[7], {'_value': 0}] | [[0], {'_value': 0}] | Failed |
| shadow survives descriptor delete | [[7], {'field': 4}] | [[7], {'field': 4}] | Passed |
SHA-256 / 56a0f5f4ac60e5fec262e4c16cab1058103bd9f5c8d26803d37a2817e204ef47
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:44.908717+00:00.
Case digest / 3185bb2603a4b8699dba4f0e5aeed669f1a9a259193cebc64507c4fa4a66e3eb