FAILURE MAP
← Case archive

FA-8261 / Direct manipulation / Open access

Drop-target acceptance: Targets accept incompatible payload types · case 01

Targets accept incompatible payload types.

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

ROOT CAUSE

The type operation uses `if False: return None` where the contract requires `if drag_type not in accepts: return None`.

VERIFIED REPAIR

Implement the type operation as `if drag_type not in accepts: return None`.

Unsuccessful approach: Rejecting supported types reverses compatibility.

Case contract

Accept only enabled, compatible targets outside the source subtree, with a supported move or copy effect.

Why this case matters

A deterministic model of drop-target acceptance; 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(drag_type, accepts, disabled, source, target, descendants, effect):
    if disabled: return None
    if False: return None
    if source == target: return None
    if target in descendants: return None
    if effect not in ('move', 'copy'): return None
    return effect
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve('node', ['node'], True, 'a', 'b', [], 'move'), None)
check('type', solve('file', ['node'], False, 'a', 'b', [], 'move'), None)
check('self', solve('node', ['node'], False, 'a', 'a', [], 'move'), None)
check('cycle', solve('node', ['node'], False, 'a', 'b', ['b'], 'move'), None)
check('unsupported', solve('node', ['node'], False, 'a', 'b', [], 'link'), None)
check('copy', solve('node', ['node'], False, 'a', 'b', [], 'copy'), 'copy')
check('move', solve('node', ['node'], False, 'a', 'b', [], 'move'), 'move')
check('parameterized payload type', solve('type'+str(N), ['type'+str(N)], False, 'a', 'b', [], 'copy'), 'copy')
for repetition in range(N):
    check('repeat move', solve('node', ['node'], False, 'a', 'b', [], 'move'), 'move')
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
disabledNoneNonePassed
typemoveNoneFailed
selfNoneNonePassed
cycleNoneNonePassed
unsupportedNoneNonePassed
copycopycopyPassed
movemovemovePassed
parameterized payload typecopycopyPassed
repeat movemovemovePassed

SHA-256 / ec3eb0040c34f3591404d85cc8b78e418a9b52b7ec456ca48c178ca7708cabbf

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(drag_type, accepts, disabled, source, target, descendants, effect):
    if disabled: return None
    if drag_type in accepts: return None
    if source == target: return None
    if target in descendants: return None
    if effect not in ('move', 'copy'): return None
    return effect
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve('node', ['node'], True, 'a', 'b', [], 'move'), None)
check('type', solve('file', ['node'], False, 'a', 'b', [], 'move'), None)
check('self', solve('node', ['node'], False, 'a', 'a', [], 'move'), None)
check('cycle', solve('node', ['node'], False, 'a', 'b', ['b'], 'move'), None)
check('unsupported', solve('node', ['node'], False, 'a', 'b', [], 'link'), None)
check('copy', solve('node', ['node'], False, 'a', 'b', [], 'copy'), 'copy')
check('move', solve('node', ['node'], False, 'a', 'b', [], 'move'), 'move')
check('parameterized payload type', solve('type'+str(N), ['type'+str(N)], False, 'a', 'b', [], 'copy'), 'copy')
for repetition in range(N):
    check('repeat move', solve('node', ['node'], False, 'a', 'b', [], 'move'), 'move')
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
disabledNoneNonePassed
typemoveNoneFailed
selfNoneNonePassed
cycleNoneNonePassed
unsupportedNoneNonePassed
copyNonecopyFailed
moveNonemoveFailed
parameterized payload typeNonecopyFailed
repeat moveNonemoveFailed

SHA-256 / a8849fd28dfa55b814b86454bbbf621e01b2c390b29c24444705ae6cfa3ca207

3 / The verified repair

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

N = 1
observations = []
def solve(drag_type, accepts, disabled, source, target, descendants, effect):
    if disabled: return None
    if drag_type not in accepts: return None
    if source == target: return None
    if target in descendants: return None
    if effect not in ('move', 'copy'): return None
    return effect
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve('node', ['node'], True, 'a', 'b', [], 'move'), None)
check('type', solve('file', ['node'], False, 'a', 'b', [], 'move'), None)
check('self', solve('node', ['node'], False, 'a', 'a', [], 'move'), None)
check('cycle', solve('node', ['node'], False, 'a', 'b', ['b'], 'move'), None)
check('unsupported', solve('node', ['node'], False, 'a', 'b', [], 'link'), None)
check('copy', solve('node', ['node'], False, 'a', 'b', [], 'copy'), 'copy')
check('move', solve('node', ['node'], False, 'a', 'b', [], 'move'), 'move')
check('parameterized payload type', solve('type'+str(N), ['type'+str(N)], False, 'a', 'b', [], 'copy'), 'copy')
for repetition in range(N):
    check('repeat move', solve('node', ['node'], False, 'a', 'b', [], 'move'), 'move')
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
disabledNoneNonePassed
typeNoneNonePassed
selfNoneNonePassed
cycleNoneNonePassed
unsupportedNoneNonePassed
copycopycopyPassed
movemovemovePassed
parameterized payload typecopycopyPassed
repeat movemovemovePassed

SHA-256 / c44f3b71dd68211cefd7ee9d8376cc9d723012adb6eb4a65054d6ea6c2d0ed86

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

Case digest / 0b5b4c95670253d4e090cf7f9ea736f510bd968ee23eec23c7f21e9ea1c6af68