FAILURE MAP
← Case archive

FA-6516 / Calendar arithmetic / Open access

Fiscal year label ending year · case 01

The calendar year is used after a non-January fiscal boundary.

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

ROOT CAUSE

The calendar year is used after a non-January fiscal boundary.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return year + int(start!=1 and month>=start)

Unsuccessful approach: A January-start fiscal year is incorrectly advanced.

Case contract

Valid ISO Gregorian dates in years 1 through 9999; generated dates must remain in that range. Month is 1 through 12 and zero-based weekday is Monday 0 through Sunday 6 unless the output convention says otherwise. Label a fiscal year by the calendar year of its final month; a January start retains the calendar year. Exact operational definition: year + int(start!=1 and month>=start)

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Calendar conventions results depend on the stated convention.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(year, month, start):
    return year
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (2024, 10, 10)', solve(*(2024, 10, 10)), 2025)
check('fixture 2: (2024, 9, 10)', solve(*(2024, 9, 10)), 2024)
check('fixture 3: (2024, 1, 1)', solve(*(2024, 1, 1)), 2024)
check('fixture 4: (2024, 4, 4)', solve(*(2024, 4, 4)), 2025)
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
fixture 1: (2024, 10, 10)20242025Failed
fixture 2: (2024, 9, 10)20242024Passed
fixture 3: (2024, 1, 1)20242024Passed
fixture 4: (2024, 4, 4)20242025Failed

SHA-256 / 46488ad25fcfae87fa65f7810ef2b67bc0d090c44840ea92389410eb734e4aa9

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(year, month, start):
    return year + int(month>=start)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (2024, 10, 10)', solve(*(2024, 10, 10)), 2025)
check('fixture 2: (2024, 9, 10)', solve(*(2024, 9, 10)), 2024)
check('fixture 3: (2024, 1, 1)', solve(*(2024, 1, 1)), 2024)
check('fixture 4: (2024, 4, 4)', solve(*(2024, 4, 4)), 2025)
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
fixture 1: (2024, 10, 10)20252025Passed
fixture 2: (2024, 9, 10)20242024Passed
fixture 3: (2024, 1, 1)20252024Failed
fixture 4: (2024, 4, 4)20252025Passed

SHA-256 / 2f2f3e67c6c9457b55d0fffca28b95cf9c9d8c5444c220911ef8f078f889d03d

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(year, month, start):
    return year + int(start!=1 and month>=start)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (2024, 10, 10)', solve(*(2024, 10, 10)), 2025)
check('fixture 2: (2024, 9, 10)', solve(*(2024, 9, 10)), 2024)
check('fixture 3: (2024, 1, 1)', solve(*(2024, 1, 1)), 2024)
check('fixture 4: (2024, 4, 4)', solve(*(2024, 4, 4)), 2025)
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
fixture 1: (2024, 10, 10)20252025Passed
fixture 2: (2024, 9, 10)20242024Passed
fixture 3: (2024, 1, 1)20242024Passed
fixture 4: (2024, 4, 4)20252025Passed

SHA-256 / c33fdc595135029c3b376c240382f4cb3b6310d7c3a4520d3606795f210c7522

Verification & scope

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

Case digest / 7e56e833d80223803268c62c09f5726b266d7ee2146e3c1881d4c783fd5ee0a5