FA-8781 / Viewport layout / Open access
Split-pane divider allocation: Divider width is counted as usable pane area · case 01
Divider width is counted as usable pane area.
ROOT CAUSE
The divider operation uses `total` where the contract requires `max(0, total - divider)`.
VERIFIED REPAIR
Implement the divider operation as `max(0, total - divider)`.
Unsuccessful approach: Adding divider width expands children beyond their container.
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 = total
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, 70] | [40, 60] | Failed |
| narrow | [13.333333333333334, 26.666666666666664] | [10, 20] | Failed |
| first min | [20, 90] | [20, 80] | Failed |
| second min | [80, 30] | [70, 30] | Failed |
| large request | [100, 110] | [100, 100] | Failed |
| zero | [0, 0] | [0, 0] | Passed |
| parameterized panel extent | [4, 7] | [4, 6] | Failed |
| repeat zero | [0, 0] | [0, 0] | Passed |
SHA-256 / d6095a90480087c7dbdb2fa277d1d8044b6d47e16d9142caac0f791af9ab6603
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_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, 80] | [40, 60] | Failed |
| narrow | [16.666666666666668, 33.33333333333333] | [10, 20] | Failed |
| first min | [20, 100] | [20, 80] | Failed |
| second min | [90, 30] | [70, 30] | Failed |
| large request | [100, 120] | [100, 100] | Failed |
| zero | [5, 5] | [0, 0] | Failed |
| parameterized panel extent | [4, 8] | [4, 6] | Failed |
| repeat zero | [5, 5] | [0, 0] | Failed |
SHA-256 / dbcf85e1fc7673247a1959568003e84e403a274a18ac64214c3c9c4f4fa7abfe
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.382636+00:00.
Case digest / a7e85158b3b5871251df63593d648162a99ea2ebf8c6acef5bbc566ed55ee6df