FAILURE MAP
← Case archive

FA-8266 / Direct manipulation / Open access

Drop-target acceptance: An item can be dropped into itself · case 01

An item can be dropped into itself.

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

ROOT CAUSE

The self drop operation uses `if False: return None` where the contract requires `if source == target: return None`.

VERIFIED REPAIR

Implement the self drop operation as `if source == target: return None`.

Unsuccessful approach: Rejecting all different targets blocks legitimate moves.

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 drag_type not in accepts: return None
    if False: 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
selfmoveNoneFailed
cycleNoneNonePassed
unsupportedNoneNonePassed
copycopycopyPassed
movemovemovePassed
parameterized payload typecopycopyPassed
repeat movemovemovePassed

SHA-256 / 3384591985803065d5f32a7b76c665ca03b8fa2e537366b0729a750d312e29e5

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 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
selfmoveNoneFailed
cycleNoneNonePassed
unsupportedNoneNonePassed
copyNonecopyFailed
moveNonemoveFailed
parameterized payload typeNonecopyFailed
repeat moveNonemoveFailed

SHA-256 / 23cb4700d646f9a1fde820a922c7b617e17d2b1323f2856f58a2b4349313231e

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

Case digest / 2fd3df7915c2a3478a09f196f8636e2d03b0809047a48a905b04390ae58e8059