{"abstract":"Deleting the last or only playing item retains an out-of-range selection.","category":"Media playlist state","checks":4,"contract":"Remove the valid playing index. Select its old successor when present, otherwise its predecessor; empty result has None selection.","contract_signature":"entries, current","evaluation_group":"xmed-remove-playing-selects-successor","failed_approach":"Always selecting the predecessor skips a valid successor and loses selection when deleting the first item.","family":"xmed-remove-playing-selects-successor","id":"FA-11041","implementations":{"attempt":{"sha256":"d170c9d93cc90a05109ddc6e0795d113dbfaa457eedd481870d397a1d9c806b2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(entries, current):\n    return [entries[:current]+entries[current+1:],current-1 if current else None]\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)),[['a', 'c'], 1])\ncheck('fixture 2',solve(*(['a', 'b', 'c'], 2)),[['a', 'b'], 1])\ncheck('fixture 3',solve(*(['a'], 0)),[[], None])\ncheck('fixture 4',solve(*(['a', 'b'], 0)),[['b'], 0])\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":"f496d6f08609b18f034f05fab4df3360946d87f945ffa4084c88b2d493dae6da","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(entries, current):\n    return [entries[:current]+entries[current+1:],current]\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)),[['a', 'c'], 1])\ncheck('fixture 2',solve(*(['a', 'b', 'c'], 2)),[['a', 'b'], 1])\ncheck('fixture 3',solve(*(['a'], 0)),[[], None])\ncheck('fixture 4',solve(*(['a', 'b'], 0)),[['b'], 0])\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-remove-playing-selects-successor","generated_at":"2026-09-29T14:38:44.384193+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":"Deleting the last or only playing item retains an out-of-range selection.","sha256":"9e4f6da949135452906ca0a0230dd482767bd4165632150b952c948a3359bd1b","title":"Remove playing selects successor · 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.511,"exit_code":1,"observations":[{"actual":[["a","c"],0],"check":"fixture 1","expected":[["a","c"],1],"passed":false},{"actual":[["a","b"],1],"check":"fixture 2","expected":[["a","b"],1],"passed":true},{"actual":[[],null],"check":"fixture 3","expected":[[],null],"passed":true},{"actual":[["b"],null],"check":"fixture 4","expected":[["b"],0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"a\", \"c\"], 0], \"expected\": [[\"a\", \"c\"], 1], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"b\"], 1], \"expected\": [[\"a\", \"b\"], 1], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[], null], \"expected\": [[], null], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"b\"], null], \"expected\": [[\"b\"], 0], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.981,"exit_code":1,"observations":[{"actual":[["a","c"],1],"check":"fixture 1","expected":[["a","c"],1],"passed":true},{"actual":[["a","b"],2],"check":"fixture 2","expected":[["a","b"],1],"passed":false},{"actual":[[],0],"check":"fixture 3","expected":[[],null],"passed":false},{"actual":[["b"],0],"check":"fixture 4","expected":[["b"],0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"a\", \"c\"], 1], \"expected\": [[\"a\", \"c\"], 1], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"b\"], 2], \"expected\": [[\"a\", \"b\"], 1], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [[], 0], \"expected\": [[], null], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": [[\"b\"], 0], \"expected\": [[\"b\"], 0], \"passed\": true}], \"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."}}