FAILURE MAP
← Case archive

FA-9061 / Direct manipulation / Open access

Gesture axis locking and cancellation: Negative-direction drags never cross the gesture threshold · case 01

Negative-direction drags never cross the gesture threshold.

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

ROOT CAUSE

The negative motion operation uses `max(dx, dy)` where the contract requires `max(abs(dx), abs(dy))`.

THE FAILURE

The negative motion operation uses `max(dx, dy)` where the contract requires `max(abs(dx), abs(dy))`.

Unsuccessful approach: Requiring both axes to cross prevents axis-aligned gestures.

Case contract

Cancelled gestures emit no movement; activate at the maximum absolute-axis threshold; choose dominant magnitude with horizontal tie; lock persists and suppresses cross-axis displacement.

Why this case matters

A deterministic model of gesture axis locking and cancellation; this isolates one interface invariant without requiring a browser.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(dx, dy, threshold, locked, cancelled):
    if cancelled: return (None, 0, 0)
    if locked is None:
        if max(dx, dy) < threshold: return (None, 0, 0)
        locked = 'x' if abs(dx) >= abs(dy) else 'y'
    if locked == 'x': return ('x', dx, 0)
    return ('y', 0, dy)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cancel', solve(10, 2, 5, 'x', True), (None, 0, 0))
check('negative', solve(-10, 0, 5, None, False), ('x', -10, 0))
check('threshold', solve(5, 0, 5, None, False), ('x', 5, 0))
check('small', solve(2, 1, 5, None, False), (None, 0, 0))
check('dominant negative', solve(-10, 3, 5, None, False), ('x', -10, 0))
check('vertical', solve(2, -10, 5, None, False), ('y', 0, -10))
check('locked', solve(2, 20, 5, "x", False), ('x', 2, 0))
check('parameterized gesture distance', solve(2*N,0,N,None,False), ('x',2*N,0))
for repetition in range(N):
    check('repeat locked', solve(2, 20, 5, "x", False), ('x', 2, 0))
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
cancel[None, 0, 0][None, 0, 0]Passed
negative[None, 0, 0]['x', -10, 0]Failed
threshold['x', 5, 0]['x', 5, 0]Passed
small[None, 0, 0][None, 0, 0]Passed
dominant negative[None, 0, 0]['x', -10, 0]Failed
vertical[None, 0, 0]['y', 0, -10]Failed
locked['x', 2, 0]['x', 2, 0]Passed
parameterized gesture distance['x', 2, 0]['x', 2, 0]Passed
repeat locked['x', 2, 0]['x', 2, 0]Passed

SHA-256 / c269d9fec97abb8ee823ca4eb7025ca2ed47835cf150d48ff42d32ff73b62681

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(dx, dy, threshold, locked, cancelled):
    if cancelled: return (None, 0, 0)
    if locked is None:
        if min(abs(dx), abs(dy)) < threshold: return (None, 0, 0)
        locked = 'x' if abs(dx) >= abs(dy) else 'y'
    if locked == 'x': return ('x', dx, 0)
    return ('y', 0, dy)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cancel', solve(10, 2, 5, 'x', True), (None, 0, 0))
check('negative', solve(-10, 0, 5, None, False), ('x', -10, 0))
check('threshold', solve(5, 0, 5, None, False), ('x', 5, 0))
check('small', solve(2, 1, 5, None, False), (None, 0, 0))
check('dominant negative', solve(-10, 3, 5, None, False), ('x', -10, 0))
check('vertical', solve(2, -10, 5, None, False), ('y', 0, -10))
check('locked', solve(2, 20, 5, "x", False), ('x', 2, 0))
check('parameterized gesture distance', solve(2*N,0,N,None,False), ('x',2*N,0))
for repetition in range(N):
    check('repeat locked', solve(2, 20, 5, "x", False), ('x', 2, 0))
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
cancel[None, 0, 0][None, 0, 0]Passed
negative[None, 0, 0]['x', -10, 0]Failed
threshold[None, 0, 0]['x', 5, 0]Failed
small[None, 0, 0][None, 0, 0]Passed
dominant negative[None, 0, 0]['x', -10, 0]Failed
vertical[None, 0, 0]['y', 0, -10]Failed
locked['x', 2, 0]['x', 2, 0]Passed
parameterized gesture distance[None, 0, 0]['x', 2, 0]Failed
repeat locked['x', 2, 0]['x', 2, 0]Passed

SHA-256 / de61d11e712d2abe92bd87cd1347be620c02fadd983fbccc3d39cb9f556c6738

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 9 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

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:38:26.812641+00:00.

Case digest / 02f2a3363ddda79c9598b3c0acbb1ac1f2b89cef6172377420e47b1936c27bac