FAILURE MAP
← Case archive

FA-8776 / Direct manipulation / Open access

Resizable panel constraint handling: Panels expand beyond their maximum size · case 01

Panels expand beyond their maximum size.

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

ROOT CAUSE

The maximum operation uses `wanted` where the contract requires `min(maximum, wanted)`.

VERIFIED REPAIR

Implement the maximum operation as `min(maximum, wanted)`.

Unsuccessful approach: Using max turns the maximum into a floor.

Case contract

Disabled handles preserve size; trailing-axis handles reverse delta; add deltas to current size and clamp to min/max.

Why this case matters

A deterministic model of resizable panel constraint handling; 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(size, delta, minimum, maximum, reversed_axis, disabled):
    if disabled: return size
    change = -delta if reversed_axis else delta
    wanted = size + change
    return max(minimum, wanted)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(50, 10, 20, 100, False, True), 50)
check('forward', solve(50, 10, 20, 100, False, False), 60)
check('reversed', solve(50, 10, 20, 100, True, False), 40)
check('min', solve(30, -50, 20, 100, False, False), 20)
check('max', solve(80, 50, 20, 100, False, False), 100)
check('zero', solve(50, 0, 20, 100, False, False), 50)
check('parameterized resize distance', solve(10*N,N,0,100*N,False,False),11*N)
for repetition in range(N):
    check('repeat zero', solve(50, 0, 20, 100, False, False), 50)
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
disabled5050Passed
forward6060Passed
reversed4040Passed
min2020Passed
max130100Failed
zero5050Passed
parameterized resize distance1111Passed
repeat zero5050Passed

SHA-256 / 2e9e33925b61f2b26326a262d9c5c00ce6999ed6512cbcf17b84d3a437a117a2

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(size, delta, minimum, maximum, reversed_axis, disabled):
    if disabled: return size
    change = -delta if reversed_axis else delta
    wanted = size + change
    return max(minimum, max(maximum, wanted))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(50, 10, 20, 100, False, True), 50)
check('forward', solve(50, 10, 20, 100, False, False), 60)
check('reversed', solve(50, 10, 20, 100, True, False), 40)
check('min', solve(30, -50, 20, 100, False, False), 20)
check('max', solve(80, 50, 20, 100, False, False), 100)
check('zero', solve(50, 0, 20, 100, False, False), 50)
check('parameterized resize distance', solve(10*N,N,0,100*N,False,False),11*N)
for repetition in range(N):
    check('repeat zero', solve(50, 0, 20, 100, False, False), 50)
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
disabled5050Passed
forward10060Failed
reversed10040Failed
min10020Failed
max130100Failed
zero10050Failed
parameterized resize distance10011Failed
repeat zero10050Failed

SHA-256 / 05e882d4211dc10557b9067792de5fab9b8cae28dd5c9cccba485e5be500f06a

3 / The verified repair

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

N = 1
observations = []
def solve(size, delta, minimum, maximum, reversed_axis, disabled):
    if disabled: return size
    change = -delta if reversed_axis else delta
    wanted = size + change
    return max(minimum, min(maximum, wanted))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(50, 10, 20, 100, False, True), 50)
check('forward', solve(50, 10, 20, 100, False, False), 60)
check('reversed', solve(50, 10, 20, 100, True, False), 40)
check('min', solve(30, -50, 20, 100, False, False), 20)
check('max', solve(80, 50, 20, 100, False, False), 100)
check('zero', solve(50, 0, 20, 100, False, False), 50)
check('parameterized resize distance', solve(10*N,N,0,100*N,False,False),11*N)
for repetition in range(N):
    check('repeat zero', solve(50, 0, 20, 100, False, False), 50)
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
disabled5050Passed
forward6060Passed
reversed4040Passed
min2020Passed
max100100Passed
zero5050Passed
parameterized resize distance1111Passed
repeat zero5050Passed

SHA-256 / c9c3aef31922fe4ccbb39dbe52a30550f21c31cf7b5cf382a9dd2921ab3e4ac8

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

Case digest / 43120781d8952504e51af2408bdc3d3a49c510ea74e8c10702b24d22e5d5d407