FA-35926 / Tab interfaces / Open access
Detach window geometry: document continuity · case 01
The tab workspace reports an incorrect document continuity.
ROOT CAUSE
The document continuity decision uses x['new_window'] instead of x['document'].
VERIFIED REPAIR
Use the stipulated workspace rule: x['document'].
Unsuccessful approach: The partial repair None still violates a workspace boundary or normal case.
Case contract
Detach a tab into a new window at pointer minus drag anchor, clamp within work area, copy zoom, assign new window ownership and keep original document identity.
Why this case matters
Offline tab/panel workspace behavior; no browser or desktop framework is emulated.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = max(0,min(x['px']-x['anchor_x'],x['screen_w']-x['width']))
r1 = max(0,min(x['py']-x['anchor_y'],x['screen_h']-x['height']))
r2 = x['new_window']
r3 = x['new_window']
r4 = x['zoom']
r5 = x['width']>x['screen_w'] or x['height']>x['screen_h']
return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 288, 'w2', 'd', 125, False]), ({'px': 10, 'py': 5, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 125, False]), ({'px': 790, 'py': 590, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 300, 'w2', 'd', 125, False]), ({'px': 450, 'py': 300, 'anchor_x': 0, 'anchor_y': 0, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 300, 'w2', 'd', 125, False]), ({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 80, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 288, 'w2', 'd', 80, False]), ({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 500, 'screen_h': 400, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [100, 100, 'w2', 'd', 125, False]), ({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 400, 'screen_h': 300, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 125, False])], 2: [({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 576, 'w2', 'd', 250, False]), ({'px': 20, 'py': 10, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 250, False]), ({'px': 1580, 'py': 1180, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 600, 'w2', 'd', 250, False]), ({'px': 900, 'py': 600, 'anchor_x': 0, 'anchor_y': 0, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 600, 'w2', 'd', 250, False]), ({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 160, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 576, 'w2', 'd', 160, False]), ({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1000, 'screen_h': 800, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [200, 200, 'w2', 'd', 250, False]), ({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 800, 'screen_h': 600, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 250, False])], 3: [({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 864, 'w2', 'd', 375, False]), ({'px': 30, 'py': 15, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 375, False]), ({'px': 2370, 'py': 1770, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 900, 'w2', 'd', 375, False]), ({'px': 1350, 'py': 900, 'anchor_x': 0, 'anchor_y': 0, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 900, 'w2', 'd', 375, False]), ({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 240, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 864, 'w2', 'd', 240, False]), ({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 1500, 'screen_h': 1200, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [300, 300, 'w2', 'd', 375, False]), ({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 1200, 'screen_h': 900, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 375, False])], 4: [({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1152, 'w2', 'd', 500, False]), ({'px': 40, 'py': 20, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 500, False]), ({'px': 3160, 'py': 2360, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1200, 'w2', 'd', 500, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 0, 'anchor_y': 0, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1200, 'w2', 'd', 500, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 320, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1152, 'w2', 'd', 320, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 2000, 'screen_h': 1600, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 400, 'w2', 'd', 500, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 500, False])], 5: [({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1440, 'w2', 'd', 625, False]), ({'px': 50, 'py': 25, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 625, False]), ({'px': 3950, 'py': 2950, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1500, 'w2', 'd', 625, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 0, 'anchor_y': 0, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1500, 'w2', 'd', 625, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 400, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1440, 'w2', 'd', 400, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 2500, 'screen_h': 2000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [500, 500, 'w2', 'd', 625, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 2000, 'screen_h': 1500, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 625, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
check("workspace regression "+str(i), solve(inputs), expected)
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 |
|---|---|---|---|
| workspace regression 0 | [400, 288, 'w2', 'w2', 125, False] | [400, 288, 'w2', 'd', 125, False] | Failed |
| workspace regression 1 | [0, 0, 'w2', 'w2', 125, False] | [0, 0, 'w2', 'd', 125, False] | Failed |
| workspace regression 2 | [400, 300, 'w2', 'w2', 125, False] | [400, 300, 'w2', 'd', 125, False] | Failed |
| workspace regression 3 | [400, 300, 'w2', 'w2', 125, False] | [400, 300, 'w2', 'd', 125, False] | Failed |
| workspace regression 4 | [400, 288, 'w2', 'w2', 80, False] | [400, 288, 'w2', 'd', 80, False] | Failed |
| workspace regression 5 | [100, 100, 'w2', 'w2', 125, False] | [100, 100, 'w2', 'd', 125, False] | Failed |
| workspace regression 6 | [0, 0, 'w2', 'w2', 125, False] | [0, 0, 'w2', 'd', 125, False] | Failed |
SHA-256 / 9ab9476e0d6e529551d564752cde92f7dbac23c40a46ca924f100ecabee5ba6e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = max(0,min(x['px']-x['anchor_x'],x['screen_w']-x['width']))
r1 = max(0,min(x['py']-x['anchor_y'],x['screen_h']-x['height']))
r2 = x['new_window']
r3 = None
r4 = x['zoom']
r5 = x['width']>x['screen_w'] or x['height']>x['screen_h']
return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 288, 'w2', 'd', 125, False]), ({'px': 10, 'py': 5, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 125, False]), ({'px': 790, 'py': 590, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 300, 'w2', 'd', 125, False]), ({'px': 450, 'py': 300, 'anchor_x': 0, 'anchor_y': 0, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 300, 'w2', 'd', 125, False]), ({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 80, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 288, 'w2', 'd', 80, False]), ({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 500, 'screen_h': 400, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [100, 100, 'w2', 'd', 125, False]), ({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 400, 'screen_h': 300, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 125, False])], 2: [({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 576, 'w2', 'd', 250, False]), ({'px': 20, 'py': 10, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 250, False]), ({'px': 1580, 'py': 1180, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 600, 'w2', 'd', 250, False]), ({'px': 900, 'py': 600, 'anchor_x': 0, 'anchor_y': 0, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 600, 'w2', 'd', 250, False]), ({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 160, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 576, 'w2', 'd', 160, False]), ({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1000, 'screen_h': 800, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [200, 200, 'w2', 'd', 250, False]), ({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 800, 'screen_h': 600, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 250, False])], 3: [({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 864, 'w2', 'd', 375, False]), ({'px': 30, 'py': 15, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 375, False]), ({'px': 2370, 'py': 1770, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 900, 'w2', 'd', 375, False]), ({'px': 1350, 'py': 900, 'anchor_x': 0, 'anchor_y': 0, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 900, 'w2', 'd', 375, False]), ({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 240, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 864, 'w2', 'd', 240, False]), ({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 1500, 'screen_h': 1200, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [300, 300, 'w2', 'd', 375, False]), ({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 1200, 'screen_h': 900, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 375, False])], 4: [({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1152, 'w2', 'd', 500, False]), ({'px': 40, 'py': 20, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 500, False]), ({'px': 3160, 'py': 2360, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1200, 'w2', 'd', 500, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 0, 'anchor_y': 0, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1200, 'w2', 'd', 500, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 320, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1152, 'w2', 'd', 320, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 2000, 'screen_h': 1600, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 400, 'w2', 'd', 500, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 500, False])], 5: [({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1440, 'w2', 'd', 625, False]), ({'px': 50, 'py': 25, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 625, False]), ({'px': 3950, 'py': 2950, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1500, 'w2', 'd', 625, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 0, 'anchor_y': 0, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1500, 'w2', 'd', 625, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 400, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1440, 'w2', 'd', 400, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 2500, 'screen_h': 2000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [500, 500, 'w2', 'd', 625, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 2000, 'screen_h': 1500, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 625, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
check("workspace regression "+str(i), solve(inputs), expected)
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 |
|---|---|---|---|
| workspace regression 0 | [400, 288, 'w2', None, 125, False] | [400, 288, 'w2', 'd', 125, False] | Failed |
| workspace regression 1 | [0, 0, 'w2', None, 125, False] | [0, 0, 'w2', 'd', 125, False] | Failed |
| workspace regression 2 | [400, 300, 'w2', None, 125, False] | [400, 300, 'w2', 'd', 125, False] | Failed |
| workspace regression 3 | [400, 300, 'w2', None, 125, False] | [400, 300, 'w2', 'd', 125, False] | Failed |
| workspace regression 4 | [400, 288, 'w2', None, 80, False] | [400, 288, 'w2', 'd', 80, False] | Failed |
| workspace regression 5 | [100, 100, 'w2', None, 125, False] | [100, 100, 'w2', 'd', 125, False] | Failed |
| workspace regression 6 | [0, 0, 'w2', None, 125, False] | [0, 0, 'w2', 'd', 125, False] | Failed |
SHA-256 / 5bbccd050e4360843c0dfc01ec565e963b73570aa8e1dd4f6ce6e85a642c3598
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = max(0,min(x['px']-x['anchor_x'],x['screen_w']-x['width']))
r1 = max(0,min(x['py']-x['anchor_y'],x['screen_h']-x['height']))
r2 = x['new_window']
r3 = x['document']
r4 = x['zoom']
r5 = x['width']>x['screen_w'] or x['height']>x['screen_h']
return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 288, 'w2', 'd', 125, False]), ({'px': 10, 'py': 5, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 125, False]), ({'px': 790, 'py': 590, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 300, 'w2', 'd', 125, False]), ({'px': 450, 'py': 300, 'anchor_x': 0, 'anchor_y': 0, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 300, 'w2', 'd', 125, False]), ({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 800, 'screen_h': 600, 'zoom': 80, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 288, 'w2', 'd', 80, False]), ({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 500, 'screen_h': 400, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [100, 100, 'w2', 'd', 125, False]), ({'px': 450, 'py': 300, 'anchor_x': 40, 'anchor_y': 12, 'width': 400, 'height': 300, 'screen_w': 400, 'screen_h': 300, 'zoom': 125, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 125, False])], 2: [({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 576, 'w2', 'd', 250, False]), ({'px': 20, 'py': 10, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 250, False]), ({'px': 1580, 'py': 1180, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 600, 'w2', 'd', 250, False]), ({'px': 900, 'py': 600, 'anchor_x': 0, 'anchor_y': 0, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 600, 'w2', 'd', 250, False]), ({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 160, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [800, 576, 'w2', 'd', 160, False]), ({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 1000, 'screen_h': 800, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [200, 200, 'w2', 'd', 250, False]), ({'px': 900, 'py': 600, 'anchor_x': 80, 'anchor_y': 24, 'width': 800, 'height': 600, 'screen_w': 800, 'screen_h': 600, 'zoom': 250, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 250, False])], 3: [({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 864, 'w2', 'd', 375, False]), ({'px': 30, 'py': 15, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 375, False]), ({'px': 2370, 'py': 1770, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 900, 'w2', 'd', 375, False]), ({'px': 1350, 'py': 900, 'anchor_x': 0, 'anchor_y': 0, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 900, 'w2', 'd', 375, False]), ({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 2400, 'screen_h': 1800, 'zoom': 240, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1200, 864, 'w2', 'd', 240, False]), ({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 1500, 'screen_h': 1200, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [300, 300, 'w2', 'd', 375, False]), ({'px': 1350, 'py': 900, 'anchor_x': 120, 'anchor_y': 36, 'width': 1200, 'height': 900, 'screen_w': 1200, 'screen_h': 900, 'zoom': 375, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 375, False])], 4: [({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1152, 'w2', 'd', 500, False]), ({'px': 40, 'py': 20, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 500, False]), ({'px': 3160, 'py': 2360, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1200, 'w2', 'd', 500, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 0, 'anchor_y': 0, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1200, 'w2', 'd', 500, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 3200, 'screen_h': 2400, 'zoom': 320, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [1600, 1152, 'w2', 'd', 320, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 2000, 'screen_h': 1600, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [400, 400, 'w2', 'd', 500, False]), ({'px': 1800, 'py': 1200, 'anchor_x': 160, 'anchor_y': 48, 'width': 1600, 'height': 1200, 'screen_w': 1600, 'screen_h': 1200, 'zoom': 500, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 500, False])], 5: [({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1440, 'w2', 'd', 625, False]), ({'px': 50, 'py': 25, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 625, False]), ({'px': 3950, 'py': 2950, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1500, 'w2', 'd', 625, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 0, 'anchor_y': 0, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1500, 'w2', 'd', 625, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 4000, 'screen_h': 3000, 'zoom': 400, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [2000, 1440, 'w2', 'd', 400, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 2500, 'screen_h': 2000, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [500, 500, 'w2', 'd', 625, False]), ({'px': 2250, 'py': 1500, 'anchor_x': 200, 'anchor_y': 60, 'width': 2000, 'height': 1500, 'screen_w': 2000, 'screen_h': 1500, 'zoom': 625, 'document': 'd', 'old_window': 'w1', 'new_window': 'w2'}, [0, 0, 'w2', 'd', 625, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
check("workspace regression "+str(i), solve(inputs), expected)
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 |
|---|---|---|---|
| workspace regression 0 | [400, 288, 'w2', 'd', 125, False] | [400, 288, 'w2', 'd', 125, False] | Passed |
| workspace regression 1 | [0, 0, 'w2', 'd', 125, False] | [0, 0, 'w2', 'd', 125, False] | Passed |
| workspace regression 2 | [400, 300, 'w2', 'd', 125, False] | [400, 300, 'w2', 'd', 125, False] | Passed |
| workspace regression 3 | [400, 300, 'w2', 'd', 125, False] | [400, 300, 'w2', 'd', 125, False] | Passed |
| workspace regression 4 | [400, 288, 'w2', 'd', 80, False] | [400, 288, 'w2', 'd', 80, False] | Passed |
| workspace regression 5 | [100, 100, 'w2', 'd', 125, False] | [100, 100, 'w2', 'd', 125, False] | Passed |
| workspace regression 6 | [0, 0, 'w2', 'd', 125, False] | [0, 0, 'w2', 'd', 125, False] | Passed |
SHA-256 / 91add68c90553e127da2ebd8a1a1ea3a4fbce9931d639f2f7703bb47de40d64a
Verification & scope
Finite stipulated workspace snapshots only. Independent result fields describe observable obligations, not a full UI runtime. 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:42:46.270045+00:00.
Case digest / 03a40ea1b123b1a582d609c98ee655c3c1dfd51078c080012045e794a6603f6e