FA-4976 / Descriptor lookup / Open access
Data descriptor storage: Replaces a known zero backing value with the missing-value default · case 01
Replaces a known zero backing value with the missing-value default and changes the required Python-language result.
ROOT CAUSE
Replaces a known zero backing value with the missing-value default. The executable reproducer isolates this operation from the rest of the contract.
VERIFIED REPAIR
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].
Unsuccessful approach: The alternative still fails because it lets an instance shadow override a data descriptor.
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 '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
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('field',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 | [[99, 'class-descriptor'], {'_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 | [[4], {'field': 4}] | [[7], {'field': 4}] | Failed |
SHA-256 / ada02fbe7f08ad82d9e23e56846a5b21f8c04b22ab639bce1e4c7f9254467411
3 / The verified repair
Exit 0"""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',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 | [[0], {'_value': 0}] | [[0], {'_value': 0}] | Passed |
| shadow survives descriptor delete | [[7], {'field': 4}] | [[7], {'field': 4}] | Passed |
SHA-256 / 27a2a5cc04c0bd5a04bb91f5efa124d7580b8de85d4df8668b76c112e7842118
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 / f4541ecdfa9c6dc06a2344d14d69af03840aa264d1970267fc3f900f13d861ad