{"abstract":"The operation returns a result or retained state that violates this contract: Return length-r combinations of input positions, preserving input order within tuples and retaining duplicate-valued tuples.","category":"Iterator consumption","checks":4,"contract":"Return length-r combinations of input positions, preserving input order within tuples and retaining duplicate-valued tuples. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-9cd8d5c448a556fe","failed_approach":"Deduplicating the source loses equal-valued combinations from distinct positions.","family":"xr-combinations-respect-positional-order","id":"FA-4601","implementations":{"attempt":{"sha256":"1c35c7986de1e41e0dec736d06e76a82b28bbc74b55eb848f10d6ccdefebd186","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(v) for v in it.combinations(dict.fromkeys(x),y)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('position duplicates', solve(['a', 'a', 'b'], 2), [['a', 'a'], ['a', 'b'], ['a', 'b']])\ncheck('input order', solve(['b', 'a'], 2), [['b', 'a']])\ncheck('zero choice', solve([], 0), [[]])\ncheck('too many', solve(['a'], 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":"f171700d4b74b1382b8ff0215330532077c1b906bf17fbfcb5073cca01b2e1e3","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(v) for v in it.permutations(x,y)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('position duplicates', solve(['a', 'a', 'b'], 2), [['a', 'a'], ['a', 'b'], ['a', 'b']])\ncheck('input order', solve(['b', 'a'], 2), [['b', 'a']])\ncheck('zero choice', solve([], 0), [[]])\ncheck('too many', solve(['a'], 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"},"fixed":{"sha256":"dcc4cd538beb9ef8d93eaef0cb6f8dca714a41cb9acb9c54b870d33a961f741f","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(v) for v in it.combinations(x,y)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('position duplicates', solve(['a', 'a', 'b'], 2), [['a', 'a'], ['a', 'b'], ['a', 'b']])\ncheck('input order', solve(['b', 'a'], 2), [['b', 'a']])\ncheck('zero choice', solve([], 0), [[]])\ncheck('too many', solve(['a'], 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-combinations-respect-positional-order","generated_at":"2026-09-29T14:37:40.847211+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":"Return length-r combinations of input positions, preserving input order within tuples and retaining duplicate-valued tuples.","root_cause":"Permutations emit orderings that violate source-position order.","sha256":"4e923ac9126b216273786f2486336df55ca33d522e3c70bd34288783095c3af7","title":"Combinations respect positional order · 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":115.332,"exit_code":1,"observations":[{"actual":[["a","b"]],"check":"position duplicates","expected":[["a","a"],["a","b"],["a","b"]],"passed":false},{"actual":[["b","a"]],"check":"input order","expected":[["b","a"]],"passed":true},{"actual":[[]],"check":"zero choice","expected":[[]],"passed":true},{"actual":[],"check":"too many","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"position duplicates\", \"actual\": [[\"a\", \"b\"]], \"expected\": [[\"a\", \"a\"], [\"a\", \"b\"], [\"a\", \"b\"]], \"passed\": false}, {\"check\": \"input order\", \"actual\": [[\"b\", \"a\"]], \"expected\": [[\"b\", \"a\"]], \"passed\": true}, {\"check\": \"zero choice\", \"actual\": [[]], \"expected\": [[]], \"passed\": true}, {\"check\": \"too many\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.694,"exit_code":1,"observations":[{"actual":[["a","a"],["a","b"],["a","a"],["a","b"],["b","a"],["b","a"]],"check":"position duplicates","expected":[["a","a"],["a","b"],["a","b"]],"passed":false},{"actual":[["b","a"],["a","b"]],"check":"input order","expected":[["b","a"]],"passed":false},{"actual":[[]],"check":"zero choice","expected":[[]],"passed":true},{"actual":[],"check":"too many","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"position duplicates\", \"actual\": [[\"a\", \"a\"], [\"a\", \"b\"], [\"a\", \"a\"], [\"a\", \"b\"], [\"b\", \"a\"], [\"b\", \"a\"]], \"expected\": [[\"a\", \"a\"], [\"a\", \"b\"], [\"a\", \"b\"]], \"passed\": false}, {\"check\": \"input order\", \"actual\": [[\"b\", \"a\"], [\"a\", \"b\"]], \"expected\": [[\"b\", \"a\"]], \"passed\": false}, {\"check\": \"zero choice\", \"actual\": [[]], \"expected\": [[]], \"passed\": true}, {\"check\": \"too many\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":37.858,"exit_code":0,"observations":[{"actual":[["a","a"],["a","b"],["a","b"]],"check":"position duplicates","expected":[["a","a"],["a","b"],["a","b"]],"passed":true},{"actual":[["b","a"]],"check":"input order","expected":[["b","a"]],"passed":true},{"actual":[[]],"check":"zero choice","expected":[[]],"passed":true},{"actual":[],"check":"too many","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"position duplicates\", \"actual\": [[\"a\", \"a\"], [\"a\", \"b\"], [\"a\", \"b\"]], \"expected\": [[\"a\", \"a\"], [\"a\", \"b\"], [\"a\", \"b\"]], \"passed\": true}, {\"check\": \"input order\", \"actual\": [[\"b\", \"a\"]], \"expected\": [[\"b\", \"a\"]], \"passed\": true}, {\"check\": \"zero choice\", \"actual\": [[]], \"expected\": [[]], \"passed\": true}, {\"check\": \"too many\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}