FAILURE MAP
← Case archive

FA-77611 / Legal deadline computation / Open access

Limitations period tolled during minority: majority leap · case 01

A claimant born on February 29 is treated as an adult on February 28.

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

ROOT CAUSE

Majority reuses the limitations anniversary rule, which clamps February 29 to February 28.

VERIFIED REPAIR

At the majority leap decision use `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)`, leaving the other decision sites of the model unchanged.

Unsuccessful approach: The partial repair `dt.date(y18, 2, 28) if (b.month, b.day) == (2, 29) else dt.date(y18, b.month, b.day)` always uses February 28, even when the 18th birthday falls in a leap year.

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 = anniversary(b, 18)
    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')],
 [('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')],
 [('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-02-282024-03-01Failed
leap birthday leap majority year2027-02-282027-03-01Failed
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 / 5b64c6773a75cc807821881fa6ccb5f16762181f0884b96adc2ffb55b811f822

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, 2, 28) if (b.month, b.day) == (2, 29) 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')],
 [('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')],
 [('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-02-282024-03-01Failed
leap birthday leap majority year2027-02-282027-03-01Failed
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 / e3b4db4c88b72b6f7f15537d027ff3cdd93eec34426f1c5165738e9146d82927

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

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

Case digest / 75e98ccb8a8a7fca044b1a1ffa8a1be19142e32053aadb02c33f710afda18b35