FA-4966 / Descriptor lookup / Open access
Data descriptor storage: Deletes the shadow key instead of the descriptor backing key · case 01
Deletes the shadow key instead of the descriptor backing key and changes the required Python-language result.
ROOT CAUSE
Deletes the shadow key instead of the descriptor backing key. 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 returns an instance default for descriptor access on the class.
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',7)
def __set__(self, obj, value):
obj.__dict__['_value']=value
def __delete__(self, obj):
obj.__dict__.pop('field',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, 5], {'_value': 5}] | [[5, 7], {}] | Failed |
| zero is stored | [[0], {'_value': 0}] | [[0], {'_value': 0}] | Passed |
| shadow survives descriptor delete | [[8], {'_value': 8}] | [[7], {'field': 4}] | Failed |
SHA-256 / cc634026c7515a32b5489d04fff6bb0849757a9a555aca248d454778165d75c0
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 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
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.701579+00:00.
Case digest / df9b5a159bed0f3fe4b1d8b6b184843377a8d5392b97407383bfceaf8e08a702