FAILURE MAP
← Case archive

FA-77626 / Legal deadline computation / Open access

Limitations period tolled during minority: cap apply · case 01

A minor's tolled deadline extends beyond the absolute cap.

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

ROOT CAUSE

The cap is not applied.

VERIFIED REPAIR

At the cap apply decision use `min(deadline, cap)`, leaving the other decision sites of the model unchanged.

Unsuccessful approach: The partial repair `min(deadline, cap) if years > cap_years else deadline` only applies the cap when the base period exceeds it, which never happens for tolled claims.

Case contract

Stipulated: a claimant reaches majority on the 18th birthday; someone born February 29 reaches it on March 1 in a common year. If the claim accrues before majority, the period starts at majority, otherwise at accrual. The deadline is the anniversary of the start after years (a missing February 29 becomes February 28). Regardless of minority, the deadline may not exceed cap_years after accrual (same anniversary rule).

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(birth, accrual, years, cap_years):
    b = dt.date.fromisoformat(birth)
    acc = dt.date.fromisoformat(accrual)
    def anniversary(d, n):
        y = d.year + n
        return dt.date(y, d.month, min(d.day, calendar.monthrange(y, d.month)[1]))
    y18 = b.year + 18
    maj = dt.date(y18, 3, 1) if (b.month, b.day) == (2, 29) and not calendar.isleap(y18) else dt.date(y18, b.month, b.day)
    start = maj if acc < maj else acc
    deadline = anniversary(start, years)
    cap = anniversary(acc, cap_years)
    return (deadline).isoformat()
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('leap birthday common majority year', ['2004-02-29', '2020-05-01', 2, 8], '2024-03-01'),
  ('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01'),
  ('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01'),
  ('accrual in majority year before birthday', ['2006-11-30', '2024-02-01', 2, 6], '2026-11-30'),
  ('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05')],
 [('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01'),
  ('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01'),
  ('accrual in majority year before birthday', ['2006-11-30', '2024-02-01', 2, 6], '2026-11-30'),
  ('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05'),
  ('teen within cap', ['2009-09-09', '2024-01-15', 2, 10], '2029-09-09'),
  ('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01')],
 [('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01'),
  ('accrual in majority year before birthday', ['2006-11-30', '2024-02-01', 2, 6], '2026-11-30'),
  ('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05'),
  ('teen within cap', ['2009-09-09', '2024-01-15', 2, 10], '2029-09-09'),
  ('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01'),
  ('cap equals tolled', ['2010-07-07', '2020-07-07', 2, 10], '2030-07-07'),
  ('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01')],
 [('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05'),
  ('teen within cap', ['2009-09-09', '2024-01-15', 2, 10], '2029-09-09'),
  ('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01'),
  ('cap equals tolled', ['2010-07-07', '2020-07-07', 2, 10], '2030-07-07'),
  ('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('leap birthday common majority year', ['2004-02-29', '2020-05-01', 2, 8], '2024-03-01'),
  ('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01')],
 [('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01'),
  ('cap equals tolled', ['2010-07-07', '2020-07-07', 2, 10], '2030-07-07'),
  ('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('leap birthday common majority year', ['2004-02-29', '2020-05-01', 2, 8], '2024-03-01'),
  ('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01'),
  ('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01')]]
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: accrual days before 18th birthday2026-06-202026-06-20Passed
leap birthday common majority year2024-03-012024-03-01Passed
leap birthday leap majority year2027-03-012027-03-01Passed
young child capped2036-03-102024-04-01Failed
adult claim2026-01-012026-01-01Passed
accrual in majority year before birthday2026-11-302026-11-30Passed
accrual on majority date2026-05-052026-05-05Passed

SHA-256 / 0527db3e20b742eef12ab1a5ac85808674e6492333ef162421300a2f805c20fd

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(birth, accrual, years, cap_years):
    b = dt.date.fromisoformat(birth)
    acc = dt.date.fromisoformat(accrual)
    def anniversary(d, n):
        y = d.year + n
        return dt.date(y, d.month, min(d.day, calendar.monthrange(y, d.month)[1]))
    y18 = b.year + 18
    maj = dt.date(y18, 3, 1) if (b.month, b.day) == (2, 29) and not calendar.isleap(y18) else dt.date(y18, b.month, b.day)
    start = maj if acc < maj else acc
    deadline = anniversary(start, years)
    cap = anniversary(acc, cap_years)
    return (min(deadline, cap) if years > cap_years else deadline).isoformat()
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('leap birthday common majority year', ['2004-02-29', '2020-05-01', 2, 8], '2024-03-01'),
  ('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01'),
  ('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01'),
  ('accrual in majority year before birthday', ['2006-11-30', '2024-02-01', 2, 6], '2026-11-30'),
  ('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05')],
 [('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01'),
  ('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01'),
  ('accrual in majority year before birthday', ['2006-11-30', '2024-02-01', 2, 6], '2026-11-30'),
  ('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05'),
  ('teen within cap', ['2009-09-09', '2024-01-15', 2, 10], '2029-09-09'),
  ('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01')],
 [('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01'),
  ('accrual in majority year before birthday', ['2006-11-30', '2024-02-01', 2, 6], '2026-11-30'),
  ('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05'),
  ('teen within cap', ['2009-09-09', '2024-01-15', 2, 10], '2029-09-09'),
  ('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01'),
  ('cap equals tolled', ['2010-07-07', '2020-07-07', 2, 10], '2030-07-07'),
  ('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01')],
 [('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05'),
  ('teen within cap', ['2009-09-09', '2024-01-15', 2, 10], '2029-09-09'),
  ('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01'),
  ('cap equals tolled', ['2010-07-07', '2020-07-07', 2, 10], '2030-07-07'),
  ('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('leap birthday common majority year', ['2004-02-29', '2020-05-01', 2, 8], '2024-03-01'),
  ('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01')],
 [('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01'),
  ('cap equals tolled', ['2010-07-07', '2020-07-07', 2, 10], '2030-07-07'),
  ('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('leap birthday common majority year', ['2004-02-29', '2020-05-01', 2, 8], '2024-03-01'),
  ('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01'),
  ('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01')]]
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: accrual days before 18th birthday2026-06-202026-06-20Passed
leap birthday common majority year2024-03-012024-03-01Passed
leap birthday leap majority year2027-03-012027-03-01Passed
young child capped2036-03-102024-04-01Failed
adult claim2026-01-012026-01-01Passed
accrual in majority year before birthday2026-11-302026-11-30Passed
accrual on majority date2026-05-052026-05-05Passed

SHA-256 / a3dc7b689e48e7b5132c8373b9c7bae499100e78f09326c5e4206a4d68b26887

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(birth, accrual, years, cap_years):
    b = dt.date.fromisoformat(birth)
    acc = dt.date.fromisoformat(accrual)
    def anniversary(d, n):
        y = d.year + n
        return dt.date(y, d.month, min(d.day, calendar.monthrange(y, d.month)[1]))
    y18 = b.year + 18
    maj = dt.date(y18, 3, 1) if (b.month, b.day) == (2, 29) and not calendar.isleap(y18) else dt.date(y18, b.month, b.day)
    start = maj if acc < maj else acc
    deadline = anniversary(start, years)
    cap = anniversary(acc, cap_years)
    return (min(deadline, cap)).isoformat()
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('leap birthday common majority year', ['2004-02-29', '2020-05-01', 2, 8], '2024-03-01'),
  ('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01'),
  ('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01'),
  ('accrual in majority year before birthday', ['2006-11-30', '2024-02-01', 2, 6], '2026-11-30'),
  ('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05')],
 [('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01'),
  ('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01'),
  ('accrual in majority year before birthday', ['2006-11-30', '2024-02-01', 2, 6], '2026-11-30'),
  ('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05'),
  ('teen within cap', ['2009-09-09', '2024-01-15', 2, 10], '2029-09-09'),
  ('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01')],
 [('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01'),
  ('accrual in majority year before birthday', ['2006-11-30', '2024-02-01', 2, 6], '2026-11-30'),
  ('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05'),
  ('teen within cap', ['2009-09-09', '2024-01-15', 2, 10], '2029-09-09'),
  ('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01'),
  ('cap equals tolled', ['2010-07-07', '2020-07-07', 2, 10], '2030-07-07'),
  ('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01')],
 [('accrual on majority date', ['2006-05-05', '2024-05-05', 2, 8], '2026-05-05'),
  ('teen within cap', ['2009-09-09', '2024-01-15', 2, 10], '2029-09-09'),
  ('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01'),
  ('cap equals tolled', ['2010-07-07', '2020-07-07', 2, 10], '2030-07-07'),
  ('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('leap birthday common majority year', ['2004-02-29', '2020-05-01', 2, 8], '2024-03-01'),
  ('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01')],
 [('leap birthday accrual early', ['2004-02-29', '2021-12-01', 3, 10], '2025-03-01'),
  ('cap equals tolled', ['2010-07-07', '2020-07-07', 2, 10], '2030-07-07'),
  ('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20'),
  ('leap birthday common majority year', ['2004-02-29', '2020-05-01', 2, 8], '2024-03-01'),
  ('leap birthday leap majority year', ['2008-02-29', '2025-01-01', 1, 8], '2027-03-01'),
  ('young child capped', ['2015-03-10', '2016-04-01', 3, 8], '2024-04-01'),
  ('adult claim', ['1990-01-01', '2024-01-01', 2, 8], '2026-01-01')]]
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: accrual days before 18th birthday2026-06-202026-06-20Passed
leap birthday common majority year2024-03-012024-03-01Passed
leap birthday leap majority year2027-03-012027-03-01Passed
young child capped2024-04-012024-04-01Passed
adult claim2026-01-012026-01-01Passed
accrual in majority year before birthday2026-11-302026-11-30Passed
accrual on majority date2026-05-052026-05-05Passed

SHA-256 / ba9d2613107cc158789b48e14274255600cc2653cec52650942eda18e3f156e0

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

Case digest / aef03e65fbdf6a01813b84c9e94d370abbd5f1e6986454c82931377c725e0df9