{"abstract":"Shuffling replaces the playing entry with the first random candidate.","category":"Media playlist state","checks":4,"contract":"Permutation contains every original index once. A deterministic shuffle places current first and remaining entries in permutation order without duplication.","contract_signature":"entries, current, permutation","evaluation_group":"xmed-shuffle-preserves-playing-head","failed_approach":"Prepending current without excluding it from the permutation schedules it twice.","family":"xmed-shuffle-preserves-playing-head","id":"FA-11101","implementations":{"attempt":{"sha256":"21431fcbcbeea538e16888d57c2aef3576a576257ac2cc1b71679e272799fb31","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(entries, current, permutation):\n    return [entries[current]]+[entries[i] for i in permutation]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(['a', 'b', 'c'], 1, [2, 0, 1])),['b', 'c', 'a'])\ncheck('fixture 2',solve(*(['a'], 0, [0])),['a'])\ncheck('fixture 3',solve(*(['a', 'b'], 0, [0, 1])),['a', 'b'])\ncheck('fixture 4',solve(*(['a', 'b', 'c'], 2, [0, 2, 1])),['c', 'a', 'b'])\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":"b91f9b5949af4a5320a82db26749cabd8db3a9d586b463fa4cf2c87e930b6777","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(entries, current, permutation):\n    return [entries[i] for i in permutation]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(['a', 'b', 'c'], 1, [2, 0, 1])),['b', 'c', 'a'])\ncheck('fixture 2',solve(*(['a'], 0, [0])),['a'])\ncheck('fixture 3',solve(*(['a', 'b'], 0, [0, 1])),['a', 'b'])\ncheck('fixture 4',solve(*(['a', 'b', 'c'], 2, [0, 2, 1])),['c', 'a', 'b'])\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":"xmed-shuffle-preserves-playing-head","generated_at":"2026-09-29T14:38:44.988575+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic local media controller stage; metadata and downloaded data are supplied explicitly. No external player, service or codec is required.","root_cause":"Shuffling replaces the playing entry with the first random candidate.","sha256":"a16471b40a3fa307feec54bd85c2e3696425f1f6f586ab316853e6cfd97191d5","title":"Shuffle preserves playing head · case 01","variant":1,"variant_policy":"The five numbered cases rerun the same authored boundary fixtures; they are reproducibility runs, not independent input variants.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.539,"exit_code":1,"observations":[{"actual":["b","c","a","b"],"check":"fixture 1","expected":["b","c","a"],"passed":false},{"actual":["a","a"],"check":"fixture 2","expected":["a"],"passed":false},{"actual":["a","a","b"],"check":"fixture 3","expected":["a","b"],"passed":false},{"actual":["c","a","c","b"],"check":"fixture 4","expected":["c","a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"b\", \"c\", \"a\", \"b\"], \"expected\": [\"b\", \"c\", \"a\"], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [\"a\", \"a\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [\"a\", \"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": [\"c\", \"a\", \"c\", \"b\"], \"expected\": [\"c\", \"a\", \"b\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.623,"exit_code":1,"observations":[{"actual":["c","a","b"],"check":"fixture 1","expected":["b","c","a"],"passed":false},{"actual":["a"],"check":"fixture 2","expected":["a"],"passed":true},{"actual":["a","b"],"check":"fixture 3","expected":["a","b"],"passed":true},{"actual":["a","c","b"],"check":"fixture 4","expected":["c","a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"c\", \"a\", \"b\"], \"expected\": [\"b\", \"c\", \"a\"], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"a\", \"c\", \"b\"], \"expected\": [\"c\", \"a\", \"b\"], \"passed\": false}], \"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."}}