{"abstract":"The operation returns a result or retained state that violates this contract: Constructing map must not invoke callbacks; taking n results invokes only those callbacks. Return [calls before,calls after,results].","category":"Iterator consumption","checks":4,"contract":"Constructing map must not invoke callbacks; taking n results invokes only those callbacks. Return [calls before,calls after,results]. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","contract_signature":"x, y=None","evaluation_group":"model-47b67f1f4edbc061","failed_approach":"Materializing the map before truncation invokes callbacks for unrequested elements.","family":"xr-map-is-lazy-before-consumption","id":"FA-4616","implementations":{"attempt":{"sha256":"4c4db127352d12ed9f15f0639e52e93961c3f4352f383479e56fbf5eae31e1ee","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    calls=[]\n    def f(v): calls.append(v); return [v]\n    g=map(f,x); before=list(calls); a=list(g)[:y]; return [before,calls,a]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('partial consumption', solve(['a', 'b'], 1), [[], ['a'], [['a']]])\ncheck('zero consumption', solve(['a'], 0), [[], [], []])\ncheck('full consumption', solve(['a'], 3), [[], ['a'], [['a']]])\ncheck('empty', solve([], 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":"1beab4515f3c06829120f7b8e296ff6c3c7ecab9d242c40a496258d19730d174","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    calls=[]\n    def f(v): calls.append(v); return [v]\n    g=iter([f(v) for v in x]); before=list(calls); a=list(it.islice(g,y)); return [before,calls,a]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('partial consumption', solve(['a', 'b'], 1), [[], ['a'], [['a']]])\ncheck('zero consumption', solve(['a'], 0), [[], [], []])\ncheck('full consumption', solve(['a'], 3), [[], ['a'], [['a']]])\ncheck('empty', solve([], 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-map-is-lazy-before-consumption","generated_at":"2026-09-29T14:37:41.156254+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":"Eager materialization invokes every callback before the iterator is consumed.","sha256":"f48495c2cb7353b08536ecb060909b411412bd6085375b198586705a5ab89309","title":"Map is lazy before consumption · 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":38.735,"exit_code":1,"observations":[{"actual":[[],["a","b"],[["a"]]],"check":"partial consumption","expected":[[],["a"],[["a"]]],"passed":false},{"actual":[[],["a"],[]],"check":"zero consumption","expected":[[],[],[]],"passed":false},{"actual":[[],["a"],[["a"]]],"check":"full consumption","expected":[[],["a"],[["a"]]],"passed":true},{"actual":[[],[],[]],"check":"empty","expected":[[],[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"partial consumption\", \"actual\": [[], [\"a\", \"b\"], [[\"a\"]]], \"expected\": [[], [\"a\"], [[\"a\"]]], \"passed\": false}, {\"check\": \"zero consumption\", \"actual\": [[], [\"a\"], []], \"expected\": [[], [], []], \"passed\": false}, {\"check\": \"full consumption\", \"actual\": [[], [\"a\"], [[\"a\"]]], \"expected\": [[], [\"a\"], [[\"a\"]]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], [], []], \"expected\": [[], [], []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.22,"exit_code":1,"observations":[{"actual":[["a","b"],["a","b"],[["a"]]],"check":"partial consumption","expected":[[],["a"],[["a"]]],"passed":false},{"actual":[["a"],["a"],[]],"check":"zero consumption","expected":[[],[],[]],"passed":false},{"actual":[["a"],["a"],[["a"]]],"check":"full consumption","expected":[[],["a"],[["a"]]],"passed":false},{"actual":[[],[],[]],"check":"empty","expected":[[],[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"partial consumption\", \"actual\": [[\"a\", \"b\"], [\"a\", \"b\"], [[\"a\"]]], \"expected\": [[], [\"a\"], [[\"a\"]]], \"passed\": false}, {\"check\": \"zero consumption\", \"actual\": [[\"a\"], [\"a\"], []], \"expected\": [[], [], []], \"passed\": false}, {\"check\": \"full consumption\", \"actual\": [[\"a\"], [\"a\"], [[\"a\"]]], \"expected\": [[], [\"a\"], [[\"a\"]]], \"passed\": false}, {\"check\": \"empty\", \"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."}}