FAILURE MAP
← Case archive

FA-8256 / Direct manipulation / Open access

Drop-target acceptance: Disabled drop zones accept dragged content · case 01

Disabled drop zones accept dragged content.

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

ROOT CAUSE

The disabled drop operation uses `if False: return None` where the contract requires `if disabled: return None`.

VERIFIED REPAIR

Implement the disabled drop operation as `if disabled: return None`.

Unsuccessful approach: Rejecting enabled zones reverses availability.

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 False: 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
disabledmoveNoneFailed
typeNoneNonePassed
selfNoneNonePassed
cycleNoneNonePassed
unsupportedNoneNonePassed
copycopycopyPassed
movemovemovePassed
parameterized payload typecopycopyPassed
repeat movemovemovePassed

SHA-256 / 23314891b37ca6f0a3bb262ea0a77fdf7c38790e152276df355eca3acad4f150

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 not 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
disabledmoveNoneFailed
typeNoneNonePassed
selfNoneNonePassed
cycleNoneNonePassed
unsupportedNoneNonePassed
copyNonecopyFailed
moveNonemoveFailed
parameterized payload typeNonecopyFailed
repeat moveNonemoveFailed

SHA-256 / 3bff4bea4b76453221e3dc300d77b2d911079109d015d5a28c2576cd68a5c679

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

Case digest / 5ac82285962a24ffe092b022302371a9a198f04a5b8704c9b5ca19ee8c4ed31a