FA-26261 / Filter interfaces / Open access
Only zero-width histogram gestures are treated as clicks · case 01
Only zero-width histogram gestures are treated as clicks is violated by the widget projection.
ROOT CAUSE
The click-no-range decision uses `abs(d['start']-d['end'])<=1` instead of the stipulated histogram-brush-filter projection.
VERIFIED REPAIR
Implement the declared click-no-range projection: `d['start']==d['end']`.
Unsuccessful approach: The attempted correction `False` still violates the explicit contract fixtures.
Case contract
A histogram brush selects intersecting bucket identities over a half-open horizontal interval; clicks without width do not create a range and the final brush converts to domain edges. This example checks: Only zero-width histogram gestures are treated as clicks.
Why this case matters
Filter-widget state and serialization must preserve user constraints while the view changes.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'normalize-drag':([min(d['start'],d['end']),max(d['start'],d['end'])]), 'bucket-intersection':([i for i,(a,b) in enumerate(d['bins']) if a<max(d['start'],d['end']) and b>min(d['start'],d['end'])] if d['start']!=d['end'] else []), 'click-no-range':(abs(d['start']-d['end'])<=1), 'brush-domain-start':(max(d['minimum'],min(d['start'],d['end']))), 'brush-domain-end':(min(d['maximum'],max(d['start'],d['end']))), 'brush-publish':(d['released'] and d['start']!=d['end'])}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': 1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 1], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 1, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': -1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 2, 'brush-publish': True}), ({'start': 1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 3, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 3, 'brush-publish': True}), ({'start': 3, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [2, 3], 'bucket-intersection': [1], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [3, 5], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 3, 'brush-domain-end': 5, 'brush-publish': True})], 2: [({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': True}), ({'start': 1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 1], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 1, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': True}), ({'start': 1, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 2, 'brush-publish': False}), ({'start': 1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 3, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [2, 3], 'bucket-intersection': [1], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 3, 'brush-publish': True}), ({'start': 6, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': True})], 3: [({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 0], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': 1, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 2, 'brush-publish': True}), ({'start': 3, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 3, 'brush-publish': True}), ({'start': 3, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [3, 5], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 3, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 6, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [2, 6], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [5, 6], 'bucket-intersection': [2], 'click-no-range': False, 'brush-domain-start': 5, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': -1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False})], 4: [({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': True}), ({'start': 0, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 0], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': 3, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [2, 3], 'bucket-intersection': [1], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [3, 5], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 3, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 6, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [2, 6], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': -1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': True}), ({'start': -1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 0, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 0], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False})], 5: [({'start': 1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 1], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 1, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 6, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 6, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [5, 6], 'bucket-intersection': [2], 'click-no-range': False, 'brush-domain-start': 5, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': True}), ({'start': -1, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 2, 'brush-publish': False}), ({'start': -1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 2, 'brush-publish': True}), ({'start': 1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
check("contract fixture " + str(index), solve(data), 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 |
|---|---|---|---|
| contract fixture 0 | {'brush-domain-end': 0, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': True, 'normalize-drag': [-1, 0]} | {'brush-domain-end': 0, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': False, 'normalize-drag': [-1, 0]} | Failed |
| contract fixture 1 | {'brush-domain-end': 1, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': True, 'normalize-drag': [1, 1]} | {'brush-domain-end': 1, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': True, 'normalize-drag': [1, 1]} | Passed |
| contract fixture 2 | {'brush-domain-end': 5, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [-1, 5]} | {'brush-domain-end': 5, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [-1, 5]} | Passed |
| contract fixture 3 | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': True, 'normalize-drag': [0, 1]} | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | Failed |
| contract fixture 4 | {'brush-domain-end': 2, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 2]} | {'brush-domain-end': 2, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 2]} | Passed |
| contract fixture 5 | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': True, 'normalize-drag': [0, 1]} | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | Failed |
| contract fixture 6 | {'brush-domain-end': 5, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [1, 5]} | {'brush-domain-end': 5, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [1, 5]} | Passed |
| contract fixture 7 | {'brush-domain-end': 3, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1], 'click-no-range': False, 'normalize-drag': [0, 3]} | {'brush-domain-end': 3, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1], 'click-no-range': False, 'normalize-drag': [0, 3]} | Passed |
| contract fixture 8 | {'brush-domain-end': 3, 'brush-domain-start': 2, 'brush-publish': False, 'bucket-intersection': [1], 'click-no-range': True, 'normalize-drag': [2, 3]} | {'brush-domain-end': 3, 'brush-domain-start': 2, 'brush-publish': False, 'bucket-intersection': [1], 'click-no-range': False, 'normalize-drag': [2, 3]} | Failed |
| contract fixture 9 | {'brush-domain-end': 5, 'brush-domain-start': 3, 'brush-publish': True, 'bucket-intersection': [1, 2], 'click-no-range': False, 'normalize-drag': [3, 5]} | {'brush-domain-end': 5, 'brush-domain-start': 3, 'brush-publish': True, 'bucket-intersection': [1, 2], 'click-no-range': False, 'normalize-drag': [3, 5]} | Passed |
SHA-256 / fd164e6d577ae21137f7f2315a999b3b3ade3b1e4ec6570194a0760b49c645d9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'normalize-drag':([min(d['start'],d['end']),max(d['start'],d['end'])]), 'bucket-intersection':([i for i,(a,b) in enumerate(d['bins']) if a<max(d['start'],d['end']) and b>min(d['start'],d['end'])] if d['start']!=d['end'] else []), 'click-no-range':(False), 'brush-domain-start':(max(d['minimum'],min(d['start'],d['end']))), 'brush-domain-end':(min(d['maximum'],max(d['start'],d['end']))), 'brush-publish':(d['released'] and d['start']!=d['end'])}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': 1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 1], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 1, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': -1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 2, 'brush-publish': True}), ({'start': 1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 3, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 3, 'brush-publish': True}), ({'start': 3, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [2, 3], 'bucket-intersection': [1], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [3, 5], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 3, 'brush-domain-end': 5, 'brush-publish': True})], 2: [({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': True}), ({'start': 1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 1], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 1, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': True}), ({'start': 1, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 2, 'brush-publish': False}), ({'start': 1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 3, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [2, 3], 'bucket-intersection': [1], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 3, 'brush-publish': True}), ({'start': 6, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': True})], 3: [({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 0], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': 1, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 2, 'brush-publish': True}), ({'start': 3, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 3, 'brush-publish': True}), ({'start': 3, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [3, 5], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 3, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 6, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [2, 6], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [5, 6], 'bucket-intersection': [2], 'click-no-range': False, 'brush-domain-start': 5, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': -1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False})], 4: [({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': True}), ({'start': 0, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 0], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': 3, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [2, 3], 'bucket-intersection': [1], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [3, 5], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 3, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 6, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [2, 6], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': -1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': True}), ({'start': -1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 0, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 0], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False})], 5: [({'start': 1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 1], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 1, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 6, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 6, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [5, 6], 'bucket-intersection': [2], 'click-no-range': False, 'brush-domain-start': 5, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': True}), ({'start': -1, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 2, 'brush-publish': False}), ({'start': -1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 2, 'brush-publish': True}), ({'start': 1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
check("contract fixture " + str(index), solve(data), 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 |
|---|---|---|---|
| contract fixture 0 | {'brush-domain-end': 0, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': False, 'normalize-drag': [-1, 0]} | {'brush-domain-end': 0, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': False, 'normalize-drag': [-1, 0]} | Passed |
| contract fixture 1 | {'brush-domain-end': 1, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': False, 'normalize-drag': [1, 1]} | {'brush-domain-end': 1, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': True, 'normalize-drag': [1, 1]} | Failed |
| contract fixture 2 | {'brush-domain-end': 5, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [-1, 5]} | {'brush-domain-end': 5, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [-1, 5]} | Passed |
| contract fixture 3 | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | Passed |
| contract fixture 4 | {'brush-domain-end': 2, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 2]} | {'brush-domain-end': 2, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 2]} | Passed |
| contract fixture 5 | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | Passed |
| contract fixture 6 | {'brush-domain-end': 5, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [1, 5]} | {'brush-domain-end': 5, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [1, 5]} | Passed |
| contract fixture 7 | {'brush-domain-end': 3, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1], 'click-no-range': False, 'normalize-drag': [0, 3]} | {'brush-domain-end': 3, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1], 'click-no-range': False, 'normalize-drag': [0, 3]} | Passed |
| contract fixture 8 | {'brush-domain-end': 3, 'brush-domain-start': 2, 'brush-publish': False, 'bucket-intersection': [1], 'click-no-range': False, 'normalize-drag': [2, 3]} | {'brush-domain-end': 3, 'brush-domain-start': 2, 'brush-publish': False, 'bucket-intersection': [1], 'click-no-range': False, 'normalize-drag': [2, 3]} | Passed |
| contract fixture 9 | {'brush-domain-end': 5, 'brush-domain-start': 3, 'brush-publish': True, 'bucket-intersection': [1, 2], 'click-no-range': False, 'normalize-drag': [3, 5]} | {'brush-domain-end': 5, 'brush-domain-start': 3, 'brush-publish': True, 'bucket-intersection': [1, 2], 'click-no-range': False, 'normalize-drag': [3, 5]} | Passed |
SHA-256 / 198a69f802266c14677efb5c977409e521990ba53455003923a6f883b1ddcc04
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'normalize-drag':([min(d['start'],d['end']),max(d['start'],d['end'])]), 'bucket-intersection':([i for i,(a,b) in enumerate(d['bins']) if a<max(d['start'],d['end']) and b>min(d['start'],d['end'])] if d['start']!=d['end'] else []), 'click-no-range':(d['start']==d['end']), 'brush-domain-start':(max(d['minimum'],min(d['start'],d['end']))), 'brush-domain-end':(min(d['maximum'],max(d['start'],d['end']))), 'brush-publish':(d['released'] and d['start']!=d['end'])}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': 1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 1], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 1, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': -1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 2, 'brush-publish': True}), ({'start': 1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 3, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 3, 'brush-publish': True}), ({'start': 3, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [2, 3], 'bucket-intersection': [1], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [3, 5], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 3, 'brush-domain-end': 5, 'brush-publish': True})], 2: [({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': True}), ({'start': 1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 1], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 1, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': True}), ({'start': 1, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 2, 'brush-publish': False}), ({'start': 1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 3, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [2, 3], 'bucket-intersection': [1], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 3, 'brush-publish': True}), ({'start': 6, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': True})], 3: [({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 0], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': 1, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 2, 'brush-publish': True}), ({'start': 3, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 3], 'bucket-intersection': [0, 1], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 3, 'brush-publish': True}), ({'start': 3, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [3, 5], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 3, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 6, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [2, 6], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [5, 6], 'bucket-intersection': [2], 'click-no-range': False, 'brush-domain-start': 5, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': -1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False})], 4: [({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': True}), ({'start': 0, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 0], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': 3, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [2, 3], 'bucket-intersection': [1], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 3, 'brush-publish': False}), ({'start': 3, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [3, 5], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 3, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 6, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 6, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [2, 6], 'bucket-intersection': [1, 2], 'click-no-range': False, 'brush-domain-start': 2, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False}), ({'start': -1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': True}), ({'start': -1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': 0, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 0], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': False})], 5: [({'start': 1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 1, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 1], 'bucket-intersection': [], 'click-no-range': True, 'brush-domain-start': 1, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 6, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [1, 6], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 6, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [5, 6], 'bucket-intersection': [2], 'click-no-range': False, 'brush-domain-start': 5, 'brush-domain-end': 5, 'brush-publish': False}), ({'start': -1, 'end': 0, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 0], 'bucket-intersection': [], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 0, 'brush-publish': True}), ({'start': -1, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [-1, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 2, 'brush-publish': False}), ({'start': -1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [-1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 5, 'brush-publish': True}), ({'start': 0, 'end': 1, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [0, 1], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 1, 'brush-publish': False}), ({'start': 0, 'end': 2, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': True}, {'normalize-drag': [0, 2], 'bucket-intersection': [0], 'click-no-range': False, 'brush-domain-start': 0, 'brush-domain-end': 2, 'brush-publish': True}), ({'start': 1, 'end': 5, 'bins': [[0, 2], [2, 4], [4, 6]], 'minimum': 0, 'maximum': 5, 'released': False}, {'normalize-drag': [1, 5], 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'brush-domain-start': 1, 'brush-domain-end': 5, 'brush-publish': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
check("contract fixture " + str(index), solve(data), 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 |
|---|---|---|---|
| contract fixture 0 | {'brush-domain-end': 0, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': False, 'normalize-drag': [-1, 0]} | {'brush-domain-end': 0, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': False, 'normalize-drag': [-1, 0]} | Passed |
| contract fixture 1 | {'brush-domain-end': 1, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': True, 'normalize-drag': [1, 1]} | {'brush-domain-end': 1, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [], 'click-no-range': True, 'normalize-drag': [1, 1]} | Passed |
| contract fixture 2 | {'brush-domain-end': 5, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [-1, 5]} | {'brush-domain-end': 5, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [-1, 5]} | Passed |
| contract fixture 3 | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | Passed |
| contract fixture 4 | {'brush-domain-end': 2, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 2]} | {'brush-domain-end': 2, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 2]} | Passed |
| contract fixture 5 | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | {'brush-domain-end': 1, 'brush-domain-start': 0, 'brush-publish': False, 'bucket-intersection': [0], 'click-no-range': False, 'normalize-drag': [0, 1]} | Passed |
| contract fixture 6 | {'brush-domain-end': 5, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [1, 5]} | {'brush-domain-end': 5, 'brush-domain-start': 1, 'brush-publish': False, 'bucket-intersection': [0, 1, 2], 'click-no-range': False, 'normalize-drag': [1, 5]} | Passed |
| contract fixture 7 | {'brush-domain-end': 3, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1], 'click-no-range': False, 'normalize-drag': [0, 3]} | {'brush-domain-end': 3, 'brush-domain-start': 0, 'brush-publish': True, 'bucket-intersection': [0, 1], 'click-no-range': False, 'normalize-drag': [0, 3]} | Passed |
| contract fixture 8 | {'brush-domain-end': 3, 'brush-domain-start': 2, 'brush-publish': False, 'bucket-intersection': [1], 'click-no-range': False, 'normalize-drag': [2, 3]} | {'brush-domain-end': 3, 'brush-domain-start': 2, 'brush-publish': False, 'bucket-intersection': [1], 'click-no-range': False, 'normalize-drag': [2, 3]} | Passed |
| contract fixture 9 | {'brush-domain-end': 5, 'brush-domain-start': 3, 'brush-publish': True, 'bucket-intersection': [1, 2], 'click-no-range': False, 'normalize-drag': [3, 5]} | {'brush-domain-end': 5, 'brush-domain-start': 3, 'brush-publish': True, 'bucket-intersection': [1, 2], 'click-no-range': False, 'normalize-drag': [3, 5]} | Passed |
SHA-256 / c0aa292a8383b6faa55893694835c1d85d6cc3b093ea34b29e2960e114aa3981
Verification & scope
Deterministic bounded UI-state model only; no browser, query engine, network, or production-standard conformance is claimed. 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:41:14.337808+00:00.
Case digest / e6d71970ece3b983811e010f298fe067a414c1309f971b0f096e17b89c3a7dfd