FA-30896 / Keyboard interactions / Open access
Composition transaction ownership: Starting a composition fails to replace the previous preedit · case 01
The event trace violates the start preedit rule and produces incorrect keyboard state or command output.
ROOT CAUSE
Starting a composition fails to replace the previous preedit.
THE FAILURE
Starting a composition fails to replace the previous preedit.
Unsuccessful approach: The partial repair changes this transition to preedit+=text elif, which still violates the model contract on the explicit regression traces.
Case contract
Events [kind,owner,text]. Start replaces active preedit, update applies only to active owner, commit appends supplied text once for active owner and closes, cancel closes matching owner without committing, focus switches cancel old owner. Return committed strings, active owner and preedit. Inputs are finite ordered event traces; return the stated deterministic state. Batch entries are independent. N varies the number of independent input transactions.
Why this case matters
Controlled keyboard event processing model for debugging application event logic.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cases):
def run(c):
owner=None; preedit=''; committed=[]; updates=0
for kind,target,text in c:
if kind=='start':
owner=target
preedit=""
elif kind=='update' and target==owner:
preedit=text
updates+=1
elif kind=='commit' and target==owner and owner is not None:
committed.append(text)
owner=None
preedit=''
elif kind=='cancel' and target==owner:
owner=None; preedit=''
elif kind=='focus' and target!=owner:
owner=None; preedit=''
return [committed,owner,preedit,updates]
return [run(c) for c in cases]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('composition-transaction scenario 0', solve([[]] * N), [[[], None, '', 0]] * N)
check('composition-transaction scenario 1', solve([[['start', 'a', 'x'], ['update', 'a', 'xy'], ['update', 'a', 'xyz']]] * N), [[[], 'a', 'xyz', 2]] * N)
check('composition-transaction scenario 2', solve([[['start', 'a', 'x'], ['start', 'b', 'b']]] * N), [[[], 'b', 'b', 0]] * N)
check('composition-transaction scenario 3', solve([[['start', 'a', 'x'], ['update', 'b', 'oops']]] * N), [[[], 'a', 'x', 0]] * N)
check('composition-transaction scenario 4', solve([[['start', 'a', 'x'], ['commit', 'a', 'word'], ['commit', 'a', 'word']]] * N), [[['word'], None, '', 0]] * N)
check('composition-transaction scenario 5', solve([[['commit', 'x', 'orphan']]] * N), [[[], None, '', 0]] * N)
check('composition-transaction scenario 6', solve([[['start', 'a', 'x'], ['commit', 'b', 'bad']]] * N), [[[], 'a', 'x', 0]] * N)
check('composition-transaction scenario 7', solve([[['start', 'a', 'x'], ['cancel', 'b', '']]] * N), [[[], 'a', 'x', 0]] * N)
check('composition-transaction scenario 8', solve([[['start', 'a', 'x'], ['cancel', 'a', '']]] * N), [[[], None, '', 0]] * N)
check('composition-transaction scenario 9', solve([[['start', 'a', 'x'], ['focus', 'b', '']]] * N), [[[], None, '', 0]] * N)
check('composition-transaction scenario 10', solve([[['start', 'a', 'x'], ['focus', 'a', '']]] * N), [[[], 'a', 'x', 0]] * N)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| composition-transaction scenario 0 | [[[], None, '', 0]] | [[[], None, '', 0]] | Passed |
| composition-transaction scenario 1 | [[[], 'a', 'xyz', 2]] | [[[], 'a', 'xyz', 2]] | Passed |
| composition-transaction scenario 2 | [[[], 'b', '', 0]] | [[[], 'b', 'b', 0]] | Failed |
| composition-transaction scenario 3 | [[[], 'a', '', 0]] | [[[], 'a', 'x', 0]] | Failed |
| composition-transaction scenario 4 | [[['word'], None, '', 0]] | [[['word'], None, '', 0]] | Passed |
| composition-transaction scenario 5 | [[[], None, '', 0]] | [[[], None, '', 0]] | Passed |
| composition-transaction scenario 6 | [[[], 'a', '', 0]] | [[[], 'a', 'x', 0]] | Failed |
| composition-transaction scenario 7 | [[[], 'a', '', 0]] | [[[], 'a', 'x', 0]] | Failed |
| composition-transaction scenario 8 | [[[], None, '', 0]] | [[[], None, '', 0]] | Passed |
| composition-transaction scenario 9 | [[[], None, '', 0]] | [[[], None, '', 0]] | Passed |
| composition-transaction scenario 10 | [[[], 'a', '', 0]] | [[[], 'a', 'x', 0]] | Failed |
SHA-256 / 6bc0ba9ec7437240161c3c27adbf1a5ad2f29764985d3020b10cb7ad9d53e46b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cases):
def run(c):
owner=None; preedit=''; committed=[]; updates=0
for kind,target,text in c:
if kind=='start':
owner=target
preedit+=text
elif kind=='update' and target==owner:
preedit=text
updates+=1
elif kind=='commit' and target==owner and owner is not None:
committed.append(text)
owner=None
preedit=''
elif kind=='cancel' and target==owner:
owner=None; preedit=''
elif kind=='focus' and target!=owner:
owner=None; preedit=''
return [committed,owner,preedit,updates]
return [run(c) for c in cases]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('composition-transaction scenario 0', solve([[]] * N), [[[], None, '', 0]] * N)
check('composition-transaction scenario 1', solve([[['start', 'a', 'x'], ['update', 'a', 'xy'], ['update', 'a', 'xyz']]] * N), [[[], 'a', 'xyz', 2]] * N)
check('composition-transaction scenario 2', solve([[['start', 'a', 'x'], ['start', 'b', 'b']]] * N), [[[], 'b', 'b', 0]] * N)
check('composition-transaction scenario 3', solve([[['start', 'a', 'x'], ['update', 'b', 'oops']]] * N), [[[], 'a', 'x', 0]] * N)
check('composition-transaction scenario 4', solve([[['start', 'a', 'x'], ['commit', 'a', 'word'], ['commit', 'a', 'word']]] * N), [[['word'], None, '', 0]] * N)
check('composition-transaction scenario 5', solve([[['commit', 'x', 'orphan']]] * N), [[[], None, '', 0]] * N)
check('composition-transaction scenario 6', solve([[['start', 'a', 'x'], ['commit', 'b', 'bad']]] * N), [[[], 'a', 'x', 0]] * N)
check('composition-transaction scenario 7', solve([[['start', 'a', 'x'], ['cancel', 'b', '']]] * N), [[[], 'a', 'x', 0]] * N)
check('composition-transaction scenario 8', solve([[['start', 'a', 'x'], ['cancel', 'a', '']]] * N), [[[], None, '', 0]] * N)
check('composition-transaction scenario 9', solve([[['start', 'a', 'x'], ['focus', 'b', '']]] * N), [[[], None, '', 0]] * N)
check('composition-transaction scenario 10', solve([[['start', 'a', 'x'], ['focus', 'a', '']]] * N), [[[], 'a', 'x', 0]] * N)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| composition-transaction scenario 0 | [[[], None, '', 0]] | [[[], None, '', 0]] | Passed |
| composition-transaction scenario 1 | [[[], 'a', 'xyz', 2]] | [[[], 'a', 'xyz', 2]] | Passed |
| composition-transaction scenario 2 | [[[], 'b', 'xb', 0]] | [[[], 'b', 'b', 0]] | Failed |
| composition-transaction scenario 3 | [[[], 'a', 'x', 0]] | [[[], 'a', 'x', 0]] | Passed |
| composition-transaction scenario 4 | [[['word'], None, '', 0]] | [[['word'], None, '', 0]] | Passed |
| composition-transaction scenario 5 | [[[], None, '', 0]] | [[[], None, '', 0]] | Passed |
| composition-transaction scenario 6 | [[[], 'a', 'x', 0]] | [[[], 'a', 'x', 0]] | Passed |
| composition-transaction scenario 7 | [[[], 'a', 'x', 0]] | [[[], 'a', 'x', 0]] | Passed |
| composition-transaction scenario 8 | [[[], None, '', 0]] | [[[], None, '', 0]] | Passed |
| composition-transaction scenario 9 | [[[], None, '', 0]] | [[[], None, '', 0]] | Passed |
| composition-transaction scenario 10 | [[[], 'a', 'x', 0]] | [[[], 'a', 'x', 0]] | Passed |
SHA-256 / c68a91ed4ddeef0a57b6a3c92aa17da40e427335789ce63d8db711b3e495a06f
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 11 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Offline stipulated event model, not a browser implementation or web standard conformance claim. 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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:41:57.406444+00:00.
Case digest / 937c2a5f9a6ed31430a1ab805ad4037e4704f7a84d5b3bca99fd3f82eb704c83