FAILURE MAP
← Case archive

FA-77631 / Legal deadline computation / Open access

Deemed receipt of a contract notice and a business-day response window: recipient zone · case 01

A notice sent at 15:30 in New York is treated as received before a 17:00 cutoff in London.

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

ROOT CAUSE

The sender wall-clock time is used as the recipient time.

VERIFIED REPAIR

At the recipient zone decision use `sent + dt.timedelta(minutes=recipient_offset_min - sender_offset_min)`, leaving the other decision sites of the model unchanged.

Unsuccessful approach: The partial repair `sent + dt.timedelta(minutes=recipient_offset_min)` applies the recipient offset to a time that is not UTC.

Case contract

Stipulated: a notice is sent at a local time in the sender zone (sender_offset_min east of UTC) and is received at the same instant in the recipient zone (recipient_offset_min). Received at or after the cutoff time (recipient local) it is deemed received the next day; a deemed day that is not a business day (weekday, not a listed holiday) moves to the next business day. The response window ends after n business days counted from the day after deemed receipt. Return [deemed receipt, response deadline].

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(sent_local, sender_offset_min, recipient_offset_min, cutoff, n, holidays):
    sent = dt.datetime.fromisoformat(sent_local)
    local = sent
    cut = dt.time.fromisoformat(cutoff)
    hol = {dt.date.fromisoformat(x) for x in holidays}
    def business(d):
        return d.weekday() < 5 and d not in hol
    deemed = local.date()
    if local.time() >= cut:
        deemed += dt.timedelta(days=1)
    while not business(deemed):
        deemed += dt.timedelta(days=1)
    d = deemed
    k = 0
    while k < n:
        d += dt.timedelta(days=1)
        if business(d):
            k += 1
    return [deemed.isoformat(), d.isoformat()]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('exactly at cutoff',
   ['2024-03-05T17:00',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('friday evening',
   ['2024-03-08T18:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09']),
  ('received saturday',
   ['2024-03-09T10:00',
    0,
    0,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-12']),
  ('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08'])],
 [('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('friday evening',
   ['2024-03-08T18:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09']),
  ('received saturday',
   ['2024-03-09T10:00',
    0,
    0,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-12']),
  ('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08']),
  ('before cutoff simple',
   ['2024-04-02T09:00',
    0,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-02', '2024-04-09']),
  ('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13'])],
 [('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09']),
  ('received saturday',
   ['2024-03-09T10:00',
    0,
    0,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-12']),
  ('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08']),
  ('before cutoff simple',
   ['2024-04-02T09:00',
    0,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-02', '2024-04-09']),
  ('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('west to east crosses midnight',
   ['2024-06-18T21:00',
    -420,
    120,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-05-27',
     '2024-06-19',
     '2024-07-04',
     '2024-09-02',
     '2024-10-14',
     '2024-11-11',
     '2024-11-28',
     '2024-12-25']],
   ['2024-06-20', '2024-06-21']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13'])],
 [('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08']),
  ('before cutoff simple',
   ['2024-04-02T09:00',
    0,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-02', '2024-04-09']),
  ('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('west to east crosses midnight',
   ['2024-06-18T21:00',
    -420,
    120,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-05-27',
     '2024-06-19',
     '2024-07-04',
     '2024-09-02',
     '2024-10-14',
     '2024-11-11',
     '2024-11-28',
     '2024-12-25']],
   ['2024-06-20', '2024-06-21']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('exactly at cutoff',
   ['2024-03-05T17:00',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11'])],
 [('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('west to east crosses midnight',
   ['2024-06-18T21:00',
    -420,
    120,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-05-27',
     '2024-06-19',
     '2024-07-04',
     '2024-09-02',
     '2024-10-14',
     '2024-11-11',
     '2024-11-28',
     '2024-12-25']],
   ['2024-06-20', '2024-06-21']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('exactly at cutoff',
   ['2024-03-05T17:00',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('friday evening',
   ['2024-03-08T18:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09'])]]
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: cross-zone cutoff['2024-03-05', '2024-03-12']['2024-03-06', '2024-03-13']Failed
exactly at cutoff['2024-03-06', '2024-03-11']['2024-03-06', '2024-03-11']Passed
late minutes after cutoff hour['2024-03-06', '2024-03-11']['2024-03-06', '2024-03-11']Passed
friday evening['2024-03-11', '2024-03-13']['2024-03-11', '2024-03-13']Passed
received on holiday['2024-07-05', '2024-07-09']['2024-07-05', '2024-07-09']Passed
received saturday['2024-03-11', '2024-03-12']['2024-03-11', '2024-03-12']Passed
east to west['2024-03-06', '2024-03-08']['2024-03-06', '2024-03-08']Passed

SHA-256 / 847ef837b51a588381a80b1daeabfaba33b15d8851f750c7346520f6394d55a3

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(sent_local, sender_offset_min, recipient_offset_min, cutoff, n, holidays):
    sent = dt.datetime.fromisoformat(sent_local)
    local = sent + dt.timedelta(minutes=recipient_offset_min)
    cut = dt.time.fromisoformat(cutoff)
    hol = {dt.date.fromisoformat(x) for x in holidays}
    def business(d):
        return d.weekday() < 5 and d not in hol
    deemed = local.date()
    if local.time() >= cut:
        deemed += dt.timedelta(days=1)
    while not business(deemed):
        deemed += dt.timedelta(days=1)
    d = deemed
    k = 0
    while k < n:
        d += dt.timedelta(days=1)
        if business(d):
            k += 1
    return [deemed.isoformat(), d.isoformat()]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('exactly at cutoff',
   ['2024-03-05T17:00',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('friday evening',
   ['2024-03-08T18:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09']),
  ('received saturday',
   ['2024-03-09T10:00',
    0,
    0,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-12']),
  ('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08'])],
 [('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('friday evening',
   ['2024-03-08T18:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09']),
  ('received saturday',
   ['2024-03-09T10:00',
    0,
    0,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-12']),
  ('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08']),
  ('before cutoff simple',
   ['2024-04-02T09:00',
    0,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-02', '2024-04-09']),
  ('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13'])],
 [('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09']),
  ('received saturday',
   ['2024-03-09T10:00',
    0,
    0,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-12']),
  ('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08']),
  ('before cutoff simple',
   ['2024-04-02T09:00',
    0,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-02', '2024-04-09']),
  ('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('west to east crosses midnight',
   ['2024-06-18T21:00',
    -420,
    120,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-05-27',
     '2024-06-19',
     '2024-07-04',
     '2024-09-02',
     '2024-10-14',
     '2024-11-11',
     '2024-11-28',
     '2024-12-25']],
   ['2024-06-20', '2024-06-21']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13'])],
 [('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08']),
  ('before cutoff simple',
   ['2024-04-02T09:00',
    0,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-02', '2024-04-09']),
  ('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('west to east crosses midnight',
   ['2024-06-18T21:00',
    -420,
    120,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-05-27',
     '2024-06-19',
     '2024-07-04',
     '2024-09-02',
     '2024-10-14',
     '2024-11-11',
     '2024-11-28',
     '2024-12-25']],
   ['2024-06-20', '2024-06-21']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('exactly at cutoff',
   ['2024-03-05T17:00',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11'])],
 [('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('west to east crosses midnight',
   ['2024-06-18T21:00',
    -420,
    120,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-05-27',
     '2024-06-19',
     '2024-07-04',
     '2024-09-02',
     '2024-10-14',
     '2024-11-11',
     '2024-11-28',
     '2024-12-25']],
   ['2024-06-20', '2024-06-21']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('exactly at cutoff',
   ['2024-03-05T17:00',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('friday evening',
   ['2024-03-08T18:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09'])]]
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: cross-zone cutoff['2024-03-05', '2024-03-12']['2024-03-06', '2024-03-13']Failed
exactly at cutoff['2024-03-06', '2024-03-11']['2024-03-06', '2024-03-11']Passed
late minutes after cutoff hour['2024-03-06', '2024-03-11']['2024-03-06', '2024-03-11']Passed
friday evening['2024-03-11', '2024-03-13']['2024-03-11', '2024-03-13']Passed
received on holiday['2024-07-05', '2024-07-09']['2024-07-05', '2024-07-09']Passed
received saturday['2024-03-11', '2024-03-12']['2024-03-11', '2024-03-12']Passed
east to west['2024-03-06', '2024-03-08']['2024-03-06', '2024-03-08']Passed

SHA-256 / 56bd1e8eef522a2bc53774304b36191a9e6a598efe525a9b84e251d696f041c1

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(sent_local, sender_offset_min, recipient_offset_min, cutoff, n, holidays):
    sent = dt.datetime.fromisoformat(sent_local)
    local = sent + dt.timedelta(minutes=recipient_offset_min - sender_offset_min)
    cut = dt.time.fromisoformat(cutoff)
    hol = {dt.date.fromisoformat(x) for x in holidays}
    def business(d):
        return d.weekday() < 5 and d not in hol
    deemed = local.date()
    if local.time() >= cut:
        deemed += dt.timedelta(days=1)
    while not business(deemed):
        deemed += dt.timedelta(days=1)
    d = deemed
    k = 0
    while k < n:
        d += dt.timedelta(days=1)
        if business(d):
            k += 1
    return [deemed.isoformat(), d.isoformat()]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('exactly at cutoff',
   ['2024-03-05T17:00',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('friday evening',
   ['2024-03-08T18:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09']),
  ('received saturday',
   ['2024-03-09T10:00',
    0,
    0,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-12']),
  ('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08'])],
 [('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('friday evening',
   ['2024-03-08T18:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09']),
  ('received saturday',
   ['2024-03-09T10:00',
    0,
    0,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-12']),
  ('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08']),
  ('before cutoff simple',
   ['2024-04-02T09:00',
    0,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-02', '2024-04-09']),
  ('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13'])],
 [('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09']),
  ('received saturday',
   ['2024-03-09T10:00',
    0,
    0,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-12']),
  ('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08']),
  ('before cutoff simple',
   ['2024-04-02T09:00',
    0,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-02', '2024-04-09']),
  ('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('west to east crosses midnight',
   ['2024-06-18T21:00',
    -420,
    120,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-05-27',
     '2024-06-19',
     '2024-07-04',
     '2024-09-02',
     '2024-10-14',
     '2024-11-11',
     '2024-11-28',
     '2024-12-25']],
   ['2024-06-20', '2024-06-21']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13'])],
 [('east to west',
   ['2024-03-06T01:00',
    60,
    -300,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-08']),
  ('before cutoff simple',
   ['2024-04-02T09:00',
    0,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-02', '2024-04-09']),
  ('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('west to east crosses midnight',
   ['2024-06-18T21:00',
    -420,
    120,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-05-27',
     '2024-06-19',
     '2024-07-04',
     '2024-09-02',
     '2024-10-14',
     '2024-11-11',
     '2024-11-28',
     '2024-12-25']],
   ['2024-06-20', '2024-06-21']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('exactly at cutoff',
   ['2024-03-05T17:00',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11'])],
 [('evening before holiday',
   ['2024-05-24T20:00',
    0,
    0,
    '18:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-05-30']),
  ('west to east crosses midnight',
   ['2024-06-18T21:00',
    -420,
    120,
    '17:00',
    1,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-05-27',
     '2024-06-19',
     '2024-07-04',
     '2024-09-02',
     '2024-10-14',
     '2024-11-11',
     '2024-11-28',
     '2024-12-25']],
   ['2024-06-20', '2024-06-21']),
  ('regression: cross-zone cutoff',
   ['2024-03-05T13:30',
    -300,
    0,
    '17:00',
    5,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('exactly at cutoff',
   ['2024-03-05T17:00',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('late minutes after cutoff hour',
   ['2024-03-05T17:45',
    0,
    0,
    '17:00',
    3,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-11']),
  ('friday evening',
   ['2024-03-08T18:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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', '2024-03-13']),
  ('received on holiday',
   ['2024-07-04T09:00',
    0,
    0,
    '17:00',
    2,
    ['2024-01-01',
     '2024-01-15',
     '2024-02-19',
     '2024-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-09'])]]
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: cross-zone cutoff['2024-03-06', '2024-03-13']['2024-03-06', '2024-03-13']Passed
exactly at cutoff['2024-03-06', '2024-03-11']['2024-03-06', '2024-03-11']Passed
late minutes after cutoff hour['2024-03-06', '2024-03-11']['2024-03-06', '2024-03-11']Passed
friday evening['2024-03-11', '2024-03-13']['2024-03-11', '2024-03-13']Passed
received on holiday['2024-07-05', '2024-07-09']['2024-07-05', '2024-07-09']Passed
received saturday['2024-03-11', '2024-03-12']['2024-03-11', '2024-03-12']Passed
east to west['2024-03-06', '2024-03-08']['2024-03-06', '2024-03-08']Passed

SHA-256 / 2a662f43bddb94f9e4079521f3e2330358b0d259cedb00fc27a781d6870779bf

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

Case digest / a2a6090056944cec66bbb5897e1d1cfe99444b61e87fd1a22ac1dc19d764ec7a