FA-77816 / Legal deadline computation / Open access
Dependent briefing deadlines computed from a rolled predecessor: hearing gap · case 01
A hearing exactly seven days after the reply due date is flagged as non-compliant.
ROOT CAUSE
The minimum gap is treated as exclusive.
VERIFIED REPAIR
At the hearing gap decision use `(dt.date.fromisoformat(hearing) - reply).days >= 7`, leaving the other decision sites of the model unchanged.
Unsuccessful approach: The partial repair `(dt.date.fromisoformat(hearing) - rbase).days >= 14` measures the gap from the reply base instead of the rolled reply due date.
Case contract
Stipulated: the opposition is due 14 days after the motion was served; the reply is due 7 days after the opposition due date, or after actual service of the opposition if it was served earlier. Every computed deadline on a weekend or listed holiday moves to the next open day before it is used as the base of a later deadline. The hearing is compliant when it is at least 7 days after the reply due date. Return [opposition due, reply due, compliant].
Why this case matters
Docketing systems compute filing and response deadlines from trigger events; a wrong date can forfeit a right.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import datetime as dt
import calendar
N = 1
observations = []
def solve(motion_served, opp_served, hearing, holidays):
hol = {dt.date.fromisoformat(x) for x in holidays}
def roll(d):
while d.weekday() >= 5 or d in hol:
d += dt.timedelta(days=1)
return d
m = dt.date.fromisoformat(motion_served)
opp = roll(m + dt.timedelta(days=14))
rbase = min(opp, dt.date.fromisoformat(opp_served)) if opp_served else opp
reply = roll(rbase + dt.timedelta(days=7))
ok = (dt.date.fromisoformat(hearing) - reply).days > 7
return [opp.isoformat(), reply.isoformat(), ok]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: opposition due saturday',
['2024-03-02',
None,
'2024-03-30',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', False]),
('early opposition service',
['2024-03-04',
'2024-03-12',
'2024-04-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-19', True]),
('late opposition service',
['2024-03-04',
'2024-03-25',
'2024-04-05',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', True]),
('opposition due on holiday',
['2024-06-20',
None,
'2024-07-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-07-05', '2024-07-12', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True]),
('hearing six days',
['2024-04-01',
None,
'2024-04-28',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', False]),
('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False])],
[('late opposition service',
['2024-03-04',
'2024-03-25',
'2024-04-05',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', True]),
('opposition due on holiday',
['2024-06-20',
None,
'2024-07-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-07-05', '2024-07-12', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True]),
('hearing six days',
['2024-04-01',
None,
'2024-04-28',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', False]),
('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('opposition due monday holiday',
['2024-05-13',
None,
'2024-06-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-28', '2024-06-04', True]),
('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False])],
[('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True]),
('hearing six days',
['2024-04-01',
None,
'2024-04-28',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', False]),
('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('opposition due monday holiday',
['2024-05-13',
None,
'2024-06-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-28', '2024-06-04', True]),
('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('thanksgiving chain',
['2024-11-14',
None,
'2024-12-12',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-11-29', '2024-12-06', False]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False])],
[('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('opposition due monday holiday',
['2024-05-13',
None,
'2024-06-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-28', '2024-06-04', True]),
('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('thanksgiving chain',
['2024-11-14',
None,
'2024-12-12',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-11-29', '2024-12-06', False]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False]),
('regression: opposition due saturday',
['2024-03-02',
None,
'2024-03-30',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', False]),
('early opposition service',
['2024-03-04',
'2024-03-12',
'2024-04-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-19', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True])],
[('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('thanksgiving chain',
['2024-11-14',
None,
'2024-12-12',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-11-29', '2024-12-06', False]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False]),
('regression: opposition due saturday',
['2024-03-02',
None,
'2024-03-30',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', False]),
('early opposition service',
['2024-03-04',
'2024-03-12',
'2024-04-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-19', True]),
('late opposition service',
['2024-03-04',
'2024-03-25',
'2024-04-05',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', True]),
('opposition due on holiday',
['2024-06-20',
None,
'2024-07-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-07-05', '2024-07-12', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), 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 |
|---|---|---|---|
| regression: opposition due saturday | ['2024-03-18', '2024-03-25', False] | ['2024-03-18', '2024-03-25', False] | Passed |
| early opposition service | ['2024-03-18', '2024-03-19', True] | ['2024-03-18', '2024-03-19', True] | Passed |
| late opposition service | ['2024-03-18', '2024-03-25', True] | ['2024-03-18', '2024-03-25', True] | Passed |
| opposition due on holiday | ['2024-07-05', '2024-07-12', True] | ['2024-07-05', '2024-07-12', True] | Passed |
| hearing exactly seven days | ['2024-04-15', '2024-04-22', False] | ['2024-04-15', '2024-04-22', True] | Failed |
| hearing six days | ['2024-04-15', '2024-04-22', False] | ['2024-04-15', '2024-04-22', False] | Passed |
| reply lands on weekend | ['2024-05-15', '2024-05-20', True] | ['2024-05-15', '2024-05-20', True] | Passed |
| reply rolled, hearing two weeks after base | ['2024-05-15', '2024-05-20', False] | ['2024-05-15', '2024-05-20', False] | Passed |
SHA-256 / 2b12efa0bbfb53b5486143703e693ff22ba7e01e0cab5305d2fdfbd4fad21217
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import datetime as dt
import calendar
N = 1
observations = []
def solve(motion_served, opp_served, hearing, holidays):
hol = {dt.date.fromisoformat(x) for x in holidays}
def roll(d):
while d.weekday() >= 5 or d in hol:
d += dt.timedelta(days=1)
return d
m = dt.date.fromisoformat(motion_served)
opp = roll(m + dt.timedelta(days=14))
rbase = min(opp, dt.date.fromisoformat(opp_served)) if opp_served else opp
reply = roll(rbase + dt.timedelta(days=7))
ok = (dt.date.fromisoformat(hearing) - rbase).days >= 14
return [opp.isoformat(), reply.isoformat(), ok]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: opposition due saturday',
['2024-03-02',
None,
'2024-03-30',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', False]),
('early opposition service',
['2024-03-04',
'2024-03-12',
'2024-04-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-19', True]),
('late opposition service',
['2024-03-04',
'2024-03-25',
'2024-04-05',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', True]),
('opposition due on holiday',
['2024-06-20',
None,
'2024-07-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-07-05', '2024-07-12', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True]),
('hearing six days',
['2024-04-01',
None,
'2024-04-28',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', False]),
('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False])],
[('late opposition service',
['2024-03-04',
'2024-03-25',
'2024-04-05',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', True]),
('opposition due on holiday',
['2024-06-20',
None,
'2024-07-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-07-05', '2024-07-12', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True]),
('hearing six days',
['2024-04-01',
None,
'2024-04-28',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', False]),
('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('opposition due monday holiday',
['2024-05-13',
None,
'2024-06-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-28', '2024-06-04', True]),
('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False])],
[('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True]),
('hearing six days',
['2024-04-01',
None,
'2024-04-28',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', False]),
('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('opposition due monday holiday',
['2024-05-13',
None,
'2024-06-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-28', '2024-06-04', True]),
('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('thanksgiving chain',
['2024-11-14',
None,
'2024-12-12',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-11-29', '2024-12-06', False]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False])],
[('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('opposition due monday holiday',
['2024-05-13',
None,
'2024-06-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-28', '2024-06-04', True]),
('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('thanksgiving chain',
['2024-11-14',
None,
'2024-12-12',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-11-29', '2024-12-06', False]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False]),
('regression: opposition due saturday',
['2024-03-02',
None,
'2024-03-30',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', False]),
('early opposition service',
['2024-03-04',
'2024-03-12',
'2024-04-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-19', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True])],
[('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('thanksgiving chain',
['2024-11-14',
None,
'2024-12-12',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-11-29', '2024-12-06', False]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False]),
('regression: opposition due saturday',
['2024-03-02',
None,
'2024-03-30',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', False]),
('early opposition service',
['2024-03-04',
'2024-03-12',
'2024-04-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-19', True]),
('late opposition service',
['2024-03-04',
'2024-03-25',
'2024-04-05',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', True]),
('opposition due on holiday',
['2024-06-20',
None,
'2024-07-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-07-05', '2024-07-12', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), 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 |
|---|---|---|---|
| regression: opposition due saturday | ['2024-03-18', '2024-03-25', False] | ['2024-03-18', '2024-03-25', False] | Passed |
| early opposition service | ['2024-03-18', '2024-03-19', True] | ['2024-03-18', '2024-03-19', True] | Passed |
| late opposition service | ['2024-03-18', '2024-03-25', True] | ['2024-03-18', '2024-03-25', True] | Passed |
| opposition due on holiday | ['2024-07-05', '2024-07-12', True] | ['2024-07-05', '2024-07-12', True] | Passed |
| hearing exactly seven days | ['2024-04-15', '2024-04-22', True] | ['2024-04-15', '2024-04-22', True] | Passed |
| hearing six days | ['2024-04-15', '2024-04-22', False] | ['2024-04-15', '2024-04-22', False] | Passed |
| reply lands on weekend | ['2024-05-15', '2024-05-20', True] | ['2024-05-15', '2024-05-20', True] | Passed |
| reply rolled, hearing two weeks after base | ['2024-05-15', '2024-05-20', True] | ['2024-05-15', '2024-05-20', False] | Failed |
SHA-256 / f4f05de4aeacae6f9eb8117b5ec26f6cd1a62496c36075781dd9dc7534e3e9a7
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import datetime as dt
import calendar
N = 1
observations = []
def solve(motion_served, opp_served, hearing, holidays):
hol = {dt.date.fromisoformat(x) for x in holidays}
def roll(d):
while d.weekday() >= 5 or d in hol:
d += dt.timedelta(days=1)
return d
m = dt.date.fromisoformat(motion_served)
opp = roll(m + dt.timedelta(days=14))
rbase = min(opp, dt.date.fromisoformat(opp_served)) if opp_served else opp
reply = roll(rbase + dt.timedelta(days=7))
ok = (dt.date.fromisoformat(hearing) - reply).days >= 7
return [opp.isoformat(), reply.isoformat(), ok]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: opposition due saturday',
['2024-03-02',
None,
'2024-03-30',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', False]),
('early opposition service',
['2024-03-04',
'2024-03-12',
'2024-04-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-19', True]),
('late opposition service',
['2024-03-04',
'2024-03-25',
'2024-04-05',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', True]),
('opposition due on holiday',
['2024-06-20',
None,
'2024-07-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-07-05', '2024-07-12', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True]),
('hearing six days',
['2024-04-01',
None,
'2024-04-28',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', False]),
('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False])],
[('late opposition service',
['2024-03-04',
'2024-03-25',
'2024-04-05',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', True]),
('opposition due on holiday',
['2024-06-20',
None,
'2024-07-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-07-05', '2024-07-12', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True]),
('hearing six days',
['2024-04-01',
None,
'2024-04-28',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', False]),
('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('opposition due monday holiday',
['2024-05-13',
None,
'2024-06-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-28', '2024-06-04', True]),
('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False])],
[('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True]),
('hearing six days',
['2024-04-01',
None,
'2024-04-28',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', False]),
('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('opposition due monday holiday',
['2024-05-13',
None,
'2024-06-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-28', '2024-06-04', True]),
('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('thanksgiving chain',
['2024-11-14',
None,
'2024-12-12',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-11-29', '2024-12-06', False]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False])],
[('reply lands on weekend',
['2024-05-01',
'2024-05-11',
'2024-06-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', True]),
('opposition due monday holiday',
['2024-05-13',
None,
'2024-06-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-28', '2024-06-04', True]),
('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('thanksgiving chain',
['2024-11-14',
None,
'2024-12-12',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-11-29', '2024-12-06', False]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False]),
('regression: opposition due saturday',
['2024-03-02',
None,
'2024-03-30',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', False]),
('early opposition service',
['2024-03-04',
'2024-03-12',
'2024-04-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-19', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True])],
[('served on weekend',
['2024-09-07',
None,
'2024-10-15',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-09-23', '2024-09-30', True]),
('thanksgiving chain',
['2024-11-14',
None,
'2024-12-12',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-11-29', '2024-12-06', False]),
('reply rolled, hearing two weeks after base',
['2024-05-01',
'2024-05-11',
'2024-05-25',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-05-15', '2024-05-20', False]),
('regression: opposition due saturday',
['2024-03-02',
None,
'2024-03-30',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', False]),
('early opposition service',
['2024-03-04',
'2024-03-12',
'2024-04-01',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-19', True]),
('late opposition service',
['2024-03-04',
'2024-03-25',
'2024-04-05',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-03-18', '2024-03-25', True]),
('opposition due on holiday',
['2024-06-20',
None,
'2024-07-20',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-07-05', '2024-07-12', True]),
('hearing exactly seven days',
['2024-04-01',
None,
'2024-04-29',
['2024-01-01',
'2024-01-15',
'2024-02-19',
'2024-05-27',
'2024-06-19',
'2024-07-04',
'2024-09-02',
'2024-10-14',
'2024-11-11',
'2024-11-28',
'2024-12-25']],
['2024-04-15', '2024-04-22', True])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), 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 |
|---|---|---|---|
| regression: opposition due saturday | ['2024-03-18', '2024-03-25', False] | ['2024-03-18', '2024-03-25', False] | Passed |
| early opposition service | ['2024-03-18', '2024-03-19', True] | ['2024-03-18', '2024-03-19', True] | Passed |
| late opposition service | ['2024-03-18', '2024-03-25', True] | ['2024-03-18', '2024-03-25', True] | Passed |
| opposition due on holiday | ['2024-07-05', '2024-07-12', True] | ['2024-07-05', '2024-07-12', True] | Passed |
| hearing exactly seven days | ['2024-04-15', '2024-04-22', True] | ['2024-04-15', '2024-04-22', True] | Passed |
| hearing six days | ['2024-04-15', '2024-04-22', False] | ['2024-04-15', '2024-04-22', False] | Passed |
| reply lands on weekend | ['2024-05-15', '2024-05-20', True] | ['2024-05-15', '2024-05-20', True] | Passed |
| reply rolled, hearing two weeks after base | ['2024-05-15', '2024-05-20', False] | ['2024-05-15', '2024-05-20', False] | Passed |
SHA-256 / 2b12858b1dd3e4527989a2d1fe0fe8dfb388c7870bb34017cadbd492b54bcfde
Verification & scope
Stipulated toy deadline rules evaluated offline on explicit fixtures. The contract is inspired by common court-rule structures but is not legal advice and makes no claim to reproduce any jurisdiction's rules. 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:49:29.360447+00:00.
Case digest / 56de33e5612a3776fefc52820ca79b82b1a56b4b52fd58a2469834a8798aea38