FA-8791 / Viewport layout / Open access
Split-pane divider allocation: Compressed panes ignore their relative minimum sizes · case 01
Compressed panes ignore their relative minimum sizes.
ROOT CAUSE
The compression weight operation uses `available / 2` where the contract requires `available * minimum_first / (minimum_first + minimum_second)`.
VERIFIED REPAIR
Implement the compression weight operation as `available * minimum_first / (minimum_first + minimum_second)`.
Unsuccessful approach: Using the second pane weight assigns the wrong share.
Case contract
Subtract divider from total; honor both minimums when feasible; otherwise share available width in proportion to minima; panes sum to available space.
Why this case matters
A deterministic model of split-pane divider allocation; 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(total, divider, requested, minimum_first, minimum_second):
available = max(0, total - divider)
if available < minimum_first + minimum_second:
first = available / 2 if minimum_first + minimum_second else 0
else: first = max(minimum_first, min(requested, available-minimum_second))
return (first, available-first)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(110, 10, 40, 20, 30), (40, 60))
check('narrow', solve(40, 10, 25, 20, 40), (10, 20))
check('first min', solve(110, 10, 5, 20, 30), (20, 80))
check('second min', solve(110, 10, 95, 20, 30), (70, 30))
check('large request', solve(210, 10, 100, 20, 40), (100, 100))
check('zero', solve(0, 10, 5, 0, 0), (0, 0))
check('parameterized panel extent', solve(11*N,N,4*N,2*N,3*N), (4*N,6*N))
for repetition in range(N):
check('repeat zero', solve(0, 10, 5, 0, 0), (0, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal | [40, 60] | [40, 60] | Passed |
| narrow | [15.0, 15.0] | [10, 20] | Failed |
| first min | [20, 80] | [20, 80] | Passed |
| second min | [70, 30] | [70, 30] | Passed |
| large request | [100, 100] | [100, 100] | Passed |
| zero | [0, 0] | [0, 0] | Passed |
| parameterized panel extent | [4, 6] | [4, 6] | Passed |
| repeat zero | [0, 0] | [0, 0] | Passed |
SHA-256 / 25aa214fac13208710b36f1d60f7b86e921e2fb6d45ddfa29754da645480dfa1
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(total, divider, requested, minimum_first, minimum_second):
available = max(0, total - divider)
if available < minimum_first + minimum_second:
first = available * minimum_second / (minimum_first + minimum_second) if minimum_first + minimum_second else 0
else: first = max(minimum_first, min(requested, available-minimum_second))
return (first, available-first)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(110, 10, 40, 20, 30), (40, 60))
check('narrow', solve(40, 10, 25, 20, 40), (10, 20))
check('first min', solve(110, 10, 5, 20, 30), (20, 80))
check('second min', solve(110, 10, 95, 20, 30), (70, 30))
check('large request', solve(210, 10, 100, 20, 40), (100, 100))
check('zero', solve(0, 10, 5, 0, 0), (0, 0))
check('parameterized panel extent', solve(11*N,N,4*N,2*N,3*N), (4*N,6*N))
for repetition in range(N):
check('repeat zero', solve(0, 10, 5, 0, 0), (0, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal | [40, 60] | [40, 60] | Passed |
| narrow | [20.0, 10.0] | [10, 20] | Failed |
| first min | [20, 80] | [20, 80] | Passed |
| second min | [70, 30] | [70, 30] | Passed |
| large request | [100, 100] | [100, 100] | Passed |
| zero | [0, 0] | [0, 0] | Passed |
| parameterized panel extent | [4, 6] | [4, 6] | Passed |
| repeat zero | [0, 0] | [0, 0] | Passed |
SHA-256 / aded1ae7075b17c80236e4564b9569424efd08189bc55d8feb9380113ffadb6f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(total, divider, requested, minimum_first, minimum_second):
available = max(0, total - divider)
if available < minimum_first + minimum_second:
first = available * minimum_first / (minimum_first + minimum_second) if minimum_first + minimum_second else 0
else: first = max(minimum_first, min(requested, available-minimum_second))
return (first, available-first)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(110, 10, 40, 20, 30), (40, 60))
check('narrow', solve(40, 10, 25, 20, 40), (10, 20))
check('first min', solve(110, 10, 5, 20, 30), (20, 80))
check('second min', solve(110, 10, 95, 20, 30), (70, 30))
check('large request', solve(210, 10, 100, 20, 40), (100, 100))
check('zero', solve(0, 10, 5, 0, 0), (0, 0))
check('parameterized panel extent', solve(11*N,N,4*N,2*N,3*N), (4*N,6*N))
for repetition in range(N):
check('repeat zero', solve(0, 10, 5, 0, 0), (0, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal | [40, 60] | [40, 60] | Passed |
| narrow | [10.0, 20.0] | [10, 20] | Passed |
| first min | [20, 80] | [20, 80] | Passed |
| second min | [70, 30] | [70, 30] | Passed |
| large request | [100, 100] | [100, 100] | Passed |
| zero | [0, 0] | [0, 0] | Passed |
| parameterized panel extent | [4, 6] | [4, 6] | Passed |
| repeat zero | [0, 0] | [0, 0] | Passed |
SHA-256 / 84a7b04bb68409fee8bd671c515efd5153647a4cfe6b5f3eb5d0f204357f8801
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.415601+00:00.
Case digest / 76d2219af670f002aa03940d0c031ad2293ac5412703f1bfeece086f36a21530