FA-77616 / Legal deadline computation / Open access
Limitations period tolled during minority: minority start · case 01
A claim accruing days before the 18th birthday is treated as an adult claim.
ROOT CAUSE
Age is approximated as days divided into 365-day years, ignoring leap days.
VERIFIED REPAIR
At the minority start decision use `maj if acc < maj else acc`, leaving the other decision sites of the model unchanged.
Unsuccessful approach: The partial repair `maj if acc.year < maj.year else acc` compares years only, so an accrual earlier in the majority year is not tolled.
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 = acc if (acc - b).days >= 18 * 365 else maj
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'),
('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20')],
[('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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: accrual days before 18th birthday | 2026-06-17 | 2026-06-20 | Failed |
| leap birthday common majority year | 2024-03-01 | 2024-03-01 | Passed |
| leap birthday leap majority year | 2027-03-01 | 2027-03-01 | Passed |
| young child capped | 2024-04-01 | 2024-04-01 | Passed |
| adult claim | 2026-01-01 | 2026-01-01 | Passed |
| accrual in majority year before birthday | 2026-11-30 | 2026-11-30 | Passed |
| accrual on majority date | 2026-05-05 | 2026-05-05 | Passed |
SHA-256 / 7ba9572b6318eca79d071671b1b352c483c5b05f0d440814b0e0d6fc39100b5b
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.year < maj.year 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'),
('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20')],
[('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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: accrual days before 18th birthday | 2026-06-17 | 2026-06-20 | Failed |
| leap birthday common majority year | 2024-03-01 | 2024-03-01 | Passed |
| leap birthday leap majority year | 2027-03-01 | 2027-03-01 | Passed |
| young child capped | 2024-04-01 | 2024-04-01 | Passed |
| adult claim | 2026-01-01 | 2026-01-01 | Passed |
| accrual in majority year before birthday | 2026-02-01 | 2026-11-30 | Failed |
| accrual on majority date | 2026-05-05 | 2026-05-05 | Passed |
SHA-256 / e40bdad2fb2e90d5d7752685a2d4fb9205126771c061318f5b838d210d89fe5e
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'),
('regression: accrual days before 18th birthday', ['2006-06-20', '2024-06-17', 2, 8], '2026-06-20')],
[('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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: accrual days before 18th birthday | 2026-06-20 | 2026-06-20 | Passed |
| leap birthday common majority year | 2024-03-01 | 2024-03-01 | Passed |
| leap birthday leap majority year | 2027-03-01 | 2027-03-01 | Passed |
| young child capped | 2024-04-01 | 2024-04-01 | Passed |
| adult claim | 2026-01-01 | 2026-01-01 | Passed |
| accrual in majority year before birthday | 2026-11-30 | 2026-11-30 | Passed |
| accrual on majority date | 2026-05-05 | 2026-05-05 | Passed |
SHA-256 / 6b75addbbfc2eab6be0dc185e67e427caa5d4a65fa2948a4350ee05d82c4e00b
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.212056+00:00.
Case digest / 451b0e3cdaeaa0a53b63c5c484078ddf71bc16c495e048bac278efa55142a50f