FA-25281 / Filter interfaces / Open access
Editing a custom endpoint detaches the rolling-preset identifier · case 01
Editing a custom endpoint detaches the rolling-preset identifier is violated by the widget projection.
ROOT CAUSE
The custom-reset decision uses `d['days']` instead of the stipulated date-window-editor projection.
VERIFIED REPAIR
Implement the declared custom-reset projection: `None if d['custom'] else d['days']`.
Unsuccessful approach: The attempted correction `None` still violates the explicit contract fixtures.
Case contract
A stipulated day-index filter uses inclusive display dates and an exclusive serialized end, with rolling presets bound either to live now or a frozen snapshot. This example checks: Editing a custom endpoint detaches the rolling-preset identifier.
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 {'exclusive-end':(None if d['end'] is None else d['end']+1), 'rolling-start':((d['now'] if d['live'] else d['snapshot'])-d['days']+1), 'rolling-end':((d['now'] if d['live'] else d['snapshot'])+1), 'future-warning':(d['end'] is not None and d['end']>d['now']), 'custom-reset':(d['days']), 'display-span':(None if d['end'] is None else d['end']-d['start']+1)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': None, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': 1}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': 11}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': 1})], 2: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': None, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': None, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': -9}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': 11}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': True, 'custom-reset': None, 'display-span': 12})], 3: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': 1}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': -9}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': True, 'custom-reset': None, 'display-span': 12}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': True, 'custom-reset': 1, 'display-span': 2})], 4: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': -9}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': True, 'custom-reset': 1, 'display-span': 12}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': True, 'custom-reset': None, 'display-span': 12}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': True, 'custom-reset': 1, 'display-span': 2}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': True, 'custom-reset': None, 'display-span': 2})], 5: [({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': 1}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': True, 'custom-reset': 1, 'display-span': 12}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': True, 'custom-reset': None, 'display-span': 12}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': True, 'custom-reset': 7, 'display-span': 2}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': None})]}
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 | {'custom-reset': 1, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | Failed |
| contract fixture 1 | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | Passed |
| contract fixture 2 | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | Failed |
| contract fixture 3 | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | Passed |
| contract fixture 4 | {'custom-reset': 1, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | {'custom-reset': None, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | Failed |
| contract fixture 5 | {'custom-reset': 7, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | {'custom-reset': 7, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | Passed |
| contract fixture 6 | {'custom-reset': 1, 'display-span': -9, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | {'custom-reset': None, 'display-span': -9, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | Failed |
| contract fixture 7 | {'custom-reset': 1, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | {'custom-reset': 1, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | Passed |
| contract fixture 8 | {'custom-reset': 7, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | {'custom-reset': None, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | Failed |
| contract fixture 9 | {'custom-reset': 1, 'display-span': 1, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | {'custom-reset': 1, 'display-span': 1, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | Passed |
SHA-256 / 1668e89f7ec2a9c4e5a0a4f28530ac9679387d7ff2a810842ef5370a3f43abd1
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'exclusive-end':(None if d['end'] is None else d['end']+1), 'rolling-start':((d['now'] if d['live'] else d['snapshot'])-d['days']+1), 'rolling-end':((d['now'] if d['live'] else d['snapshot'])+1), 'future-warning':(d['end'] is not None and d['end']>d['now']), 'custom-reset':(None), 'display-span':(None if d['end'] is None else d['end']-d['start']+1)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': None, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': 1}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': 11}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': 1})], 2: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': None, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': None, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': -9}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': 11}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': True, 'custom-reset': None, 'display-span': 12})], 3: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': 1}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': -9}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': True, 'custom-reset': None, 'display-span': 12}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': True, 'custom-reset': 1, 'display-span': 2})], 4: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': -9}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': True, 'custom-reset': 1, 'display-span': 12}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': True, 'custom-reset': None, 'display-span': 12}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': True, 'custom-reset': 1, 'display-span': 2}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': True, 'custom-reset': None, 'display-span': 2})], 5: [({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': 1}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': True, 'custom-reset': 1, 'display-span': 12}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': True, 'custom-reset': None, 'display-span': 12}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': True, 'custom-reset': 7, 'display-span': 2}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': None})]}
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 | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | Passed |
| contract fixture 1 | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | Failed |
| contract fixture 2 | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | Passed |
| contract fixture 3 | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | Failed |
| contract fixture 4 | {'custom-reset': None, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | {'custom-reset': None, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | Passed |
| contract fixture 5 | {'custom-reset': None, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | {'custom-reset': 7, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | Failed |
| contract fixture 6 | {'custom-reset': None, 'display-span': -9, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | {'custom-reset': None, 'display-span': -9, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | Passed |
| contract fixture 7 | {'custom-reset': None, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | {'custom-reset': 1, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | Failed |
| contract fixture 8 | {'custom-reset': None, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | {'custom-reset': None, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | Passed |
| contract fixture 9 | {'custom-reset': None, 'display-span': 1, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | {'custom-reset': 1, 'display-span': 1, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | Failed |
SHA-256 / 805cdd11a0ac8a1638059419745e024a95a7e1c4a2ba63119fc106ac3b023713
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'exclusive-end':(None if d['end'] is None else d['end']+1), 'rolling-start':((d['now'] if d['live'] else d['snapshot'])-d['days']+1), 'rolling-end':((d['now'] if d['live'] else d['snapshot'])+1), 'future-warning':(d['end'] is not None and d['end']>d['now']), 'custom-reset':(None if d['custom'] else d['days']), 'display-span':(None if d['end'] is None else d['end']-d['start']+1)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': None, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': 1}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': 11}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': 1})], 2: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': None, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': None, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': None}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': -9}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': 11}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': True, 'custom-reset': None, 'display-span': 12})], 3: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': 1}), ({'end': 0, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 1, 'display-span': -9}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 1, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': True, 'custom-reset': None, 'display-span': 12}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': True, 'custom-reset': 1, 'display-span': 2})], 4: [({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': -9}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 7, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': True, 'custom-reset': 1, 'display-span': 12}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': True, 'custom-reset': None, 'display-span': 12}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': True, 'custom-reset': 1, 'display-span': 2}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': True, 'custom-reset': None, 'display-span': 2})], 5: [({'end': None, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': 0, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': 1, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': -9}), ({'end': 10, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': False, 'custom-reset': None, 'display-span': 11}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': False}, {'exclusive-end': 11, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': 1, 'display-span': 1}), ({'end': 10, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': True}, {'exclusive-end': 11, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': 1}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': True, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 10, 'rolling-end': 11, 'future-warning': True, 'custom-reset': 1, 'display-span': 12}), ({'end': 11, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': True}, {'exclusive-end': 12, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': True, 'custom-reset': None, 'display-span': 12}), ({'end': 11, 'start': 10, 'now': 10, 'snapshot': 8, 'days': 7, 'live': False, 'custom': False}, {'exclusive-end': 12, 'rolling-start': 2, 'rolling-end': 9, 'future-warning': True, 'custom-reset': 7, 'display-span': 2}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 1, 'live': False, 'custom': True}, {'exclusive-end': None, 'rolling-start': 8, 'rolling-end': 9, 'future-warning': False, 'custom-reset': None, 'display-span': None}), ({'end': None, 'start': 0, 'now': 10, 'snapshot': 8, 'days': 7, 'live': True, 'custom': False}, {'exclusive-end': None, 'rolling-start': 4, 'rolling-end': 11, 'future-warning': False, 'custom-reset': 7, 'display-span': None})]}
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 | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | Passed |
| contract fixture 1 | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | Passed |
| contract fixture 2 | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | {'custom-reset': None, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | Passed |
| contract fixture 3 | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | {'custom-reset': 7, 'display-span': None, 'exclusive-end': None, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | Passed |
| contract fixture 4 | {'custom-reset': None, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | {'custom-reset': None, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | Passed |
| contract fixture 5 | {'custom-reset': 7, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | {'custom-reset': 7, 'display-span': 1, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 4} | Passed |
| contract fixture 6 | {'custom-reset': None, 'display-span': -9, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | {'custom-reset': None, 'display-span': -9, 'exclusive-end': 1, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | Passed |
| contract fixture 7 | {'custom-reset': 1, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | {'custom-reset': 1, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 8} | Passed |
| contract fixture 8 | {'custom-reset': None, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | {'custom-reset': None, 'display-span': 11, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 9, 'rolling-start': 2} | Passed |
| contract fixture 9 | {'custom-reset': 1, 'display-span': 1, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | {'custom-reset': 1, 'display-span': 1, 'exclusive-end': 11, 'future-warning': False, 'rolling-end': 11, 'rolling-start': 10} | Passed |
SHA-256 / 88b191717d9cab3c10274cf41a5b03ac4dcc03de94bf5d005cea5d962a516546
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:05.212651+00:00.
Case digest / b216e3fa2b9bd3dad9dbddbe9d4ef52ed1f3af14d6b436acb90ea6d153051156