FAILURE MAP
← Case archive

FA-77811 / Legal deadline computation / Open access

Dependent briefing deadlines computed from a rolled predecessor: reply base · case 01

A late-served opposition pushes the reply deadline back.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The reply always runs from actual opposition service, even when that is after the opposition due date.

VERIFIED REPAIR

At the reply base decision use `min(opp, dt.date.fromisoformat(opp_served)) if opp_served else opp`, leaving the other decision sites of the model unchanged.

Unsuccessful approach: The partial repair `max(opp, dt.date.fromisoformat(opp_served)) if opp_served else opp` takes the later date, which rewards late service instead of using the earlier one.

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 = 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])],
 [('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])],
 [('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]),
  ('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])],
 [('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]),
  ('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])],
 [('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])]]
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 fixtureActualExpectedOutcome
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-04-01', False]['2024-03-18', '2024-03-25', True]Failed
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

SHA-256 / db1a3e94f6f131bf0411c2ac8472f14f4274ea52575aee78625d7667eaa83a65

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 = max(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])],
 [('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])],
 [('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]),
  ('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])],
 [('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]),
  ('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])],
 [('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])]]
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 fixtureActualExpectedOutcome
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-25', True]['2024-03-18', '2024-03-19', True]Failed
late opposition service['2024-03-18', '2024-04-01', False]['2024-03-18', '2024-03-25', True]Failed
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-22', True]['2024-05-15', '2024-05-20', True]Failed

SHA-256 / 6e8484e15f03261092c746f7bde0c545c91efbaedc5ffcf8f0a9d20cc81c0204

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])],
 [('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])],
 [('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]),
  ('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])],
 [('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]),
  ('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])],
 [('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])]]
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 fixtureActualExpectedOutcome
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

SHA-256 / c7daafbc3ec63a86d0dd58228d801b2990941cb869959d160d2b97c52e454fa0

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.359132+00:00.

Case digest / cb4c61d9ec5a9afb5863a4773bac08dcd56a63ea0c1d3f032b66c56ddc332c8e