FAILURE MAP
← Case archive

FA-4991 / Descriptor lookup / Open access

Nondata descriptor shadow: Assigns the instance value to the class and replaces its descriptor · case 01

Assigns the instance value to the class and replaces its descriptor and changes the required Python-language result.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Assigns the instance value to the class and replaces its descriptor. 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 writes None instead of removing the shadow.

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__.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 fixtureActualExpectedOutcome
initial shadow[['local'], {'field': 'local'}][['local'], {'field': 'local'}]Passed
assign then unshadow[['computed', 'local', 'local', 'local'], {}][['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 / 93b7babf7b36d84fd185cb12f818048d31aad6e346fe3ff4dbb1197a796fc77a

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.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 fixtureActualExpectedOutcome
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

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 fixtureActualExpectedOutcome
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.065545+00:00.

Case digest / 0476adff2d29e286aa4aa5d3d4ef6194627142ab0df75eb7c4174ee9a9ba9eda