{"abstract":"The operation returns a result or retained state that violates this contract: Take the first value equal to sentinel from a filtered iterator; return [match or missing,unconsumed source].","category":"Iterator consumption","checks":4,"contract":"Take the first value equal to sentinel from a filtered iterator; return [match or missing,unconsumed source]. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-48c10ccbb5f73577","failed_approach":"Reading only the first source value does not scan through rejected values.","family":"xr-filter-lazily-consumes-through-first-match","id":"FA-4621","implementations":{"attempt":{"sha256":"0ccf9c46a8e671b6bc0e10a8334adc6d9cd4b4fc12b1032706299fcf6d790403","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=next(g,\"missing\"); return [a if a==y else \"missing\",list(g)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('scan through match', solve(['a', 's', 'b'], 's'), ['s', ['b']])\ncheck('first matches', solve(['s', 'a'], 's'), ['s', ['a']])\ncheck('no match exhausts', solve(['a', 'b'], 's'), ['missing', []])\ncheck('empty', solve([], 's'), ['missing', []])\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":"ac71fd5032c519497b45cd57f765548372c23238bd75ac4a318cbf3da2d1b245","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(filter(lambda v:v==y,g)); return [a[0] if a else \"missing\",list(g)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('scan through match', solve(['a', 's', 'b'], 's'), ['s', ['b']])\ncheck('first matches', solve(['s', 'a'], 's'), ['s', ['a']])\ncheck('no match exhausts', solve(['a', 'b'], 's'), ['missing', []])\ncheck('empty', solve([], 's'), ['missing', []])\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":"92d94ed0ab3c8f8bf88b7c9757168f9dae7a5e1230e693eb379bcc00ee4d1e08","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=next(filter(lambda v:v==y,g),\"missing\"); return [a,list(g)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('scan through match', solve(['a', 's', 'b'], 's'), ['s', ['b']])\ncheck('first matches', solve(['s', 'a'], 's'), ['s', ['a']])\ncheck('no match exhausts', solve(['a', 'b'], 's'), ['missing', []])\ncheck('empty', solve([], 's'), ['missing', []])\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-filter-lazily-consumes-through-first-match","generated_at":"2026-09-29T14:37:41.238371+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":"Take the first value equal to sentinel from a filtered iterator; return [match or missing,unconsumed source].","root_cause":"Collecting every match consumes values beyond the first requested match.","sha256":"af556c198a8178475fe9c37c9cf93f38956fd0f65123956952d6ab2e27e4822a","title":"Filter lazily consumes through first match · 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":41.627,"exit_code":1,"observations":[{"actual":["missing",["s","b"]],"check":"scan through match","expected":["s",["b"]],"passed":false},{"actual":["s",["a"]],"check":"first matches","expected":["s",["a"]],"passed":true},{"actual":["missing",["b"]],"check":"no match exhausts","expected":["missing",[]],"passed":false},{"actual":["missing",[]],"check":"empty","expected":["missing",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"scan through match\", \"actual\": [\"missing\", [\"s\", \"b\"]], \"expected\": [\"s\", [\"b\"]], \"passed\": false}, {\"check\": \"first matches\", \"actual\": [\"s\", [\"a\"]], \"expected\": [\"s\", [\"a\"]], \"passed\": true}, {\"check\": \"no match exhausts\", \"actual\": [\"missing\", [\"b\"]], \"expected\": [\"missing\", []], \"passed\": false}, {\"check\": \"empty\", \"actual\": [\"missing\", []], \"expected\": [\"missing\", []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":119.902,"exit_code":1,"observations":[{"actual":["s",[]],"check":"scan through match","expected":["s",["b"]],"passed":false},{"actual":["s",[]],"check":"first matches","expected":["s",["a"]],"passed":false},{"actual":["missing",[]],"check":"no match exhausts","expected":["missing",[]],"passed":true},{"actual":["missing",[]],"check":"empty","expected":["missing",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"scan through match\", \"actual\": [\"s\", []], \"expected\": [\"s\", [\"b\"]], \"passed\": false}, {\"check\": \"first matches\", \"actual\": [\"s\", []], \"expected\": [\"s\", [\"a\"]], \"passed\": false}, {\"check\": \"no match exhausts\", \"actual\": [\"missing\", []], \"expected\": [\"missing\", []], \"passed\": true}, {\"check\": \"empty\", \"actual\": [\"missing\", []], \"expected\": [\"missing\", []], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":35.07,"exit_code":0,"observations":[{"actual":["s",["b"]],"check":"scan through match","expected":["s",["b"]],"passed":true},{"actual":["s",["a"]],"check":"first matches","expected":["s",["a"]],"passed":true},{"actual":["missing",[]],"check":"no match exhausts","expected":["missing",[]],"passed":true},{"actual":["missing",[]],"check":"empty","expected":["missing",[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"scan through match\", \"actual\": [\"s\", [\"b\"]], \"expected\": [\"s\", [\"b\"]], \"passed\": true}, {\"check\": \"first matches\", \"actual\": [\"s\", [\"a\"]], \"expected\": [\"s\", [\"a\"]], \"passed\": true}, {\"check\": \"no match exhausts\", \"actual\": [\"missing\", []], \"expected\": [\"missing\", []], \"passed\": true}, {\"check\": \"empty\", \"actual\": [\"missing\", []], \"expected\": [\"missing\", []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}