{"abstract":"The operation returns a result or retained state that violates this contract: Materializing a one-pass iterator exhausts it; a second materialization is empty.","category":"Iterator consumption","checks":4,"contract":"Materializing a one-pass iterator exhausts it; a second materialization is empty. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-0a972b5669b62877","failed_approach":"Returning the first materialization again fabricates a second traversal.","family":"xr-iterator-second-pass-is-exhausted","id":"FA-4651","implementations":{"attempt":{"sha256":"dd179f402ddde9c628159e86a9d99d970d09529faadd096839ffc3080e8db851","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    g=iter(x); a=list(g); return [a,a]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two values', solve(['a', 'b']), [['a', 'b'], []])\ncheck('singleton', solve(['a']), [['a'], []])\ncheck('empty', solve([]), [[], []])\ncheck('duplicates', solve(['a', 'a']), [['a', 'a'], []])\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":"e3dd2cd179aba948fd51a93b93650074e2e15c16404a8bfef5b8b76d93ed0cd1","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 [list(x),list(x)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two values', solve(['a', 'b']), [['a', 'b'], []])\ncheck('singleton', solve(['a']), [['a'], []])\ncheck('empty', solve([]), [[], []])\ncheck('duplicates', solve(['a', 'a']), [['a', 'a'], []])\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":"e78889562d24f5bc79bdb3d598b9a984230da2ca38f46135599d915ea3dd949a","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    g=iter(x); a=list(g); return [a,list(g)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two values', solve(['a', 'b']), [['a', 'b'], []])\ncheck('singleton', solve(['a']), [['a'], []])\ncheck('empty', solve([]), [[], []])\ncheck('duplicates', solve(['a', 'a']), [['a', 'a'], []])\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-iterator-second-pass-is-exhausted","generated_at":"2026-09-29T14:37:41.471231+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":"Materializing a one-pass iterator exhausts it; a second materialization is empty.","root_cause":"The second pass constructs a fresh iterator instead of reusing the exhausted cursor.","sha256":"6dde0d65623c0ca3c5b4e64ba0fe32e76534fd9f2d59d2119b718be11ce91b81","title":"Iterator second pass is exhausted · 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":36.004,"exit_code":1,"observations":[{"actual":[["a","b"],["a","b"]],"check":"two values","expected":[["a","b"],[]],"passed":false},{"actual":[["a"],["a"]],"check":"singleton","expected":[["a"],[]],"passed":false},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true},{"actual":[["a","a"],["a","a"]],"check":"duplicates","expected":[["a","a"],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two values\", \"actual\": [[\"a\", \"b\"], [\"a\", \"b\"]], \"expected\": [[\"a\", \"b\"], []], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [[\"a\"], [\"a\"]], \"expected\": [[\"a\"], []], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": [[\"a\", \"a\"], [\"a\", \"a\"]], \"expected\": [[\"a\", \"a\"], []], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.706,"exit_code":1,"observations":[{"actual":[["a","b"],["a","b"]],"check":"two values","expected":[["a","b"],[]],"passed":false},{"actual":[["a"],["a"]],"check":"singleton","expected":[["a"],[]],"passed":false},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true},{"actual":[["a","a"],["a","a"]],"check":"duplicates","expected":[["a","a"],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two values\", \"actual\": [[\"a\", \"b\"], [\"a\", \"b\"]], \"expected\": [[\"a\", \"b\"], []], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [[\"a\"], [\"a\"]], \"expected\": [[\"a\"], []], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": [[\"a\", \"a\"], [\"a\", \"a\"]], \"expected\": [[\"a\", \"a\"], []], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":35.632,"exit_code":0,"observations":[{"actual":[["a","b"],[]],"check":"two values","expected":[["a","b"],[]],"passed":true},{"actual":[["a"],[]],"check":"singleton","expected":[["a"],[]],"passed":true},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true},{"actual":[["a","a"],[]],"check":"duplicates","expected":[["a","a"],[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two values\", \"actual\": [[\"a\", \"b\"], []], \"expected\": [[\"a\", \"b\"], []], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [[\"a\"], []], \"expected\": [[\"a\"], []], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": [[\"a\", \"a\"], []], \"expected\": [[\"a\", \"a\"], []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}