{"abstract":"Appends the displaced current item after existing forward history 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.","evaluation_group":"xplay-previous-track-history","failed_approach":"The alternative still fails because it erases existing forward history when stepping backward.","family":"xplay-previous-track-history-forward-history-appended","id":"FA-11316","implementations":{"attempt":{"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"},"broken":{"sha256":"597a5da3e9b6d17faf85aa853e36b5567d03e9c38d0697bc78b87ac6d6493e76","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.append(current)\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"},"fixed":{"sha256":"9e77392382e214e4dbf5348c16cf086c9897be742885fcc3e91e1524107b25b5","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,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-appended","generated_at":"2026-09-29T14:38:46.835112+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.","repair":"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.","root_cause":"Appends the displaced current item after existing forward history. The fixture suite isolates this decision from network delivery and codec details.","sha256":"38b6c9cdab764cc9bf07cfcac5ec5f821f1d3221c4ad1fec7375cb19fc2d4007","title":"Previous track history: Appends the displaced current item after existing forward history · case 01","variant":1,"variant_policy":"Numbered cases repeat the same authored boundary fixtures as reproducibility runs, not independent input variants.","verification":{"attempt":{"elapsed_ms":37.533,"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"},"broken":{"elapsed_ms":37.347,"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"],["d","e","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,[],["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\"], [\"d\", \"e\", \"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, [], [\"b\"]], \"expected\": [\"a\", 0, [], [\"b\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.827,"exit_code":0,"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","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,[],["b"]],"check":"absent current not inserted","expected":["a",0,[],["b"]],"passed":true}],"passed":true,"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\", \"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, [], [\"b\"]], \"expected\": [\"a\", 0, [], [\"b\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}