FA-77516 / Legal deadline computation / Open access
Notice-of-appeal deadline with tolling post-judgment motions: latest disposition · case 01
When motions are listed out of order, the period runs from an earlier disposition.
ROOT CAUSE
The period restarts from the last listed disposition rather than the latest one.
VERIFIED REPAIR
At the latest disposition decision use `max(start, dt.date.fromisoformat(disposed))`, leaving the other decision sites of the model unchanged.
Unsuccessful approach: The partial repair `max(e, dt.date.fromisoformat(disposed))` only guards against dispositions before entry, still taking the last listed one.
Case contract
Stipulated: the period is 30 days after entry of judgment, or 60 days if any party is the united-states, an agency or an officer. A motion filed within 28 days after entry (inclusive) tolls the period, which then runs from the latest disposition of such motions; if any tolling motion is undisposed the result is "pending". Untimely motions have no effect. A deadline on a Saturday, Sunday or listed holiday moves to the next open day.
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(entry, parties, motions, holidays):
e = dt.date.fromisoformat(entry)
hol = {dt.date.fromisoformat(x) for x in holidays}
period = 60 if any(p in ('united-states', 'agency', 'officer') for p in parties) else 30
start = e
pending = False
for filed, disposed in motions:
f = dt.date.fromisoformat(filed)
if (f - e).days <= 28:
if disposed is None:
pending = True
else:
start = dt.date.fromisoformat(disposed)
if pending:
return 'pending'
d = start + dt.timedelta(days=period)
while d.weekday() >= 5 or d in hol:
d += dt.timedelta(days=1)
return d.isoformat()
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: agency party',
['2024-03-01',
['agency', 'smith'],
[],
['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-30'),
('private parties',
['2024-03-01',
['smith', 'jones'],
[],
['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-01'),
('government second',
['2024-03-01',
['smith', 'officer'],
[],
['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-30'),
('motion on day 28',
['2024-03-01',
['smith'],
[['2024-03-29', '2024-04-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-05-15'),
('motion on day 29',
['2024-03-01',
['smith'],
[['2024-03-30', '2024-04-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-04-01'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31'),
('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending')],
[('government second',
['2024-03-01',
['smith', 'officer'],
[],
['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-30'),
('motion on day 28',
['2024-03-01',
['smith'],
[['2024-03-29', '2024-04-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-05-15'),
('motion on day 29',
['2024-03-01',
['smith'],
[['2024-03-30', '2024-04-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-04-01'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31'),
('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending'),
('single pending',
['2024-03-01',
['smith'],
[['2024-03-10', None]],
['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']],
'pending'),
('lands on holiday',
['2024-06-04',
['smith'],
[],
['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')],
[('motion on day 29',
['2024-03-01',
['smith'],
[['2024-03-30', '2024-04-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-04-01'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31'),
('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending'),
('single pending',
['2024-03-01',
['smith'],
[['2024-03-10', None]],
['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']],
'pending'),
('lands on holiday',
['2024-06-04',
['smith'],
[],
['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'),
('lands on weekend',
['2024-02-05',
['smith'],
[],
['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-06'),
('untimely pending ignored',
['2024-01-10',
['united-states'],
[['2024-02-20', None]],
['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-11')],
[('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending'),
('single pending',
['2024-03-01',
['smith'],
[['2024-03-10', None]],
['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']],
'pending'),
('lands on holiday',
['2024-06-04',
['smith'],
[],
['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'),
('lands on weekend',
['2024-02-05',
['smith'],
[],
['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-06'),
('untimely pending ignored',
['2024-01-10',
['united-states'],
[['2024-02-20', None]],
['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-11'),
('memorial day landing',
['2024-04-27',
['smith'],
[],
['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'),
('regression: agency party',
['2024-03-01',
['agency', 'smith'],
[],
['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-30'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31')],
[('lands on holiday',
['2024-06-04',
['smith'],
[],
['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'),
('lands on weekend',
['2024-02-05',
['smith'],
[],
['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-06'),
('untimely pending ignored',
['2024-01-10',
['united-states'],
[['2024-02-20', None]],
['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-11'),
('memorial day landing',
['2024-04-27',
['smith'],
[],
['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'),
('regression: agency party',
['2024-03-01',
['agency', 'smith'],
[],
['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-30'),
('private parties',
['2024-03-01',
['smith', 'jones'],
[],
['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-01'),
('government second',
['2024-03-01',
['smith', 'officer'],
[],
['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-30'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31')]]
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: agency party | 2024-04-30 | 2024-04-30 | Passed |
| private parties | 2024-04-01 | 2024-04-01 | Passed |
| government second | 2024-04-30 | 2024-04-30 | Passed |
| motion on day 28 | 2024-05-15 | 2024-05-15 | Passed |
| motion on day 29 | 2024-04-01 | 2024-04-01 | Passed |
| out of order dispositions | 2024-05-10 | 2024-05-31 | Failed |
| pending after disposed | pending | pending | Passed |
SHA-256 / e8a6ec33ac06b310dc43ba03a916dac89cb679805cb347b4182274af07ce8709
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(entry, parties, motions, holidays):
e = dt.date.fromisoformat(entry)
hol = {dt.date.fromisoformat(x) for x in holidays}
period = 60 if any(p in ('united-states', 'agency', 'officer') for p in parties) else 30
start = e
pending = False
for filed, disposed in motions:
f = dt.date.fromisoformat(filed)
if (f - e).days <= 28:
if disposed is None:
pending = True
else:
start = max(e, dt.date.fromisoformat(disposed))
if pending:
return 'pending'
d = start + dt.timedelta(days=period)
while d.weekday() >= 5 or d in hol:
d += dt.timedelta(days=1)
return d.isoformat()
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: agency party',
['2024-03-01',
['agency', 'smith'],
[],
['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-30'),
('private parties',
['2024-03-01',
['smith', 'jones'],
[],
['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-01'),
('government second',
['2024-03-01',
['smith', 'officer'],
[],
['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-30'),
('motion on day 28',
['2024-03-01',
['smith'],
[['2024-03-29', '2024-04-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-05-15'),
('motion on day 29',
['2024-03-01',
['smith'],
[['2024-03-30', '2024-04-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-04-01'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31'),
('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending')],
[('government second',
['2024-03-01',
['smith', 'officer'],
[],
['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-30'),
('motion on day 28',
['2024-03-01',
['smith'],
[['2024-03-29', '2024-04-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-05-15'),
('motion on day 29',
['2024-03-01',
['smith'],
[['2024-03-30', '2024-04-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-04-01'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31'),
('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending'),
('single pending',
['2024-03-01',
['smith'],
[['2024-03-10', None]],
['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']],
'pending'),
('lands on holiday',
['2024-06-04',
['smith'],
[],
['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')],
[('motion on day 29',
['2024-03-01',
['smith'],
[['2024-03-30', '2024-04-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-04-01'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31'),
('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending'),
('single pending',
['2024-03-01',
['smith'],
[['2024-03-10', None]],
['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']],
'pending'),
('lands on holiday',
['2024-06-04',
['smith'],
[],
['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'),
('lands on weekend',
['2024-02-05',
['smith'],
[],
['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-06'),
('untimely pending ignored',
['2024-01-10',
['united-states'],
[['2024-02-20', None]],
['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-11')],
[('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending'),
('single pending',
['2024-03-01',
['smith'],
[['2024-03-10', None]],
['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']],
'pending'),
('lands on holiday',
['2024-06-04',
['smith'],
[],
['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'),
('lands on weekend',
['2024-02-05',
['smith'],
[],
['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-06'),
('untimely pending ignored',
['2024-01-10',
['united-states'],
[['2024-02-20', None]],
['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-11'),
('memorial day landing',
['2024-04-27',
['smith'],
[],
['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'),
('regression: agency party',
['2024-03-01',
['agency', 'smith'],
[],
['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-30'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31')],
[('lands on holiday',
['2024-06-04',
['smith'],
[],
['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'),
('lands on weekend',
['2024-02-05',
['smith'],
[],
['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-06'),
('untimely pending ignored',
['2024-01-10',
['united-states'],
[['2024-02-20', None]],
['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-11'),
('memorial day landing',
['2024-04-27',
['smith'],
[],
['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'),
('regression: agency party',
['2024-03-01',
['agency', 'smith'],
[],
['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-30'),
('private parties',
['2024-03-01',
['smith', 'jones'],
[],
['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-01'),
('government second',
['2024-03-01',
['smith', 'officer'],
[],
['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-30'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31')]]
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: agency party | 2024-04-30 | 2024-04-30 | Passed |
| private parties | 2024-04-01 | 2024-04-01 | Passed |
| government second | 2024-04-30 | 2024-04-30 | Passed |
| motion on day 28 | 2024-05-15 | 2024-05-15 | Passed |
| motion on day 29 | 2024-04-01 | 2024-04-01 | Passed |
| out of order dispositions | 2024-05-10 | 2024-05-31 | Failed |
| pending after disposed | pending | pending | Passed |
SHA-256 / fd4246ede9a6da8f5530e9cc467bbdeedbfd4d03e9d4fcccd9b747ac8a6e2af6
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(entry, parties, motions, holidays):
e = dt.date.fromisoformat(entry)
hol = {dt.date.fromisoformat(x) for x in holidays}
period = 60 if any(p in ('united-states', 'agency', 'officer') for p in parties) else 30
start = e
pending = False
for filed, disposed in motions:
f = dt.date.fromisoformat(filed)
if (f - e).days <= 28:
if disposed is None:
pending = True
else:
start = max(start, dt.date.fromisoformat(disposed))
if pending:
return 'pending'
d = start + dt.timedelta(days=period)
while d.weekday() >= 5 or d in hol:
d += dt.timedelta(days=1)
return d.isoformat()
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: agency party',
['2024-03-01',
['agency', 'smith'],
[],
['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-30'),
('private parties',
['2024-03-01',
['smith', 'jones'],
[],
['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-01'),
('government second',
['2024-03-01',
['smith', 'officer'],
[],
['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-30'),
('motion on day 28',
['2024-03-01',
['smith'],
[['2024-03-29', '2024-04-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-05-15'),
('motion on day 29',
['2024-03-01',
['smith'],
[['2024-03-30', '2024-04-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-04-01'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31'),
('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending')],
[('government second',
['2024-03-01',
['smith', 'officer'],
[],
['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-30'),
('motion on day 28',
['2024-03-01',
['smith'],
[['2024-03-29', '2024-04-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-05-15'),
('motion on day 29',
['2024-03-01',
['smith'],
[['2024-03-30', '2024-04-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-04-01'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31'),
('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending'),
('single pending',
['2024-03-01',
['smith'],
[['2024-03-10', None]],
['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']],
'pending'),
('lands on holiday',
['2024-06-04',
['smith'],
[],
['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')],
[('motion on day 29',
['2024-03-01',
['smith'],
[['2024-03-30', '2024-04-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-04-01'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31'),
('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending'),
('single pending',
['2024-03-01',
['smith'],
[['2024-03-10', None]],
['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']],
'pending'),
('lands on holiday',
['2024-06-04',
['smith'],
[],
['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'),
('lands on weekend',
['2024-02-05',
['smith'],
[],
['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-06'),
('untimely pending ignored',
['2024-01-10',
['united-states'],
[['2024-02-20', None]],
['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-11')],
[('pending after disposed',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-04-01'], ['2024-03-12', None]],
['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']],
'pending'),
('single pending',
['2024-03-01',
['smith'],
[['2024-03-10', None]],
['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']],
'pending'),
('lands on holiday',
['2024-06-04',
['smith'],
[],
['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'),
('lands on weekend',
['2024-02-05',
['smith'],
[],
['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-06'),
('untimely pending ignored',
['2024-01-10',
['united-states'],
[['2024-02-20', None]],
['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-11'),
('memorial day landing',
['2024-04-27',
['smith'],
[],
['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'),
('regression: agency party',
['2024-03-01',
['agency', 'smith'],
[],
['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-30'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31')],
[('lands on holiday',
['2024-06-04',
['smith'],
[],
['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'),
('lands on weekend',
['2024-02-05',
['smith'],
[],
['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-06'),
('untimely pending ignored',
['2024-01-10',
['united-states'],
[['2024-02-20', None]],
['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-11'),
('memorial day landing',
['2024-04-27',
['smith'],
[],
['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'),
('regression: agency party',
['2024-03-01',
['agency', 'smith'],
[],
['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-30'),
('private parties',
['2024-03-01',
['smith', 'jones'],
[],
['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-01'),
('government second',
['2024-03-01',
['smith', 'officer'],
[],
['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-30'),
('out of order dispositions',
['2024-03-01',
['smith'],
[['2024-03-10', '2024-05-01'], ['2024-03-12', '2024-04-10']],
['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-31')]]
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: agency party | 2024-04-30 | 2024-04-30 | Passed |
| private parties | 2024-04-01 | 2024-04-01 | Passed |
| government second | 2024-04-30 | 2024-04-30 | Passed |
| motion on day 28 | 2024-05-15 | 2024-05-15 | Passed |
| motion on day 29 | 2024-04-01 | 2024-04-01 | Passed |
| out of order dispositions | 2024-05-31 | 2024-05-31 | Passed |
| pending after disposed | pending | pending | Passed |
SHA-256 / 34fe4305b04b45a8fb0babc33477296e326b0dcdf52e31192bcfcadf8d6da209
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:26.378987+00:00.
Case digest / 4d32380b61e4cfda22b4768af3ce37fe9e2686732b4f174f55170095f4148cc2