{"abstract":"Inserting before playback shifts the current item but leaves its old numeric index.","category":"Media playlist state","checks":4,"contract":"Entries is nonempty; current is a valid index, insertion position in [0,length]. Insert added entries while keeping the original current entry selected.","contract_signature":"entries, current, position, added","evaluation_group":"xmed-insert-before-preserves-playing-entry","failed_approach":"Increasing the index for every insertion changes playback when insertion is after it.","family":"xmed-insert-before-preserves-playing-entry","id":"FA-11031","implementations":{"attempt":{"sha256":"cf6c7a9e8a3148239d2d4870bd0c8370965d95500310793bb6cb3f9737261bfa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(entries, current, position, added):\n    return [entries[:position]+list(added)+entries[position:],current+len(added)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(['a', 'b'], 1, 0, ['x'])),[['x', 'a', 'b'], 2])\ncheck('fixture 2',solve(*(['a', 'b'], 0, 2, ['x'])),[['a', 'b', 'x'], 0])\ncheck('fixture 3',solve(*(['a'], 0, 0, [])),[['a'], 0])\ncheck('fixture 4',solve(*(['a', 'b'], 1, 1, ['x', 'y'])),[['a', 'x', 'y', 'b'], 3])\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":"736c7ce0d0a41f558ac4d9a10c6da6c0d1f5820c2947d021af8d5b89d235cc9e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(entries, current, position, added):\n    return [entries[:position]+list(added)+entries[position:],current]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(['a', 'b'], 1, 0, ['x'])),[['x', 'a', 'b'], 2])\ncheck('fixture 2',solve(*(['a', 'b'], 0, 2, ['x'])),[['a', 'b', 'x'], 0])\ncheck('fixture 3',solve(*(['a'], 0, 0, [])),[['a'], 0])\ncheck('fixture 4',solve(*(['a', 'b'], 1, 1, ['x', 'y'])),[['a', 'x', 'y', 'b'], 3])\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-insert-before-preserves-playing-entry","generated_at":"2026-09-29T14:38:44.388345+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":"Inserting before playback shifts the current item but leaves its old numeric index.","sha256":"d76d6e6fcc19658ec6678827269333820ed098274a44f14b1a350d1bfe42c573","title":"Insert before preserves playing entry · 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":44.185,"exit_code":1,"observations":[{"actual":[["x","a","b"],2],"check":"fixture 1","expected":[["x","a","b"],2],"passed":true},{"actual":[["a","b","x"],1],"check":"fixture 2","expected":[["a","b","x"],0],"passed":false},{"actual":[["a"],0],"check":"fixture 3","expected":[["a"],0],"passed":true},{"actual":[["a","x","y","b"],3],"check":"fixture 4","expected":[["a","x","y","b"],3],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"x\", \"a\", \"b\"], 2], \"expected\": [[\"x\", \"a\", \"b\"], 2], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"b\", \"x\"], 1], \"expected\": [[\"a\", \"b\", \"x\"], 0], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [[\"a\"], 0], \"expected\": [[\"a\"], 0], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"a\", \"x\", \"y\", \"b\"], 3], \"expected\": [[\"a\", \"x\", \"y\", \"b\"], 3], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.363,"exit_code":1,"observations":[{"actual":[["x","a","b"],1],"check":"fixture 1","expected":[["x","a","b"],2],"passed":false},{"actual":[["a","b","x"],0],"check":"fixture 2","expected":[["a","b","x"],0],"passed":true},{"actual":[["a"],0],"check":"fixture 3","expected":[["a"],0],"passed":true},{"actual":[["a","x","y","b"],1],"check":"fixture 4","expected":[["a","x","y","b"],3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"x\", \"a\", \"b\"], 1], \"expected\": [[\"x\", \"a\", \"b\"], 2], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"b\", \"x\"], 0], \"expected\": [[\"a\", \"b\", \"x\"], 0], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[\"a\"], 0], \"expected\": [[\"a\"], 0], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"a\", \"x\", \"y\", \"b\"], 1], \"expected\": [[\"a\", \"x\", \"y\", \"b\"], 3], \"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."}}