{"abstract":"The operation returns a result or retained state that violates this contract: Flatten exactly one iterable level in outer order, retaining empty and nested values at deeper levels.","category":"Iterator consumption","checks":4,"contract":"Flatten exactly one iterable level in outer order, retaining empty and nested values at deeper levels. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","contract_signature":"x, y=None","evaluation_group":"model-c6eaf0ea7347c1d2","failed_approach":"Flattening an extra level destroys nested elements that should remain intact.","family":"xr-chain-drains-current-before-next","id":"FA-4561","implementations":{"attempt":{"sha256":"f5ddabca134f970c4eee5515a99749adeff6435248cff0cb33732844915e11d3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport itertools as it\nfrom collections import deque\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [z for group in x for v in group for z in (v if isinstance(v,list) else [v])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ordered groups', solve([['a', 'b'], ['c']]), ['a', 'b', 'c'])\ncheck('nested remains nested', solve([[['a'], 'b'], ['c']]), [['a'], 'b', 'c'])\ncheck('empty groups', solve([[], ['a'], []]), ['a'])\ncheck('empty outer', 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":"45b8e1468fc60f287f5546f6c16f0813aaed8cc1671da71898079ee0cf43852a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport itertools as it\nfrom collections import deque\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [v for group in reversed(x) for v in group]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ordered groups', solve([['a', 'b'], ['c']]), ['a', 'b', 'c'])\ncheck('nested remains nested', solve([[['a'], 'b'], ['c']]), [['a'], 'b', 'c'])\ncheck('empty groups', solve([[], ['a'], []]), ['a'])\ncheck('empty outer', 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-chain-drains-current-before-next","generated_at":"2026-09-29T14:37:40.570095+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":"Reversing outer iteration visits groups in the wrong order.","sha256":"fc0e4342d4828d7054e75302d4069bdb85303aa3678ba89a070330d40599a47f","title":"Chain drains current before next · 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":36.211,"exit_code":1,"observations":[{"actual":["a","b","c"],"check":"ordered groups","expected":["a","b","c"],"passed":true},{"actual":["a","b","c"],"check":"nested remains nested","expected":[["a"],"b","c"],"passed":false},{"actual":["a"],"check":"empty groups","expected":["a"],"passed":true},{"actual":[],"check":"empty outer","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ordered groups\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"nested remains nested\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [[\"a\"], \"b\", \"c\"], \"passed\": false}, {\"check\": \"empty groups\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"empty outer\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.919,"exit_code":1,"observations":[{"actual":["c","a","b"],"check":"ordered groups","expected":["a","b","c"],"passed":false},{"actual":["c",["a"],"b"],"check":"nested remains nested","expected":[["a"],"b","c"],"passed":false},{"actual":["a"],"check":"empty groups","expected":["a"],"passed":true},{"actual":[],"check":"empty outer","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ordered groups\", \"actual\": [\"c\", \"a\", \"b\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"check\": \"nested remains nested\", \"actual\": [\"c\", [\"a\"], \"b\"], \"expected\": [[\"a\"], \"b\", \"c\"], \"passed\": false}, {\"check\": \"empty groups\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"empty outer\", \"actual\": [], \"expected\": [], \"passed\": true}], \"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."}}