{"abstract":"Explicit undo boundaries fail to split typing groups.","category":"Undo and history","checks":9,"contract":"Only contiguous insertion edits without explicit boundary coalesce; preserve the first before-state and newest after-state; no-op input creates no history.","contract_signature":"history, before, after, previous_kind, kind, previous_caret, caret, boundary","evaluation_group":"xi-undo-grouping","failed_approach":"Reversing the flag merges exactly where a split was requested.","family":"xi-undo-grouping-boundary","id":"FA-9046","implementations":{"attempt":{"sha256":"0c84b6b6beb60a54fa802f828c75a8ee71f665a39459fb231ddb73f0828221fd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(history, before, after, previous_kind, kind, previous_caret, caret, boundary):\n    history = list(history)\n    if before == after: return history\n    merge = bool(history) and kind == 'insert' and previous_kind == kind and previous_caret == caret and boundary\n    if merge: history[-1] = (history[-1][0], after)\n    else: history.append((before, after))\n    return history\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('noop', solve([('a','ab')], 'ab', 'ab', 'insert', 'insert', 2, 2, False), [('a', 'ab')])\ncheck('empty noop', solve([], 'a', 'a', None, 'insert', None, 1, False), [])\ncheck('delete', solve([('abcd','abc')], 'abc', 'ab', 'delete', 'delete', 3, 3, False), [('abcd', 'abc'), ('abc', 'ab')])\ncheck('contiguous', solve([('a','ab')], 'ab', 'abc', 'insert', 'insert', 2, 2, False), [('a', 'abc')])\ncheck('moved caret', solve([('a','ab')], 'ab', 'axb', 'insert', 'insert', 2, 1, False), [('a', 'ab'), ('ab', 'axb')])\ncheck('boundary', solve([('a','ab')], 'ab', 'abc', 'insert', 'insert', 2, 2, True), [('a', 'ab'), ('ab', 'abc')])\ncheck('empty', solve([], '', 'a', None, 'insert', None, 0, False), [('', 'a')])\ncheck('parameterized inserted length', solve([], '', 'a'*N, None, 'insert', None, 0, False), [('', 'a'*N)])\nfor repetition in range(N):\n    check('repeat empty', solve([], '', 'a', None, 'insert', None, 0, False), [('', 'a')])\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":"d5e48653781537efb1d23df42d02c4a68ef7a9f1ffd12406207e3e6e7ec28df2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(history, before, after, previous_kind, kind, previous_caret, caret, boundary):\n    history = list(history)\n    if before == after: return history\n    merge = bool(history) and kind == 'insert' and previous_kind == kind and previous_caret == caret \n    if merge: history[-1] = (history[-1][0], after)\n    else: history.append((before, after))\n    return history\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('noop', solve([('a','ab')], 'ab', 'ab', 'insert', 'insert', 2, 2, False), [('a', 'ab')])\ncheck('empty noop', solve([], 'a', 'a', None, 'insert', None, 1, False), [])\ncheck('delete', solve([('abcd','abc')], 'abc', 'ab', 'delete', 'delete', 3, 3, False), [('abcd', 'abc'), ('abc', 'ab')])\ncheck('contiguous', solve([('a','ab')], 'ab', 'abc', 'insert', 'insert', 2, 2, False), [('a', 'abc')])\ncheck('moved caret', solve([('a','ab')], 'ab', 'axb', 'insert', 'insert', 2, 1, False), [('a', 'ab'), ('ab', 'axb')])\ncheck('boundary', solve([('a','ab')], 'ab', 'abc', 'insert', 'insert', 2, 2, True), [('a', 'ab'), ('ab', 'abc')])\ncheck('empty', solve([], '', 'a', None, 'insert', None, 0, False), [('', 'a')])\ncheck('parameterized inserted length', solve([], '', 'a'*N, None, 'insert', None, 0, False), [('', 'a'*N)])\nfor repetition in range(N):\n    check('repeat empty', solve([], '', 'a', None, 'insert', None, 0, False), [('', 'a')])\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-undo-grouping-boundary","generated_at":"2026-09-29T14:38:26.700667+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of adjacent typing undo coalescing; this isolates one interface invariant without requiring a browser.","root_cause":"The boundary operation uses `` where the contract requires `and not boundary`.","sha256":"fae769d71a811b748146db48f59be9f219147ad70ec6d6ac95ca50cea5ed0d3f","title":"Adjacent typing undo coalescing: Explicit undo boundaries fail to split typing groups · 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":39.825,"exit_code":1,"observations":[{"actual":[["a","ab"]],"check":"noop","expected":[["a","ab"]],"passed":true},{"actual":[],"check":"empty noop","expected":[],"passed":true},{"actual":[["abcd","abc"],["abc","ab"]],"check":"delete","expected":[["abcd","abc"],["abc","ab"]],"passed":true},{"actual":[["a","ab"],["ab","abc"]],"check":"contiguous","expected":[["a","abc"]],"passed":false},{"actual":[["a","ab"],["ab","axb"]],"check":"moved caret","expected":[["a","ab"],["ab","axb"]],"passed":true},{"actual":[["a","abc"]],"check":"boundary","expected":[["a","ab"],["ab","abc"]],"passed":false},{"actual":[["","a"]],"check":"empty","expected":[["","a"]],"passed":true},{"actual":[["","a"]],"check":"parameterized inserted length","expected":[["","a"]],"passed":true},{"actual":[["","a"]],"check":"repeat empty","expected":[["","a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"noop\", \"actual\": [[\"a\", \"ab\"]], \"expected\": [[\"a\", \"ab\"]], \"passed\": true}, {\"check\": \"empty noop\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"delete\", \"actual\": [[\"abcd\", \"abc\"], [\"abc\", \"ab\"]], \"expected\": [[\"abcd\", \"abc\"], [\"abc\", \"ab\"]], \"passed\": true}, {\"check\": \"contiguous\", \"actual\": [[\"a\", \"ab\"], [\"ab\", \"abc\"]], \"expected\": [[\"a\", \"abc\"]], \"passed\": false}, {\"check\": \"moved caret\", \"actual\": [[\"a\", \"ab\"], [\"ab\", \"axb\"]], \"expected\": [[\"a\", \"ab\"], [\"ab\", \"axb\"]], \"passed\": true}, {\"check\": \"boundary\", \"actual\": [[\"a\", \"abc\"]], \"expected\": [[\"a\", \"ab\"], [\"ab\", \"abc\"]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[\"\", \"a\"]], \"expected\": [[\"\", \"a\"]], \"passed\": true}, {\"check\": \"parameterized inserted length\", \"actual\": [[\"\", \"a\"]], \"expected\": [[\"\", \"a\"]], \"passed\": true}, {\"check\": \"repeat empty\", \"actual\": [[\"\", \"a\"]], \"expected\": [[\"\", \"a\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.042,"exit_code":1,"observations":[{"actual":[["a","ab"]],"check":"noop","expected":[["a","ab"]],"passed":true},{"actual":[],"check":"empty noop","expected":[],"passed":true},{"actual":[["abcd","abc"],["abc","ab"]],"check":"delete","expected":[["abcd","abc"],["abc","ab"]],"passed":true},{"actual":[["a","abc"]],"check":"contiguous","expected":[["a","abc"]],"passed":true},{"actual":[["a","ab"],["ab","axb"]],"check":"moved caret","expected":[["a","ab"],["ab","axb"]],"passed":true},{"actual":[["a","abc"]],"check":"boundary","expected":[["a","ab"],["ab","abc"]],"passed":false},{"actual":[["","a"]],"check":"empty","expected":[["","a"]],"passed":true},{"actual":[["","a"]],"check":"parameterized inserted length","expected":[["","a"]],"passed":true},{"actual":[["","a"]],"check":"repeat empty","expected":[["","a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"noop\", \"actual\": [[\"a\", \"ab\"]], \"expected\": [[\"a\", \"ab\"]], \"passed\": true}, {\"check\": \"empty noop\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"delete\", \"actual\": [[\"abcd\", \"abc\"], [\"abc\", \"ab\"]], \"expected\": [[\"abcd\", \"abc\"], [\"abc\", \"ab\"]], \"passed\": true}, {\"check\": \"contiguous\", \"actual\": [[\"a\", \"abc\"]], \"expected\": [[\"a\", \"abc\"]], \"passed\": true}, {\"check\": \"moved caret\", \"actual\": [[\"a\", \"ab\"], [\"ab\", \"axb\"]], \"expected\": [[\"a\", \"ab\"], [\"ab\", \"axb\"]], \"passed\": true}, {\"check\": \"boundary\", \"actual\": [[\"a\", \"abc\"]], \"expected\": [[\"a\", \"ab\"], [\"ab\", \"abc\"]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[\"\", \"a\"]], \"expected\": [[\"\", \"a\"]], \"passed\": true}, {\"check\": \"parameterized inserted length\", \"actual\": [[\"\", \"a\"]], \"expected\": [[\"\", \"a\"]], \"passed\": true}, {\"check\": \"repeat empty\", \"actual\": [[\"\", \"a\"]], \"expected\": [[\"\", \"a\"]], \"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."}}