FA-31936 / Keyboard interactions / Open access
Release-completed dot chord keyboard: Separator is represented as a padding dot or omitted instead of an explicit empty chord · case 01
The event trace violates the separator empty rule and produces incorrect keyboard state or command output.
ROOT CAUSE
Separator is represented as a padding dot or omitted instead of an explicit empty chord.
VERIFIED REPAIR
Use the contract transition `out.append([])` at the separator empty fault site; preserve the other state transitions.
Unsuccessful approach: The partial repair changes this transition to pass, which still violates the model contract on the explicit regression traces.
Case contract
Events [kind,dot]. Dot values 1..8. Down adds a dot to held and accumulated chord; repeated down does not add another dot. Up releases a held dot and commits sorted accumulated dots only when the final held dot is released. Cancel clears held/chord without output; separator commits pending chord then emits empty dot list and resets. Return committed dot lists, held and accumulated sets. 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):
held=set(); chord=set(); out=[]; ignored=0
for kind,dot in c:
if kind in ('down','up') and not 1<=dot<=8:
ignored+=1
continue
if kind=='down':
held.add(dot)
chord.add(dot)
elif kind=='up' and dot in held:
held.discard(dot)
if not held and chord:
out.append(sorted(chord))
chord.clear()
elif kind=='up': ignored+=1
elif kind=='cancel':
held.clear(); chord.clear()
elif kind=='separator':
if chord: out.append(sorted(chord))
out.append([0])
held.clear(); chord.clear()
return [out,sorted(held),sorted(chord),ignored]
return [run(c) for c in cases]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('braille-chord scenario 0', solve([[]] * N), [[[], [], [], 0]] * N)
check('braille-chord scenario 1', solve([[['down', 1], ['down', 2]]] * N), [[[], [1, 2], [1, 2], 0]] * N)
check('braille-chord scenario 2', solve([[['down', 1], ['down', 8], ['up', 1], ['up', 8]]] * N), [[[[1, 8]], [], [], 0]] * N)
check('braille-chord scenario 3', solve([[['down', 2], ['down', 2], ['up', 2]]] * N), [[[[2]], [], [], 0]] * N)
check('braille-chord scenario 4', solve([[['down', 1], ['down', 2], ['up', 1]]] * N), [[[], [2], [1, 2], 0]] * N)
check('braille-chord scenario 5', solve([[['down', 1], ['up', 1], ['down', 2], ['up', 2]]] * N), [[[[1], [2]], [], [], 0]] * N)
check('braille-chord scenario 6', solve([[['down', 2], ['up', 3]]] * N), [[[], [2], [2], 1]] * N)
check('braille-chord scenario 7', solve([[['down', 0], ['up', 0], ['down', 9]]] * N), [[[], [], [], 3]] * N)
check('braille-chord scenario 8', solve([[['down', 1], ['down', 2], ['separator', 0]]] * N), [[[[1, 2], []], [], [], 0]] * N)
check('braille-chord scenario 9', solve([[['separator', 0]]] * N), [[[[]], [], [], 0]] * N)
check('braille-chord scenario 10', solve([[['down', 1], ['cancel', 0], ['up', 1]]] * N), [[[], [], [], 1]] * 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 |
|---|---|---|---|
| braille-chord scenario 0 | [[[], [], [], 0]] | [[[], [], [], 0]] | Passed |
| braille-chord scenario 1 | [[[], [1, 2], [1, 2], 0]] | [[[], [1, 2], [1, 2], 0]] | Passed |
| braille-chord scenario 2 | [[[[1, 8]], [], [], 0]] | [[[[1, 8]], [], [], 0]] | Passed |
| braille-chord scenario 3 | [[[[2]], [], [], 0]] | [[[[2]], [], [], 0]] | Passed |
| braille-chord scenario 4 | [[[], [2], [1, 2], 0]] | [[[], [2], [1, 2], 0]] | Passed |
| braille-chord scenario 5 | [[[[1], [2]], [], [], 0]] | [[[[1], [2]], [], [], 0]] | Passed |
| braille-chord scenario 6 | [[[], [2], [2], 1]] | [[[], [2], [2], 1]] | Passed |
| braille-chord scenario 7 | [[[], [], [], 3]] | [[[], [], [], 3]] | Passed |
| braille-chord scenario 8 | [[[[1, 2], [0]], [], [], 0]] | [[[[1, 2], []], [], [], 0]] | Failed |
| braille-chord scenario 9 | [[[[0]], [], [], 0]] | [[[[]], [], [], 0]] | Failed |
| braille-chord scenario 10 | [[[], [], [], 1]] | [[[], [], [], 1]] | Passed |
SHA-256 / 2c1cf7e1fd49831a8fb180eca2c58310333f5ba5301bd5d84cbc1427695d3e4c
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):
held=set(); chord=set(); out=[]; ignored=0
for kind,dot in c:
if kind in ('down','up') and not 1<=dot<=8:
ignored+=1
continue
if kind=='down':
held.add(dot)
chord.add(dot)
elif kind=='up' and dot in held:
held.discard(dot)
if not held and chord:
out.append(sorted(chord))
chord.clear()
elif kind=='up': ignored+=1
elif kind=='cancel':
held.clear(); chord.clear()
elif kind=='separator':
if chord: out.append(sorted(chord))
pass
held.clear(); chord.clear()
return [out,sorted(held),sorted(chord),ignored]
return [run(c) for c in cases]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('braille-chord scenario 0', solve([[]] * N), [[[], [], [], 0]] * N)
check('braille-chord scenario 1', solve([[['down', 1], ['down', 2]]] * N), [[[], [1, 2], [1, 2], 0]] * N)
check('braille-chord scenario 2', solve([[['down', 1], ['down', 8], ['up', 1], ['up', 8]]] * N), [[[[1, 8]], [], [], 0]] * N)
check('braille-chord scenario 3', solve([[['down', 2], ['down', 2], ['up', 2]]] * N), [[[[2]], [], [], 0]] * N)
check('braille-chord scenario 4', solve([[['down', 1], ['down', 2], ['up', 1]]] * N), [[[], [2], [1, 2], 0]] * N)
check('braille-chord scenario 5', solve([[['down', 1], ['up', 1], ['down', 2], ['up', 2]]] * N), [[[[1], [2]], [], [], 0]] * N)
check('braille-chord scenario 6', solve([[['down', 2], ['up', 3]]] * N), [[[], [2], [2], 1]] * N)
check('braille-chord scenario 7', solve([[['down', 0], ['up', 0], ['down', 9]]] * N), [[[], [], [], 3]] * N)
check('braille-chord scenario 8', solve([[['down', 1], ['down', 2], ['separator', 0]]] * N), [[[[1, 2], []], [], [], 0]] * N)
check('braille-chord scenario 9', solve([[['separator', 0]]] * N), [[[[]], [], [], 0]] * N)
check('braille-chord scenario 10', solve([[['down', 1], ['cancel', 0], ['up', 1]]] * N), [[[], [], [], 1]] * 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 |
|---|---|---|---|
| braille-chord scenario 0 | [[[], [], [], 0]] | [[[], [], [], 0]] | Passed |
| braille-chord scenario 1 | [[[], [1, 2], [1, 2], 0]] | [[[], [1, 2], [1, 2], 0]] | Passed |
| braille-chord scenario 2 | [[[[1, 8]], [], [], 0]] | [[[[1, 8]], [], [], 0]] | Passed |
| braille-chord scenario 3 | [[[[2]], [], [], 0]] | [[[[2]], [], [], 0]] | Passed |
| braille-chord scenario 4 | [[[], [2], [1, 2], 0]] | [[[], [2], [1, 2], 0]] | Passed |
| braille-chord scenario 5 | [[[[1], [2]], [], [], 0]] | [[[[1], [2]], [], [], 0]] | Passed |
| braille-chord scenario 6 | [[[], [2], [2], 1]] | [[[], [2], [2], 1]] | Passed |
| braille-chord scenario 7 | [[[], [], [], 3]] | [[[], [], [], 3]] | Passed |
| braille-chord scenario 8 | [[[[1, 2]], [], [], 0]] | [[[[1, 2], []], [], [], 0]] | Failed |
| braille-chord scenario 9 | [[[], [], [], 0]] | [[[[]], [], [], 0]] | Failed |
| braille-chord scenario 10 | [[[], [], [], 1]] | [[[], [], [], 1]] | Passed |
SHA-256 / 3eb3bf6bbd909af09c50c770e6a2419138f05b213e8279d75eb2debd5d4722fe
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cases):
def run(c):
held=set(); chord=set(); out=[]; ignored=0
for kind,dot in c:
if kind in ('down','up') and not 1<=dot<=8:
ignored+=1
continue
if kind=='down':
held.add(dot)
chord.add(dot)
elif kind=='up' and dot in held:
held.discard(dot)
if not held and chord:
out.append(sorted(chord))
chord.clear()
elif kind=='up': ignored+=1
elif kind=='cancel':
held.clear(); chord.clear()
elif kind=='separator':
if chord: out.append(sorted(chord))
out.append([])
held.clear(); chord.clear()
return [out,sorted(held),sorted(chord),ignored]
return [run(c) for c in cases]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('braille-chord scenario 0', solve([[]] * N), [[[], [], [], 0]] * N)
check('braille-chord scenario 1', solve([[['down', 1], ['down', 2]]] * N), [[[], [1, 2], [1, 2], 0]] * N)
check('braille-chord scenario 2', solve([[['down', 1], ['down', 8], ['up', 1], ['up', 8]]] * N), [[[[1, 8]], [], [], 0]] * N)
check('braille-chord scenario 3', solve([[['down', 2], ['down', 2], ['up', 2]]] * N), [[[[2]], [], [], 0]] * N)
check('braille-chord scenario 4', solve([[['down', 1], ['down', 2], ['up', 1]]] * N), [[[], [2], [1, 2], 0]] * N)
check('braille-chord scenario 5', solve([[['down', 1], ['up', 1], ['down', 2], ['up', 2]]] * N), [[[[1], [2]], [], [], 0]] * N)
check('braille-chord scenario 6', solve([[['down', 2], ['up', 3]]] * N), [[[], [2], [2], 1]] * N)
check('braille-chord scenario 7', solve([[['down', 0], ['up', 0], ['down', 9]]] * N), [[[], [], [], 3]] * N)
check('braille-chord scenario 8', solve([[['down', 1], ['down', 2], ['separator', 0]]] * N), [[[[1, 2], []], [], [], 0]] * N)
check('braille-chord scenario 9', solve([[['separator', 0]]] * N), [[[[]], [], [], 0]] * N)
check('braille-chord scenario 10', solve([[['down', 1], ['cancel', 0], ['up', 1]]] * N), [[[], [], [], 1]] * 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 |
|---|---|---|---|
| braille-chord scenario 0 | [[[], [], [], 0]] | [[[], [], [], 0]] | Passed |
| braille-chord scenario 1 | [[[], [1, 2], [1, 2], 0]] | [[[], [1, 2], [1, 2], 0]] | Passed |
| braille-chord scenario 2 | [[[[1, 8]], [], [], 0]] | [[[[1, 8]], [], [], 0]] | Passed |
| braille-chord scenario 3 | [[[[2]], [], [], 0]] | [[[[2]], [], [], 0]] | Passed |
| braille-chord scenario 4 | [[[], [2], [1, 2], 0]] | [[[], [2], [1, 2], 0]] | Passed |
| braille-chord scenario 5 | [[[[1], [2]], [], [], 0]] | [[[[1], [2]], [], [], 0]] | Passed |
| braille-chord scenario 6 | [[[], [2], [2], 1]] | [[[], [2], [2], 1]] | Passed |
| braille-chord scenario 7 | [[[], [], [], 3]] | [[[], [], [], 3]] | Passed |
| braille-chord scenario 8 | [[[[1, 2], []], [], [], 0]] | [[[[1, 2], []], [], [], 0]] | Passed |
| braille-chord scenario 9 | [[[[]], [], [], 0]] | [[[[]], [], [], 0]] | Passed |
| braille-chord scenario 10 | [[[], [], [], 1]] | [[[], [], [], 1]] | Passed |
SHA-256 / 735ecc8729791f83b2cb4eba105e3d1253081696e146da62e4ac323c322955dd
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:42:07.070069+00:00.
Case digest / db836dbf6dcb604fdc2012eb1bb5e8c17357ca05577258ba8a0b07c9a0e8931b