{"abstract":"Replace adds a history entry instead of updating current.","category":"Client navigation","checks":9,"contract":"Push truncates forward history and selects the new entry; replace retains stack length; back and forward clamp to existing entries; reload leaves history intact.","contract_signature":"entries, index, action, url","evaluation_group":"xi-navigation-history","failed_approach":"Replacing the entire list destroys back history.","family":"xi-navigation-history-replace","id":"FA-8066","implementations":{"attempt":{"sha256":"d5c4852f03e9c3c9223dcc3986db9d02fab71c07f986832d69c5a25c50c4a48e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, index, action, url):\n    entries = list(entries)\n    if action == 'push': return (entries[:index+1] + [url], index+1)\n    if action == 'replace': entries = [url]\n    elif action == 'back': index = max(0, index-1)\n    elif action == 'forward': index = min(len(entries)-1, index+1)\n    elif action == 'reload': return (entries, index)\n    return (entries, index)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('branch', solve(['a','b','c'], 1, 'push', 'x'), (['a', 'b', 'x'], 2))\ncheck('replace', solve(['a','b','c'], 1, 'replace', 'x'), (['a', 'x', 'c'], 1))\ncheck('first back', solve(['a','b'], 0, 'back', None), (['a', 'b'], 0))\ncheck('back', solve(['a','b'], 1, 'back', None), (['a', 'b'], 0))\ncheck('last forward', solve(['a','b'], 1, 'forward', None), (['a', 'b'], 1))\ncheck('forward', solve(['a','b'], 0, 'forward', None), (['a', 'b'], 1))\ncheck('reload', solve(['a','b'], 1, 'reload', None), (['a', 'b'], 1))\ncheck('parameterized push depth', solve(list(range(N+1)), N, 'push', N+1), (list(range(N+2)), N+1))\nfor repetition in range(N):\n    check('repeat reload', solve(['a','b'], 1, 'reload', None), (['a', 'b'], 1))\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":"cf27dd5fa56633b8a7fc7b0e192e3e22962a455c02d7777e7f9c5b2555cab14b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entries, index, action, url):\n    entries = list(entries)\n    if action == 'push': return (entries[:index+1] + [url], index+1)\n    if action == 'replace': entries.append(url)\n    elif action == 'back': index = max(0, index-1)\n    elif action == 'forward': index = min(len(entries)-1, index+1)\n    elif action == 'reload': return (entries, index)\n    return (entries, index)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('branch', solve(['a','b','c'], 1, 'push', 'x'), (['a', 'b', 'x'], 2))\ncheck('replace', solve(['a','b','c'], 1, 'replace', 'x'), (['a', 'x', 'c'], 1))\ncheck('first back', solve(['a','b'], 0, 'back', None), (['a', 'b'], 0))\ncheck('back', solve(['a','b'], 1, 'back', None), (['a', 'b'], 0))\ncheck('last forward', solve(['a','b'], 1, 'forward', None), (['a', 'b'], 1))\ncheck('forward', solve(['a','b'], 0, 'forward', None), (['a', 'b'], 1))\ncheck('reload', solve(['a','b'], 1, 'reload', None), (['a', 'b'], 1))\ncheck('parameterized push depth', solve(list(range(N+1)), N, 'push', N+1), (list(range(N+2)), N+1))\nfor repetition in range(N):\n    check('repeat reload', solve(['a','b'], 1, 'reload', None), (['a', 'b'], 1))\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":"xi-navigation-history-replace","generated_at":"2026-09-29T14:38:18.055582+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of browser-style history transitions; this isolates one interface invariant without requiring a browser.","root_cause":"The replace operation uses `entries.append(url)` where the contract requires `entries[index] = url`.","sha256":"c4b1d538d1f28fb63741f4b47de1e18e7573fda592ffb9253a43f331d3ad4797","title":"Browser-style history transitions: Replace adds a history entry instead of updating current · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.478,"exit_code":1,"observations":[{"actual":[["a","b","x"],2],"check":"branch","expected":[["a","b","x"],2],"passed":true},{"actual":[["x"],1],"check":"replace","expected":[["a","x","c"],1],"passed":false},{"actual":[["a","b"],0],"check":"first back","expected":[["a","b"],0],"passed":true},{"actual":[["a","b"],0],"check":"back","expected":[["a","b"],0],"passed":true},{"actual":[["a","b"],1],"check":"last forward","expected":[["a","b"],1],"passed":true},{"actual":[["a","b"],1],"check":"forward","expected":[["a","b"],1],"passed":true},{"actual":[["a","b"],1],"check":"reload","expected":[["a","b"],1],"passed":true},{"actual":[[0,1,2],2],"check":"parameterized push depth","expected":[[0,1,2],2],"passed":true},{"actual":[["a","b"],1],"check":"repeat reload","expected":[["a","b"],1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"branch\", \"actual\": [[\"a\", \"b\", \"x\"], 2], \"expected\": [[\"a\", \"b\", \"x\"], 2], \"passed\": true}, {\"check\": \"replace\", \"actual\": [[\"x\"], 1], \"expected\": [[\"a\", \"x\", \"c\"], 1], \"passed\": false}, {\"check\": \"first back\", \"actual\": [[\"a\", \"b\"], 0], \"expected\": [[\"a\", \"b\"], 0], \"passed\": true}, {\"check\": \"back\", \"actual\": [[\"a\", \"b\"], 0], \"expected\": [[\"a\", \"b\"], 0], \"passed\": true}, {\"check\": \"last forward\", \"actual\": [[\"a\", \"b\"], 1], \"expected\": [[\"a\", \"b\"], 1], \"passed\": true}, {\"check\": \"forward\", \"actual\": [[\"a\", \"b\"], 1], \"expected\": [[\"a\", \"b\"], 1], \"passed\": true}, {\"check\": \"reload\", \"actual\": [[\"a\", \"b\"], 1], \"expected\": [[\"a\", \"b\"], 1], \"passed\": true}, {\"check\": \"parameterized push depth\", \"actual\": [[0, 1, 2], 2], \"expected\": [[0, 1, 2], 2], \"passed\": true}, {\"check\": \"repeat reload\", \"actual\": [[\"a\", \"b\"], 1], \"expected\": [[\"a\", \"b\"], 1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.413,"exit_code":1,"observations":[{"actual":[["a","b","x"],2],"check":"branch","expected":[["a","b","x"],2],"passed":true},{"actual":[["a","b","c","x"],1],"check":"replace","expected":[["a","x","c"],1],"passed":false},{"actual":[["a","b"],0],"check":"first back","expected":[["a","b"],0],"passed":true},{"actual":[["a","b"],0],"check":"back","expected":[["a","b"],0],"passed":true},{"actual":[["a","b"],1],"check":"last forward","expected":[["a","b"],1],"passed":true},{"actual":[["a","b"],1],"check":"forward","expected":[["a","b"],1],"passed":true},{"actual":[["a","b"],1],"check":"reload","expected":[["a","b"],1],"passed":true},{"actual":[[0,1,2],2],"check":"parameterized push depth","expected":[[0,1,2],2],"passed":true},{"actual":[["a","b"],1],"check":"repeat reload","expected":[["a","b"],1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"branch\", \"actual\": [[\"a\", \"b\", \"x\"], 2], \"expected\": [[\"a\", \"b\", \"x\"], 2], \"passed\": true}, {\"check\": \"replace\", \"actual\": [[\"a\", \"b\", \"c\", \"x\"], 1], \"expected\": [[\"a\", \"x\", \"c\"], 1], \"passed\": false}, {\"check\": \"first back\", \"actual\": [[\"a\", \"b\"], 0], \"expected\": [[\"a\", \"b\"], 0], \"passed\": true}, {\"check\": \"back\", \"actual\": [[\"a\", \"b\"], 0], \"expected\": [[\"a\", \"b\"], 0], \"passed\": true}, {\"check\": \"last forward\", \"actual\": [[\"a\", \"b\"], 1], \"expected\": [[\"a\", \"b\"], 1], \"passed\": true}, {\"check\": \"forward\", \"actual\": [[\"a\", \"b\"], 1], \"expected\": [[\"a\", \"b\"], 1], \"passed\": true}, {\"check\": \"reload\", \"actual\": [[\"a\", \"b\"], 1], \"expected\": [[\"a\", \"b\"], 1], \"passed\": true}, {\"check\": \"parameterized push depth\", \"actual\": [[0, 1, 2], 2], \"expected\": [[0, 1, 2], 2], \"passed\": true}, {\"check\": \"repeat reload\", \"actual\": [[\"a\", \"b\"], 1], \"expected\": [[\"a\", \"b\"], 1], \"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."}}