{"abstract":"Returning the newest history item without removing it traps repeated back operations.","category":"Media playlist state","checks":4,"contract":"History is oldest-to-newest played entry IDs. Back consumes the newest history item as current; empty history retains current.","contract_signature":"history, current","evaluation_group":"xmed-history-back-consumes-last-entry","failed_approach":"Queue-style removal chooses the oldest history instead of the most recent.","family":"xmed-history-back-consumes-last-entry","id":"FA-11081","implementations":{"attempt":{"sha256":"70febb9547d0a223c619de343c0821c029eef5c362f30a7c06279e93ea855b5c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(history, current):\n    return [history[1:],history[0]] if history else [[],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')),[['a'], 'b'])\ncheck('fixture 2',solve(*(['a'], 'b')),[[], 'a'])\ncheck('fixture 3',solve(*([], 'a')),[[], 'a'])\ncheck('fixture 4',solve(*(['a', 'b', 'c'], 'd')),[['a', 'b'], 'c'])\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":"73f6c8d926ec2c70bf835ccebb6ae12f312835709cc8613fa47efe2118bc1299","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(history, current):\n    return [list(history),history[-1]] if history else [[],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')),[['a'], 'b'])\ncheck('fixture 2',solve(*(['a'], 'b')),[[], 'a'])\ncheck('fixture 3',solve(*([], 'a')),[[], 'a'])\ncheck('fixture 4',solve(*(['a', 'b', 'c'], 'd')),[['a', 'b'], 'c'])\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-history-back-consumes-last-entry","generated_at":"2026-09-29T14:38:44.829426+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":"Returning the newest history item without removing it traps repeated back operations.","sha256":"8b18fc0ca44f41cd60b3b2e9b6ee79ef58f3589f7dc12139075fc1bf26052ddd","title":"History back consumes last 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":38.855,"exit_code":1,"observations":[{"actual":[["b"],"a"],"check":"fixture 1","expected":[["a"],"b"],"passed":false},{"actual":[[],"a"],"check":"fixture 2","expected":[[],"a"],"passed":true},{"actual":[[],"a"],"check":"fixture 3","expected":[[],"a"],"passed":true},{"actual":[["b","c"],"a"],"check":"fixture 4","expected":[["a","b"],"c"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"b\"], \"a\"], \"expected\": [[\"a\"], \"b\"], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[], \"a\"], \"expected\": [[], \"a\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[], \"a\"], \"expected\": [[], \"a\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"b\", \"c\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"c\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.597,"exit_code":1,"observations":[{"actual":[["a","b"],"b"],"check":"fixture 1","expected":[["a"],"b"],"passed":false},{"actual":[["a"],"a"],"check":"fixture 2","expected":[[],"a"],"passed":false},{"actual":[[],"a"],"check":"fixture 3","expected":[[],"a"],"passed":true},{"actual":[["a","b","c"],"c"],"check":"fixture 4","expected":[["a","b"],"c"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"a\", \"b\"], \"b\"], \"expected\": [[\"a\"], \"b\"], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[\"a\"], \"a\"], \"expected\": [[], \"a\"], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [[], \"a\"], \"expected\": [[], \"a\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"a\", \"b\", \"c\"], \"c\"], \"expected\": [[\"a\", \"b\"], \"c\"], \"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."}}