{"abstract":"The operation returns a result or retained state that violates this contract: Use itertools compress semantics: consume one data item before discovering selectors are exhausted; return [selected,data remainder].","category":"Iterator consumption","checks":4,"contract":"Use itertools compress semantics: consume one data item before discovering selectors are exhausted; return [selected,data remainder]. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-c1dc543c94918a6e","failed_approach":"Slicing at selector count overlooks the extra data read before selector exhaustion is discovered.","family":"xr-compress-consumes-one-extra-data-item","id":"FA-4551","implementations":{"attempt":{"sha256":"107a92c929b78bccd7b83505753620ca6576a16bbfeb3d74eebc6e12250cd4be","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    n=min(len(x),len(y)); return [[x[i] for i in range(n) if y[i]],x[n:]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('short selectors consume next data', solve(['a', 'b', 'c'], [True]), [['a'], ['c']])\ncheck('false selector still advances', solve(['a', 'b', 'c'], [False, True]), [['b'], []])\ncheck('empty selectors consume first', solve(['a', 'b'], []), [[], ['b']])\ncheck('empty data', solve([], [False]), [[], []])\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":"d09fe2570f0d1e4c21a3b20565892171e2890260ea77c8a9acc5543a697b2f4d","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) for flag in y if flag]; return [a,list(g)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('short selectors consume next data', solve(['a', 'b', 'c'], [True]), [['a'], ['c']])\ncheck('false selector still advances', solve(['a', 'b', 'c'], [False, True]), [['b'], []])\ncheck('empty selectors consume first', solve(['a', 'b'], []), [[], ['b']])\ncheck('empty data', solve([], [False]), [[], []])\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":"63b391382a01d63f89220885eea12037dcfc658c0ad947571d362443cc1f96d2","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.compress(g,y)); return [a,list(g)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('short selectors consume next data', solve(['a', 'b', 'c'], [True]), [['a'], ['c']])\ncheck('false selector still advances', solve(['a', 'b', 'c'], [False, True]), [['b'], []])\ncheck('empty selectors consume first', solve(['a', 'b'], []), [[], ['b']])\ncheck('empty data', solve([], [False]), [[], []])\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-compress-consumes-one-extra-data-item","generated_at":"2026-09-29T14:37:40.487609+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":"Use itertools compress semantics: consume one data item before discovering selectors are exhausted; return [selected,data remainder].","root_cause":"Reading data only for truthy selectors fails to advance through false selectors.","sha256":"64dfd292c8afe0cb067b2a866687ee7d84353c4ed9dddd522bae67bcc7402cd5","title":"Compress consumes one extra data item · 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":128.125,"exit_code":1,"observations":[{"actual":[["a"],["b","c"]],"check":"short selectors consume next data","expected":[["a"],["c"]],"passed":false},{"actual":[["b"],["c"]],"check":"false selector still advances","expected":[["b"],[]],"passed":false},{"actual":[[],["a","b"]],"check":"empty selectors consume first","expected":[[],["b"]],"passed":false},{"actual":[[],[]],"check":"empty data","expected":[[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"short selectors consume next data\", \"actual\": [[\"a\"], [\"b\", \"c\"]], \"expected\": [[\"a\"], [\"c\"]], \"passed\": false}, {\"check\": \"false selector still advances\", \"actual\": [[\"b\"], [\"c\"]], \"expected\": [[\"b\"], []], \"passed\": false}, {\"check\": \"empty selectors consume first\", \"actual\": [[], [\"a\", \"b\"]], \"expected\": [[], [\"b\"]], \"passed\": false}, {\"check\": \"empty data\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.43,"exit_code":1,"observations":[{"actual":[["a"],["b","c"]],"check":"short selectors consume next data","expected":[["a"],["c"]],"passed":false},{"actual":[["a"],["b","c"]],"check":"false selector still advances","expected":[["b"],[]],"passed":false},{"actual":[[],["a","b"]],"check":"empty selectors consume first","expected":[[],["b"]],"passed":false},{"actual":[[],[]],"check":"empty data","expected":[[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"short selectors consume next data\", \"actual\": [[\"a\"], [\"b\", \"c\"]], \"expected\": [[\"a\"], [\"c\"]], \"passed\": false}, {\"check\": \"false selector still advances\", \"actual\": [[\"a\"], [\"b\", \"c\"]], \"expected\": [[\"b\"], []], \"passed\": false}, {\"check\": \"empty selectors consume first\", \"actual\": [[], [\"a\", \"b\"]], \"expected\": [[], [\"b\"]], \"passed\": false}, {\"check\": \"empty data\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":37.687,"exit_code":0,"observations":[{"actual":[["a"],["c"]],"check":"short selectors consume next data","expected":[["a"],["c"]],"passed":true},{"actual":[["b"],[]],"check":"false selector still advances","expected":[["b"],[]],"passed":true},{"actual":[[],["b"]],"check":"empty selectors consume first","expected":[[],["b"]],"passed":true},{"actual":[[],[]],"check":"empty data","expected":[[],[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"short selectors consume next data\", \"actual\": [[\"a\"], [\"c\"]], \"expected\": [[\"a\"], [\"c\"]], \"passed\": true}, {\"check\": \"false selector still advances\", \"actual\": [[\"b\"], []], \"expected\": [[\"b\"], []], \"passed\": true}, {\"check\": \"empty selectors consume first\", \"actual\": [[], [\"b\"]], \"expected\": [[], [\"b\"]], \"passed\": true}, {\"check\": \"empty data\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}