{"abstract":"The operation returns a result or retained state that violates this contract: Take at most n values from a one-pass iterator and return [taken,unconsumed tail]; taking zero consumes nothing.","category":"Iterator consumption","checks":4,"contract":"Take at most n values from a one-pass iterator and return [taken,unconsumed tail]; taking zero consumes nothing. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-53a343165879b87d","failed_approach":"Reading one extra value to bound the prefix loses an unrequested item.","family":"xr-islice-leaves-unrequested-tail","id":"FA-4536","implementations":{"attempt":{"sha256":"d7e55437e7f02d8d6b092fef8cc5e02d80ba0b8f4d1cf3b1682cce251a13854d","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(it.islice(g,y+1))[:y]; return [a,list(g)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('bounded prefix', solve(['a', 'b', 'c'], 1), [['a'], ['b', 'c']])\ncheck('zero consumes none', solve(['a'], 0), [[], ['a']])\ncheck('exhaustion', solve(['a'], 3), [['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":"dac9687a8ad5cdca998cdf4e7be3cc3422297cea2e095e902f5a29161176b7e7","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)[:y]; return [a,list(g)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('bounded prefix', solve(['a', 'b', 'c'], 1), [['a'], ['b', 'c']])\ncheck('zero consumes none', solve(['a'], 0), [[], ['a']])\ncheck('exhaustion', solve(['a'], 3), [['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"},"fixed":{"sha256":"2eb8dcde47f1aa1c8fbc44d08f8155269a854382ee68a89227e18415c0c3a36a","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(it.islice(g,y)); return [a,list(g)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('bounded prefix', solve(['a', 'b', 'c'], 1), [['a'], ['b', 'c']])\ncheck('zero consumes none', solve(['a'], 0), [[], ['a']])\ncheck('exhaustion', solve(['a'], 3), [['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-islice-leaves-unrequested-tail","generated_at":"2026-09-29T14:37:40.087542+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 at most n values from a one-pass iterator and return [taken,unconsumed tail]; taking zero consumes nothing.","root_cause":"Materializing the stream before slicing consumes the entire tail.","sha256":"a8637f587c300ba3c6e8e60bfd1bb66bf7ee3e918268e718baf14c7e6f87597f","title":"Islice leaves unrequested tail · 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":33.599,"exit_code":1,"observations":[{"actual":[["a"],["c"]],"check":"bounded prefix","expected":[["a"],["b","c"]],"passed":false},{"actual":[[],[]],"check":"zero consumes none","expected":[[],["a"]],"passed":false},{"actual":[["a"],[]],"check":"exhaustion","expected":[["a"],[]],"passed":true},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"bounded prefix\", \"actual\": [[\"a\"], [\"c\"]], \"expected\": [[\"a\"], [\"b\", \"c\"]], \"passed\": false}, {\"check\": \"zero consumes none\", \"actual\": [[], []], \"expected\": [[], [\"a\"]], \"passed\": false}, {\"check\": \"exhaustion\", \"actual\": [[\"a\"], []], \"expected\": [[\"a\"], []], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.084,"exit_code":1,"observations":[{"actual":[["a"],[]],"check":"bounded prefix","expected":[["a"],["b","c"]],"passed":false},{"actual":[[],[]],"check":"zero consumes none","expected":[[],["a"]],"passed":false},{"actual":[["a"],[]],"check":"exhaustion","expected":[["a"],[]],"passed":true},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"bounded prefix\", \"actual\": [[\"a\"], []], \"expected\": [[\"a\"], [\"b\", \"c\"]], \"passed\": false}, {\"check\": \"zero consumes none\", \"actual\": [[], []], \"expected\": [[], [\"a\"]], \"passed\": false}, {\"check\": \"exhaustion\", \"actual\": [[\"a\"], []], \"expected\": [[\"a\"], []], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":118.475,"exit_code":0,"observations":[{"actual":[["a"],["b","c"]],"check":"bounded prefix","expected":[["a"],["b","c"]],"passed":true},{"actual":[[],["a"]],"check":"zero consumes none","expected":[[],["a"]],"passed":true},{"actual":[["a"],[]],"check":"exhaustion","expected":[["a"],[]],"passed":true},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"bounded prefix\", \"actual\": [[\"a\"], [\"b\", \"c\"]], \"expected\": [[\"a\"], [\"b\", \"c\"]], \"passed\": true}, {\"check\": \"zero consumes none\", \"actual\": [[], [\"a\"]], \"expected\": [[], [\"a\"]], \"passed\": true}, {\"check\": \"exhaustion\", \"actual\": [[\"a\"], []], \"expected\": [[\"a\"], []], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}