FAILURE MAP
← Case archive

FA-32156 / Keyboard interactions / Open access

Keyboard lock indicator request acknowledgements: A request captures the acknowledged state or uses lock bits as request identity · case 01

The event trace violates the snapshot capture rule and produces incorrect keyboard state or command output.

Verified by executionVariant 1 · 10 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

A request captures the acknowledged state or uses lock bits as request identity.

THE FAILURE

A request captures the acknowledged state or uses lock bits as request identity.

Unsuccessful approach: The partial repair changes this transition to inflight[desired]=desired, which still violates the model contract on the explicit regression traces.

Case contract

Events [kind,value]. Toggle flips desired lock bit 0..2. Send creates monotonically numbered snapshot request only when desired differs applied. Ack for an in-flight id newer than accepted applies that request snapshot, advances accepted id and discards requests <= ack. Unknown or stale ack is ignored. Reset sets applied=0, clears in-flight requests and accepted watermark but preserves desired and increasing request serial. Return desired,applied,serial,accepted,in-flight and sent [id,mask]. 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):
        desired=0; applied=0; serial=0; accepted=0; inflight={}; sent=[]
        for kind,value in c:
            if kind=='toggle': desired^=1<<value
            elif kind=='send' and desired!=applied:
                serial+=1
                inflight[serial]=applied
                sent.append([serial,desired])
            elif kind=='ack' and value in inflight and value>accepted:
                applied=inflight[value]
                accepted=value
                inflight={k:v for k,v in inflight.items() if k>value}
            elif kind=='reset':
                applied=0; inflight={}; accepted=0
        return [desired,applied,serial,accepted,sorted([[k,v] for k,v in inflight.items()]),sent]
    return [run(c) for c in cases]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('lock-led-ack scenario 0', solve([[]] * N), [[0, 0, 0, 0, [], []]] * N)
