{"abstract":"Erases existing forward history when stepping backward and produces an incorrect media-control or presentation result.","category":"Media playlist lifecycle","checks":6,"contract":"Previous restarts the current item at zero when position_ms is at least threshold; otherwise it pops the most recently played history occurrence and prepends current to forward history. With no past item, restart current. Inputs have nonnegative positions and positive threshold; duplicate history occurrences are meaningful.","contract_signature":"current, position_ms, threshold, history, future","evaluation_group":"xplay-previous-track-history","failed_approach":"The alternative still fails because it collapses repeated playback occurrences in the remaining history.","family":"xplay-previous-track-history-forward-history-erased","id":"FA-11321","implementations":{"attempt":{"sha256":"05eede6dbadf752543d89ccfd5d83ebb72662f99d7f5a4f2fd1a63e1bf2896ea","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(current, position_ms, threshold, history, future):\n    back=list(history); forward=list(future)\n    if position_ms >= threshold:\n        return [current,0,back,forward]\n    if not back: return [current,0,back,forward]\n    previous=back.pop()\n    if current is not None: forward.insert(0,current)\n    return [previous,0,list(dict.fromkeys(back)),forward]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('recent history selected', solve('c', 0, 3000, ['a', 'b'], []), ['b', 0, ['a'], ['c']])\ncheck('restart at exact threshold', solve('c', 3000, 3000, ['a', 'b'], ['d']), ['c', 0, ['a', 'b'], ['d']])\ncheck('forward stack preserves order', solve('c', 100, 3000, ['a', 'b'], ['d', 'e']), ['b', 0, ['a'], ['c', 'd', 'e']])\ncheck('duplicate past retained', solve('c', 0, 3000, ['a', 'a', 'b'], []), ['b', 0, ['a', 'a'], ['c']])\ncheck('no past restarts', solve('a', 0, 3000, [], ['b']), ['a', 0, [], ['b']])\ncheck('absent current not inserted', solve(None, 0, 3000, ['a'], ['b']), ['a', 0, [], ['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":"5eb3c0772e9b413289de5b0e9f77c3a10fe0f9497dfe55e1ecc3ebd323ce1d72","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(current, position_ms, threshold, history, future):\n    back=list(history); forward=list(future)\n    if position_ms >= threshold:\n        return [current,0,back,forward]\n    if not back: return [current,0,back,forward]\n    previous=back.pop()\n    forward=[current] if current is not None else []\n    return [previous,0,back,forward]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('recent history selected', solve('c', 0, 3000, ['a', 'b'], []), ['b', 0, ['a'], ['c']])\ncheck('restart at exact threshold', solve('c', 3000, 3000, ['a', 'b'], ['d']), ['c', 0, ['a', 'b'], ['d']])\ncheck('forward stack preserves order', solve('c', 100, 3000, ['a', 'b'], ['d', 'e']), ['b', 0, ['a'], ['c', 'd', 'e']])\ncheck('duplicate past retained', solve('c', 0, 3000, ['a', 'a', 'b'], []), ['b', 0, ['a', 'a'], ['c']])\ncheck('no past restarts', solve('a', 0, 3000, [], ['b']), ['a', 0, [], ['b']])\ncheck('absent current not inserted', solve(None, 0, 3000, ['a'], ['b']), ['a', 0, [], ['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":"xplay-previous-track-history-forward-history-erased","generated_at":"2026-09-29T14:38:46.873809+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic in-memory media application model with explicit playlist, timeline or synchronization semantics. Does not implement codecs, transport protocols, rendering hardware or concurrent playback.","root_cause":"Erases existing forward history when stepping backward. The fixture suite isolates this decision from network delivery and codec details.","sha256":"921a129692d6db28481add9494aa9403f28b2a46f6867990679b3ab814f54fb3","title":"Previous track history: Erases existing forward history when stepping backward · case 01","variant":1,"variant_policy":"Numbered cases repeat the same authored boundary fixtures as reproducibility runs, not independent input variants.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":38.671,"exit_code":1,"observations":[{"actual":["b",0,["a"],["c"]],"check":"recent history selected","expected":["b",0,["a"],["c"]],"passed":true},{"actual":["c",0,["a","b"],["d"]],"check":"restart at exact threshold","expected":["c",0,["a","b"],["d"]],"passed":true},{"actual":["b",0,["a"],["c","d","e"]],"check":"forward stack preserves order","expected":["b",0,["a"],["c","d","e"]],"passed":true},{"actual":["b",0,["a"],["c"]],"check":"duplicate past retained","expected":["b",0,["a","a"],["c"]],"passed":false},{"actual":["a",0,[],["b"]],"check":"no past restarts","expected":["a",0,[],["b"]],"passed":true},{"actual":["a",0,[],["b"]],"check":"absent current not inserted","expected":["a",0,[],["b"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"recent history selected\", \"actual\": [\"b\", 0, [\"a\"], [\"c\"]], \"expected\": [\"b\", 0, [\"a\"], [\"c\"]], \"passed\": true}, {\"check\": \"restart at exact threshold\", \"actual\": [\"c\", 0, [\"a\", \"b\"], [\"d\"]], \"expected\": [\"c\", 0, [\"a\", \"b\"], [\"d\"]], \"passed\": true}, {\"check\": \"forward stack preserves order\", \"actual\": [\"b\", 0, [\"a\"], [\"c\", \"d\", \"e\"]], \"expected\": [\"b\", 0, [\"a\"], [\"c\", \"d\", \"e\"]], \"passed\": true}, {\"check\": \"duplicate past retained\", \"actual\": [\"b\", 0, [\"a\"], [\"c\"]], \"expected\": [\"b\", 0, [\"a\", \"a\"], [\"c\"]], \"passed\": false}, {\"check\": \"no past restarts\", \"actual\": [\"a\", 0, [], [\"b\"]], \"expected\": [\"a\", 0, [], [\"b\"]], \"passed\": true}, {\"check\": \"absent current not inserted\", \"actual\": [\"a\", 0, [], [\"b\"]], \"expected\": [\"a\", 0, [], [\"b\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.888,"exit_code":1,"observations":[{"actual":["b",0,["a"],["c"]],"check":"recent history selected","expected":["b",0,["a"],["c"]],"passed":true},{"actual":["c",0,["a","b"],["d"]],"check":"restart at exact threshold","expected":["c",0,["a","b"],["d"]],"passed":true},{"actual":["b",0,["a"],["c"]],"check":"forward stack preserves order","expected":["b",0,["a"],["c","d","e"]],"passed":false},{"actual":["b",0,["a","a"],["c"]],"check":"duplicate past retained","expected":["b",0,["a","a"],["c"]],"passed":true},{"actual":["a",0,[],["b"]],"check":"no past restarts","expected":["a",0,[],["b"]],"passed":true},{"actual":["a",0,[],[]],"check":"absent current not inserted","expected":["a",0,[],["b"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"recent history selected\", \"actual\": [\"b\", 0, [\"a\"], [\"c\"]], \"expected\": [\"b\", 0, [\"a\"], [\"c\"]], \"passed\": true}, {\"check\": \"restart at exact threshold\", \"actual\": [\"c\", 0, [\"a\", \"b\"], [\"d\"]], \"expected\": [\"c\", 0, [\"a\", \"b\"], [\"d\"]], \"passed\": true}, {\"check\": \"forward stack preserves order\", \"actual\": [\"b\", 0, [\"a\"], [\"c\"]], \"expected\": [\"b\", 0, [\"a\"], [\"c\", \"d\", \"e\"]], \"passed\": false}, {\"check\": \"duplicate past retained\", \"actual\": [\"b\", 0, [\"a\", \"a\"], [\"c\"]], \"expected\": [\"b\", 0, [\"a\", \"a\"], [\"c\"]], \"passed\": true}, {\"check\": \"no past restarts\", \"actual\": [\"a\", 0, [], [\"b\"]], \"expected\": [\"a\", 0, [], [\"b\"]], \"passed\": true}, {\"check\": \"absent current not inserted\", \"actual\": [\"a\", 0, [], []], \"expected\": [\"a\", 0, [], [\"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."}}