{"abstract":"Unchanged input creates an undo record.","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":"Ignoring changed inputs prevents recording edits.","family":"xi-undo-grouping-noop","id":"FA-9031","implementations":{"attempt":{"sha256":"aa59cddf4304d2c1bcbfa550f7d3dfecf549d2f97c54fb9d954e4c2909cc4b36","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 not 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":"4fcbe0caf2a598cac6a91de48a52bceb93057556e70077be9b2dd226bb370563","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 False: return history\n    merge = bool(history) and kind == 'insert' and previous_kind == kind and previous_caret == caret and not 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"}},"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-noop","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 noop operation uses `if False: return history` where the contract requires `if before == after: return history`.","sha256":"947dd74a4ffdc4a28f45c67712b706caf946c8f72cd00b85849d1b4e01da455c","title":"Adjacent typing undo coalescing: Unchanged input creates an undo record · 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.974,"exit_code":1,"observations":[{"actual":[["a","ab"]],"check":"noop","expected":[["a","ab"]],"passed":true},{"actual":[["a","a"]],"check":"empty noop","expected":[],"passed":false},{"actual":[["abcd","abc"]],"check":"delete","expected":[["abcd","abc"],["abc","ab"]],"passed":false},{"actual":[["a","ab"]],"check":"contiguous","expected":[["a","abc"]],"passed":false},{"actual":[["a","ab"]],"check":"moved caret","expected":[["a","ab"],["ab","axb"]],"passed":false},{"actual":[["a","ab"]],"check":"boundary","expected":[["a","ab"],["ab","abc"]],"passed":false},{"actual":[],"check":"empty","expected":[["","a"]],"passed":false},{"actual":[],"check":"parameterized inserted length","expected":[["","a"]],"passed":false},{"actual":[],"check":"repeat empty","expected":[["","a"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"noop\", \"actual\": [[\"a\", \"ab\"]], \"expected\": [[\"a\", \"ab\"]], \"passed\": true}, {\"check\": \"empty noop\", \"actual\": [[\"a\", \"a\"]], \"expected\": [], \"passed\": false}, {\"check\": \"delete\", \"actual\": [[\"abcd\", \"abc\"]], \"expected\": [[\"abcd\", \"abc\"], [\"abc\", \"ab\"]], \"passed\": false}, {\"check\": \"contiguous\", \"actual\": [[\"a\", \"ab\"]], \"expected\": [[\"a\", \"abc\"]], \"passed\": false}, {\"check\": \"moved caret\", \"actual\": [[\"a\", \"ab\"]], \"expected\": [[\"a\", \"ab\"], [\"ab\", \"axb\"]], \"passed\": false}, {\"check\": \"boundary\", \"actual\": [[\"a\", \"ab\"]], \"expected\": [[\"a\", \"ab\"], [\"ab\", \"abc\"]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [[\"\", \"a\"]], \"passed\": false}, {\"check\": \"parameterized inserted length\", \"actual\": [], \"expected\": [[\"\", \"a\"]], \"passed\": false}, {\"check\": \"repeat empty\", \"actual\": [], \"expected\": [[\"\", \"a\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.332,"exit_code":1,"observations":[{"actual":[["a","ab"]],"check":"noop","expected":[["a","ab"]],"passed":true},{"actual":[["a","a"]],"check":"empty noop","expected":[],"passed":false},{"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","ab"],["ab","abc"]],"check":"boundary","expected":[["a","ab"],["ab","abc"]],"passed":true},{"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\": [[\"a\", \"a\"]], \"expected\": [], \"passed\": false}, {\"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\", \"ab\"], [\"ab\", \"abc\"]], \"expected\": [[\"a\", \"ab\"], [\"ab\", \"abc\"]], \"passed\": true}, {\"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."}}