check('lock-led-ack scenario 1', solve([[['send', 0]]] * N), [[0, 0, 0, 0, [], []]] * N)
check('lock-led-ack scenario 2', solve([[['toggle', 0], ['toggle', 0], ['send', 0]]] * N), [[0, 0, 0, 0, [], []]] * N)
check('lock-led-ack scenario 3', solve([[['toggle', 2], ['send', 0], ['ack', 1]]] * N), [[4, 4, 1, 1, [], [[1, 4]]]] * N)
check('lock-led-ack scenario 4', solve([[['toggle', 0], ['send', 0], ['toggle', 1], ['send', 0], ['ack', 1]]] * N), [[3, 1, 2, 1, [[2, 3]], [[1, 1], [2, 3]]]] * N)
check('lock-led-ack scenario 5', solve([[['toggle', 0], ['send', 0], ['toggle', 1], ['send', 0], ['ack', 2], ['ack', 1]]] * N), [[3, 3, 2, 2, [], [[1, 1], [2, 3]]]] * N)
check('lock-led-ack scenario 6', solve([[['toggle', 1], ['send', 0], ['send', 0], ['ack', 1]]] * N), [[2, 2, 2, 1, [[2, 2]], [[1, 2], [2, 2]]]] * N)
check('lock-led-ack scenario 7', solve([[['toggle', 2], ['send', 0], ['reset', 0], ['send', 0]]] * N), [[4, 0, 2, 0, [[2, 4]], [[1, 4], [2, 4]]]] * N)
check('lock-led-ack scenario 8', solve([[['toggle', 0], ['send', 0], ['ack', 1], ['send', 0]]] * N), [[1, 1, 1, 1, [], [[1, 1]]]] * N)
check('lock-led-ack scenario 9', solve([[['ack', 999]]] * N), [[0, 0, 0, 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 fixtureActualExpectedOutcome
lock-led-ack scenario 0[[0, 0, 0, 0, [], []]][[0, 0, 0, 0, [], []]]Passed
lock-led-ack scenario 1[[0, 0, 0, 0, [], []]][[0, 0, 0, 0, [], []]]Passed
lock-led-ack scenario 2[[0, 0, 0, 0, [], []]][[0, 0, 0, 0, [], []]]Passed
lock-led-ack scenario 3[[4, 0, 1, 1, [], [[1, 4]]]][[4, 4, 1, 1, [], [[1, 4]]]]Failed
lock-led-ack scenario 4[[3, 0, 2, 1, [[2, 0]], [[1, 1], [2, 3]]]][[3, 1, 2, 1, [[2, 3]], [[1, 1], [2, 3]]]]Failed
lock-led-ack scenario 5[[3, 0, 2, 2, [], [[1, 1], [2, 3]]]][[3, 3, 2, 2, [], [[1, 1], [2, 3]]]]Failed
lock-led-ack scenario 6[[2, 0, 2, 1, [[2, 0]], [[1, 2], [2, 2]]]][[2, 2, 2, 1, [[2, 2]], [[1, 2], [2, 2]]]]Failed
lock-led-ack scenario 7[[4, 0, 2, 0, [[2, 0]], [[1, 4], [2, 4]]]][[4, 0, 2, 0, [[2, 4]], [[1, 4], [2, 4]]]]Failed
lock-led-ack scenario 8[[1, 0, 2, 1, [[2, 0]], [[1, 1], [2, 1]]]][[1, 1, 1, 1, [], [[1, 1]]]]Failed
lock-led-ack scenario 9[[0, 0, 0, 0, [], []]][[0, 0, 0, 0, [], []]]Passed

SHA-256 / 3640185bdfaa0ad9d0994122731521de5c719fd7609e8a478598ee7afed88190

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):
        desired=0; applied=0; serial=0; accepted=0; inflight={}; sent=[]
        for kind,value in c:
            if kind=='toggle': desired^=1<<value
            elif kind=='send' and desired!=applied:
                serial+=1
                inflight[desired]=desired
                sent.append([serial,desired])
            elif kind=='ack' and value in inflight and value>accepted:
                applied=inflight[value]
                accepted=value
                inflight={k:v for k,v in inflight.items() if k>value}
            elif kind=='reset':
                applied=0; inflight={}; accepted=0
        return [desired,applied,serial,accepted,sorted([[k,v] for k,v in inflight.items()]),sent]
    return [run(c) for c in cases]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('lock-led-ack scenario 0', solve([[]] * N), [[0, 0, 0, 0, [], []]] * N)
check('lock-led-ack scenario 1', solve([[['send', 0]]] * N), [[0, 0, 0, 0, [], []]] * N)
check('lock-led-ack scenario 2', solve([[['toggle', 0], ['toggle', 0], ['send', 0]]] * N), [[0, 0, 0, 0, [], []]] * N)
check('lock-led-ack scenario 3', solve([[['toggle', 2], ['send', 0], ['ack', 1]]] * N), [[4, 4, 1, 1, [], [[1, 4]]]] * N)
check('lock-led-ack scenario 4', solve([[['toggle', 0], ['send', 0], ['toggle', 1], ['send', 0], ['ack', 1]]] * N), [[3, 1, 2, 1, [[2, 3]], [[1, 1], [2, 3]]]] * N)
check('lock-led-ack scenario 5', solve([[['toggle', 0], ['send', 0], ['toggle', 1], ['send', 0], ['ack', 2], ['ack', 1]]] * N), [[3, 3, 2, 2, [], [[1, 1], [2, 3]]]] * N)
check('lock-led-ack scenario 6', solve([[['toggle', 1], ['send', 0], ['send', 0], ['ack', 1]]] * N), [[2, 2, 2, 1, [[2, 2]], [[1, 2], [2, 2]]]] * N)
check('lock-led-ack scenario 7', solve([[['toggle', 2], ['send', 0], ['reset', 0], ['send', 0]]] * N), [[4, 0, 2, 0, [[2, 4]], [[1, 4], [2, 4]]]] * N)
check('lock-led-ack scenario 8', solve([[['toggle', 0], ['send', 0], ['ack', 1], ['send', 0]]] * N), [[1, 1, 1, 1, [], [[1, 1]]]] * N)
check('lock-led-ack scenario 9', solve([[['ack', 999]]] * N), [[0, 0, 0, 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 fixtureActualExpectedOutcome
lock-led-ack scenario 0[[0, 0, 0, 0, [], []]][[0, 0, 0, 0, [], []]]Passed
lock-led-ack scenario 1[[0, 0, 0, 0, [], []]][[0, 0, 0, 0, [], []]]Passed
lock-led-ack scenario 2[[0, 0, 0, 0, [], []]][[0, 0, 0, 0, [], []]]Passed
lock-led-ack scenario 3[[4, 0, 1, 0, [[4, 4]], [[1, 4]]]][[4, 4, 1, 1, [], [[1, 4]]]]Failed
lock-led-ack scenario 4[[3, 1, 2, 1, [[3, 3]], [[1, 1], [2, 3]]]][[3, 1, 2, 1, [[2, 3]], [[1, 1], [2, 3]]]]Failed
lock-led-ack scenario 5[[3, 1, 2, 1, [[3, 3]], [[1, 1], [2, 3]]]][[3, 3, 2, 2, [], [[1, 1], [2, 3]]]]Failed
lock-led-ack scenario 6[[2, 0, 2, 0, [[2, 2]], [[1, 2], [2, 2]]]][[2, 2, 2, 1, [[2, 2]], [[1, 2], [2, 2]]]]Failed
lock-led-ack scenario 7[[4, 0, 2, 0, [[4, 4]], [[1, 4], [2, 4]]]][[4, 0, 2, 0, [[2, 4]], [[1, 4], [2, 4]]]]Failed
lock-led-ack scenario 8[[1, 1, 1, 1, [], [[1, 1]]]][[1, 1, 1, 1, [], [[1, 1]]]]Passed
lock-led-ack scenario 9[[0, 0, 0, 0, [], []]][[0, 0, 0, 0, [], []]]Passed

SHA-256 / 989b0f34f813f657a8017b35d2b7385133a8b0fdf929c8ee4d0038b43617d67d

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 10 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:42:09.577986+00:00.

Case digest / 4f4b392e22acb146eb8ba6633b03d44204fb5d44d73d79451000985cfbb6451a