FA-4996 / Descriptor lookup / Open access
Nondata descriptor shadow: Writes None instead of removing the shadow · case 01
Writes None instead of removing the shadow and changes the required Python-language result.
ROOT CAUSE
Writes None instead of removing the shadow. The executable reproducer isolates this operation from the rest of the contract.
VERIFIED REPAIR
An instance dictionary field shadows a non-data descriptor. Assignment creates a shadow, deleting the shadow restores computed descriptor reads, and class access stays class. Return reads and final instance dictionary.
Unsuccessful approach: The alternative still fails because it treats false instance shadows as absent.
Case contract
An instance dictionary field shadows a non-data descriptor. Assignment creates a shadow, deleting the shadow restores computed descriptor reads, and class access stays class. Return reads and 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):
return 'class' if obj is None else 'computed'
pass
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=='set': c.field=value
elif op=='delete': c.__dict__['field']=None
elif op=='class': out.append(C.field)
return [out,dict(c.__dict__)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('initial shadow', solve({'field': 'local'}, [['get', None]]), [['local'], {'field': 'local'}])
check('assign then unshadow', solve({}, [['get', None], ['set', 'local'], ['get', None], ['delete', None], ['get', None], ['class', None]]), [['computed', 'local', 'computed', 'class'], {}])
check('false shadow', solve({'field': 0}, [['get', None]]), [[0], {'field': 0}])
check('None shadow', solve({'field': None}, [['get', None], ['class', None]]), [[None, 'class'], {'field': None}])
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 |
|---|---|---|---|
| initial shadow | [['local'], {'field': 'local'}] | [['local'], {'field': 'local'}] | Passed |
| assign then unshadow | [['computed', 'local', None, 'class'], {'field': None}] | [['computed', 'local', 'computed', 'class'], {}] | Failed |
| false shadow | [[0], {'field': 0}] | [[0], {'field': 0}] | Passed |
| None shadow | [[None, 'class'], {'field': None}] | [[None, 'class'], {'field': None}] | Passed |
SHA-256 / b211a117b1707d95902ebea0f8f30f32ecf858ea8c56566bd3ad55d1af9ff2d7
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):
return 'class' if obj is None else 'computed'
pass
class C:
field=D()
c=C(); c.__dict__.update(initial); out=[]
for op,value in commands:
if op=='get': out.append(c.__dict__.get('field') or C.__dict__['field'].__get__(c,C))
elif op=='set': c.field=value
elif op=='delete': c.__dict__.pop('field',None)
elif op=='class': out.append(C.field)
return [out,dict(c.__dict__)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('initial shadow', solve({'field': 'local'}, [['get', None]]), [['local'], {'field': 'local'}])
check('assign then unshadow', solve({}, [['get', None], ['set', 'local'], ['get', None], ['delete', None], ['get', None], ['class', None]]), [['computed', 'local', 'computed', 'class'], {}])
check('false shadow', solve({'field': 0}, [['get', None]]), [[0], {'field': 0}])
check('None shadow', solve({'field': None}, [['get', None], ['class', None]]), [[None, 'class'], {'field': None}])
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 |
|---|---|---|---|
| initial shadow | [['local'], {'field': 'local'}] | [['local'], {'field': 'local'}] | Passed |
| assign then unshadow | [['computed', 'local', 'computed', 'class'], {}] | [['computed', 'local', 'computed', 'class'], {}] | Passed |
| false shadow | [['computed'], {'field': 0}] | [[0], {'field': 0}] | Failed |
| None shadow | [['computed', 'class'], {'field': None}] | [[None, 'class'], {'field': None}] | Failed |
SHA-256 / ab8d9f8e62a666daa942c257aab65e98100e51d6e86c5415e90ea976d9353144
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):
return 'class' if obj is None else 'computed'
pass
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=='set': c.field=value
elif op=='delete': c.__dict__.pop('field',None)
elif op=='class': out.append(C.field)
return [out,dict(c.__dict__)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('initial shadow', solve({'field': 'local'}, [['get', None]]), [['local'], {'field': 'local'}])
check('assign then unshadow', solve({}, [['get', None], ['set', 'local'], ['get', None], ['delete', None], ['get', None], ['class', None]]), [['computed', 'local', 'computed', 'class'], {}])
check('false shadow', solve({'field': 0}, [['get', None]]), [[0], {'field': 0}])
check('None shadow', solve({'field': None}, [['get', None], ['class', None]]), [[None, 'class'], {'field': None}])
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 |
|---|---|---|---|
| initial shadow | [['local'], {'field': 'local'}] | [['local'], {'field': 'local'}] | Passed |
| assign then unshadow | [['computed', 'local', 'computed', 'class'], {}] | [['computed', 'local', 'computed', 'class'], {}] | Passed |
| false shadow | [[0], {'field': 0}] | [[0], {'field': 0}] | Passed |
| None shadow | [[None, 'class'], {'field': None}] | [[None, 'class'], {'field': None}] | Passed |
SHA-256 / 13859b50cb2ff699abd0d0b67b5058927e5438934c3e1751ada880c7ad5b8c60
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.182140+00:00.
Case digest / 7ed6005eb33cea73ad1c9ecd0122717196d41d918f5ddf98cc91f6e60583c927