{"abstract":"The operation returns a result or retained state that violates this contract: Clear erases only the first scope, preserving all outer bindings.","category":"Scoped mappings","checks":4,"contract":"Clear erases only the first scope, preserving all outer bindings. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-6c51049590c6189e","failed_approach":"Replacing the entire chain with one empty scope discards parent scope structure.","family":"xr-chainmap-clear-only-current-scope","id":"FA-4756","implementations":{"attempt":{"sha256":"d5a4ee71809428d65f9d261fed9d2c69a4605b614ea51f6e6b901badf3ee8b04","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom collections import Counter, ChainMap, deque\nimport heapq\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [{}]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('outer preserved', solve([{'a': 2}, {'a': 1}]), [{}, {'a': 1}])\ncheck('three scopes', solve([{'a': 1}, {'b': 2}, {'c': 3}]), [{}, {'b': 2}, {'c': 3}])\ncheck('one scope', solve([{'a': 1}]), [{}])\ncheck('empty top', solve([{}, {'a': 1}]), [{}, {'a': 1}])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"95a2606d118e7baa4b90daacda1662abbe89b9ca48fd26326786846f25ad9044","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom collections import Counter, ChainMap, deque\nimport heapq\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [{} for m in x]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('outer preserved', solve([{'a': 2}, {'a': 1}]), [{}, {'a': 1}])\ncheck('three scopes', solve([{'a': 1}, {'b': 2}, {'c': 3}]), [{}, {'b': 2}, {'c': 3}])\ncheck('one scope', solve([{'a': 1}]), [{}])\ncheck('empty top', solve([{}, {'a': 1}]), [{}, {'a': 1}])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"65263f9184d4820b06882d8942c31692645c213a80f75d6f5344d4b490544ef1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom collections import Counter, ChainMap, deque\nimport heapq\nN = 1\nobservations = []\ndef solve(x, y=None):\n    c=ChainMap(*[dict(m) for m in x]); c.clear(); return c.maps\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('outer preserved', solve([{'a': 2}, {'a': 1}]), [{}, {'a': 1}])\ncheck('three scopes', solve([{'a': 1}, {'b': 2}, {'c': 3}]), [{}, {'b': 2}, {'c': 3}])\ncheck('one scope', solve([{'a': 1}]), [{}])\ncheck('empty top', solve([{}, {'a': 1}]), [{}, {'a': 1}])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xr-chainmap-clear-only-current-scope","generated_at":"2026-09-29T14:37:42.492143+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A controlled local-runtime regression for collection APIs, language semantics, or ownership wrappers. Fixtures include boundary and interaction cases.","repair":"Clear erases only the first scope, preserving all outer bindings.","root_cause":"Clearing every scope destroys inherited state.","sha256":"7ced3986c93d19a8084bf67ced18526079556013aa9e4616431f8738438d16d5","title":"Chainmap clear only current scope · case 01","variant":1,"variant_policy":"Five execution reruns of a fixed adversarial fixture suite; variant number does not alter semantic inputs.","verification":{"attempt":{"elapsed_ms":32.951,"exit_code":1,"observations":[{"actual":[{}],"check":"outer preserved","expected":[{},{"a":1}],"passed":false},{"actual":[{}],"check":"three scopes","expected":[{},{"b":2},{"c":3}],"passed":false},{"actual":[{}],"check":"one scope","expected":[{}],"passed":true},{"actual":[{}],"check":"empty top","expected":[{},{"a":1}],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"outer preserved\", \"actual\": [{}], \"expected\": [{}, {\"a\": 1}], \"passed\": false}, {\"check\": \"three scopes\", \"actual\": [{}], \"expected\": [{}, {\"b\": 2}, {\"c\": 3}], \"passed\": false}, {\"check\": \"one scope\", \"actual\": [{}], \"expected\": [{}], \"passed\": true}, {\"check\": \"empty top\", \"actual\": [{}], \"expected\": [{}, {\"a\": 1}], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.609,"exit_code":1,"observations":[{"actual":[{},{}],"check":"outer preserved","expected":[{},{"a":1}],"passed":false},{"actual":[{},{},{}],"check":"three scopes","expected":[{},{"b":2},{"c":3}],"passed":false},{"actual":[{}],"check":"one scope","expected":[{}],"passed":true},{"actual":[{},{}],"check":"empty top","expected":[{},{"a":1}],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"outer preserved\", \"actual\": [{}, {}], \"expected\": [{}, {\"a\": 1}], \"passed\": false}, {\"check\": \"three scopes\", \"actual\": [{}, {}, {}], \"expected\": [{}, {\"b\": 2}, {\"c\": 3}], \"passed\": false}, {\"check\": \"one scope\", \"actual\": [{}], \"expected\": [{}], \"passed\": true}, {\"check\": \"empty top\", \"actual\": [{}, {}], \"expected\": [{}, {\"a\": 1}], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.153,"exit_code":0,"observations":[{"actual":[{},{"a":1}],"check":"outer preserved","expected":[{},{"a":1}],"passed":true},{"actual":[{},{"b":2},{"c":3}],"check":"three scopes","expected":[{},{"b":2},{"c":3}],"passed":true},{"actual":[{}],"check":"one scope","expected":[{}],"passed":true},{"actual":[{},{"a":1}],"check":"empty top","expected":[{},{"a":1}],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"outer preserved\", \"actual\": [{}, {\"a\": 1}], \"expected\": [{}, {\"a\": 1}], \"passed\": true}, {\"check\": \"three scopes\", \"actual\": [{}, {\"b\": 2}, {\"c\": 3}], \"expected\": [{}, {\"b\": 2}, {\"c\": 3}], \"passed\": true}, {\"check\": \"one scope\", \"actual\": [{}], \"expected\": [{}], \"passed\": true}, {\"check\": \"empty top\", \"actual\": [{}, {\"a\": 1}], \"expected\": [{}, {\"a\": 1}], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}