{"abstract":"The operation returns a result or retained state that violates this contract: Creating a child prepends exactly the child map without merging or mutating the parent scope list.","category":"Scoped mappings","checks":4,"contract":"Creating a child prepends exactly the child map without merging or mutating the parent scope list. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","contract_signature":"x, y=None","evaluation_group":"model-ce97fe82e1c57c2f","failed_approach":"Appending the child gives it lowest lookup precedence.","family":"xr-chainmap-new-child-keeps-parent-scopes","id":"FA-4731","implementations":{"attempt":{"sha256":"6b7752a1b4b4ad0d243e7042b3b6d3f5e666125309771e7f41af27d3a3182a13","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    a=[dict(m) for m in x]; return [a+[dict(y)],a]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('child shadows without rewriting', solve([{'a': 1}], {'a': 2}), [[{'a': 2}, {'a': 1}], [{'a': 1}]])\ncheck('empty child is scope', solve([{'a': 1}], {}), [[{}, {'a': 1}], [{'a': 1}]])\ncheck('multiple parent scopes', solve([{'a': 1}, {'b': 2}], {'c': 3}), [[{'c': 3}, {'a': 1}, {'b': 2}], [{'a': 1}, {'b': 2}]])\ncheck('empty parent scope', solve([{}], {}), [[{}, {}], [{}]])\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":"f1e2a959f4df19e08c9026d95c72bcad8bff7d4b2b2ab587657ff4c35bcf14c1","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    a=[dict(m) for m in x]; a[0].update(y); return [a,a]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('child shadows without rewriting', solve([{'a': 1}], {'a': 2}), [[{'a': 2}, {'a': 1}], [{'a': 1}]])\ncheck('empty child is scope', solve([{'a': 1}], {}), [[{}, {'a': 1}], [{'a': 1}]])\ncheck('multiple parent scopes', solve([{'a': 1}, {'b': 2}], {'c': 3}), [[{'c': 3}, {'a': 1}, {'b': 2}], [{'a': 1}, {'b': 2}]])\ncheck('empty parent scope', solve([{}], {}), [[{}, {}], [{}]])\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-new-child-keeps-parent-scopes","generated_at":"2026-09-29T14:37:42.146568+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.","root_cause":"Merging child bindings mutates the parent and collapses the scope boundary.","sha256":"12b6c2e7dbfcba80abb03992f0b43a31f39c4a735b8a86b8e4cf06fe32215c4e","title":"Chainmap new child keeps parent scopes · case 01","variant":1,"variant_policy":"Five execution reruns of a fixed adversarial fixture suite; variant number does not alter semantic inputs.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.992,"exit_code":1,"observations":[{"actual":[[{"a":1},{"a":2}],[{"a":1}]],"check":"child shadows without rewriting","expected":[[{"a":2},{"a":1}],[{"a":1}]],"passed":false},{"actual":[[{"a":1},{}],[{"a":1}]],"check":"empty child is scope","expected":[[{},{"a":1}],[{"a":1}]],"passed":false},{"actual":[[{"a":1},{"b":2},{"c":3}],[{"a":1},{"b":2}]],"check":"multiple parent scopes","expected":[[{"c":3},{"a":1},{"b":2}],[{"a":1},{"b":2}]],"passed":false},{"actual":[[{},{}],[{}]],"check":"empty parent scope","expected":[[{},{}],[{}]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"child shadows without rewriting\", \"actual\": [[{\"a\": 1}, {\"a\": 2}], [{\"a\": 1}]], \"expected\": [[{\"a\": 2}, {\"a\": 1}], [{\"a\": 1}]], \"passed\": false}, {\"check\": \"empty child is scope\", \"actual\": [[{\"a\": 1}, {}], [{\"a\": 1}]], \"expected\": [[{}, {\"a\": 1}], [{\"a\": 1}]], \"passed\": false}, {\"check\": \"multiple parent scopes\", \"actual\": [[{\"a\": 1}, {\"b\": 2}, {\"c\": 3}], [{\"a\": 1}, {\"b\": 2}]], \"expected\": [[{\"c\": 3}, {\"a\": 1}, {\"b\": 2}], [{\"a\": 1}, {\"b\": 2}]], \"passed\": false}, {\"check\": \"empty parent scope\", \"actual\": [[{}, {}], [{}]], \"expected\": [[{}, {}], [{}]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.378,"exit_code":1,"observations":[{"actual":[[{"a":2}],[{"a":2}]],"check":"child shadows without rewriting","expected":[[{"a":2},{"a":1}],[{"a":1}]],"passed":false},{"actual":[[{"a":1}],[{"a":1}]],"check":"empty child is scope","expected":[[{},{"a":1}],[{"a":1}]],"passed":false},{"actual":[[{"a":1,"c":3},{"b":2}],[{"a":1,"c":3},{"b":2}]],"check":"multiple parent scopes","expected":[[{"c":3},{"a":1},{"b":2}],[{"a":1},{"b":2}]],"passed":false},{"actual":[[{}],[{}]],"check":"empty parent scope","expected":[[{},{}],[{}]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"child shadows without rewriting\", \"actual\": [[{\"a\": 2}], [{\"a\": 2}]], \"expected\": [[{\"a\": 2}, {\"a\": 1}], [{\"a\": 1}]], \"passed\": false}, {\"check\": \"empty child is scope\", \"actual\": [[{\"a\": 1}], [{\"a\": 1}]], \"expected\": [[{}, {\"a\": 1}], [{\"a\": 1}]], \"passed\": false}, {\"check\": \"multiple parent scopes\", \"actual\": [[{\"a\": 1, \"c\": 3}, {\"b\": 2}], [{\"a\": 1, \"c\": 3}, {\"b\": 2}]], \"expected\": [[{\"c\": 3}, {\"a\": 1}, {\"b\": 2}], [{\"a\": 1}, {\"b\": 2}]], \"passed\": false}, {\"check\": \"empty parent scope\", \"actual\": [[{}], [{}]], \"expected\": [[{}, {}], [{}]], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}