{"abstract":"Navigates backward at the exact restart threshold 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 appends the displaced current item after existing forward history.","family":"xplay-previous-track-history-restart-threshold-strict","id":"FA-11311","implementations":{"attempt":{"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"},"broken":{"sha256":"92706a8e430a2070cf9bc909594199d7ee5b8d886fe20a070bc5259ddd78233b","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-restart-threshold-strict","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":"Navigates backward at the exact restart threshold. The fixture suite isolates this decision from network delivery and codec details.","sha256":"42a0c1cf71bf0e01dafb5193067896433ff0c106ec928d88ca19e2d971b83ef2","title":"Previous track history: Navigates backward at the exact restart threshold · 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":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"},"broken":{"elapsed_ms":39.623,"exit_code":1,"observations":[{"actual":["b",0,["a"],["c"]],"check":"recent history selected","expected":["b",0,["a"],["c"]],"passed":true},{"actual":["b",0,["a"],["c","d"]],"check":"restart at exact threshold","expected":["c",0,["a","b"],["d"]],"passed":false},{"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":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\": [\"b\", 0, [\"a\"], [\"c\", \"d\"]], \"expected\": [\"c\", 0, [\"a\", \"b\"], [\"d\"]], \"passed\": false}, {\"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\": 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."}}