{"abstract":"The operation returns a result or retained state that violates this contract: Advance the first tee branch n positions; the second still yields the entire original stream.","category":"Iterator consumption","checks":4,"contract":"Advance the first tee branch n positions; the second still yields the entire original stream. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","contract_signature":"x, y=None","evaluation_group":"model-7ab7d1d482edd77d","failed_approach":"Skipping the consumed prefix on the second tee branch discards its buffered independent history.","family":"xr-tee-branches-have-independent-cursors","id":"FA-4576","implementations":{"attempt":{"sha256":"e0e9e455bd8638b0a7ec966b684bdf7556ffa5805d34282fbe247b1d1c37de7c","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    a,b=it.tee(iter(x)); p=list(it.islice(a,y)); return [p,list(it.islice(b,y,None)),list(a)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('branch lag', solve(['a', 'b', 'c'], 1), [['a'], ['a', 'b', 'c'], ['b', 'c']])\ncheck('zero prefix', solve(['a'], 0), [[], ['a'], ['a']])\ncheck('first exhausts', solve(['a'], 5), [['a'], ['a'], []])\ncheck('empty', solve([], 2), [[], [], []])\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":"fee37eebf544fa7d560f15489873d9948eb3289c601f6f5a5bfd3d58a5236012","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    a=b=iter(x); p=list(it.islice(a,y)); return [p,list(b),list(a)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('branch lag', solve(['a', 'b', 'c'], 1), [['a'], ['a', 'b', 'c'], ['b', 'c']])\ncheck('zero prefix', solve(['a'], 0), [[], ['a'], ['a']])\ncheck('first exhausts', solve(['a'], 5), [['a'], ['a'], []])\ncheck('empty', solve([], 2), [[], [], []])\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-tee-branches-have-independent-cursors","generated_at":"2026-09-29T14:37:40.686160+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":"Both consumers share the same iterator object and advance one cursor.","sha256":"8a9b52a572b75c519e58ba994d3090e5c8b269fc3cb32d0414590d98e044f0df","title":"Tee branches have independent cursors · 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":40.577,"exit_code":1,"observations":[{"actual":[["a"],["b","c"],["b","c"]],"check":"branch lag","expected":[["a"],["a","b","c"],["b","c"]],"passed":false},{"actual":[[],["a"],["a"]],"check":"zero prefix","expected":[[],["a"],["a"]],"passed":true},{"actual":[["a"],[],[]],"check":"first exhausts","expected":[["a"],["a"],[]],"passed":false},{"actual":[[],[],[]],"check":"empty","expected":[[],[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"branch lag\", \"actual\": [[\"a\"], [\"b\", \"c\"], [\"b\", \"c\"]], \"expected\": [[\"a\"], [\"a\", \"b\", \"c\"], [\"b\", \"c\"]], \"passed\": false}, {\"check\": \"zero prefix\", \"actual\": [[], [\"a\"], [\"a\"]], \"expected\": [[], [\"a\"], [\"a\"]], \"passed\": true}, {\"check\": \"first exhausts\", \"actual\": [[\"a\"], [], []], \"expected\": [[\"a\"], [\"a\"], []], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[], [], []], \"expected\": [[], [], []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.596,"exit_code":1,"observations":[{"actual":[["a"],["b","c"],[]],"check":"branch lag","expected":[["a"],["a","b","c"],["b","c"]],"passed":false},{"actual":[[],["a"],[]],"check":"zero prefix","expected":[[],["a"],["a"]],"passed":false},{"actual":[["a"],[],[]],"check":"first exhausts","expected":[["a"],["a"],[]],"passed":false},{"actual":[[],[],[]],"check":"empty","expected":[[],[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"branch lag\", \"actual\": [[\"a\"], [\"b\", \"c\"], []], \"expected\": [[\"a\"], [\"a\", \"b\", \"c\"], [\"b\", \"c\"]], \"passed\": false}, {\"check\": \"zero prefix\", \"actual\": [[], [\"a\"], []], \"expected\": [[], [\"a\"], [\"a\"]], \"passed\": false}, {\"check\": \"first exhausts\", \"actual\": [[\"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."}}