{"abstract":"An inclusive date count replaces signed elapsed-day distance.","category":"Calendar arithmetic","checks":4,"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. Proleptic gregorian date distance. Exact operational definition: (date.fromisoformat(end)-date.fromisoformat(start)).days","evaluation_group":"model-27b690fab7fe9eaf","failed_approach":"Absolute value erases chronology direction.","family":"xn-proleptic-gregorian-date-distance","id":"FA-6576","implementations":{"attempt":{"sha256":"e5ab1391d915df32f0735a121855270fd239d3591a18bdf9e07196f145a59004","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(start, end):\n    return abs((date.fromisoformat(end)-date.fromisoformat(start)).days)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck(\"fixture 1: ('2024-02-28', '2024-03-01')\", solve(*('2024-02-28', '2024-03-01')), 2)\ncheck(\"fixture 2: ('2023-02-28', '2023-03-01')\", solve(*('2023-02-28', '2023-03-01')), 1)\ncheck(\"fixture 3: ('2024-01-02', '2024-01-01')\", solve(*('2024-01-02', '2024-01-01')), -1)\ncheck(\"fixture 4: ('2024-01-01', '2024-01-01')\", solve(*('2024-01-01', '2024-01-01')), 0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"4cfa45a67213857e8e00fbe9c8ad91d712a6c4ff94cee473a27513707bd1b520","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(start, end):\n    return (date.fromisoformat(end)-date.fromisoformat(start)).days+1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck(\"fixture 1: ('2024-02-28', '2024-03-01')\", solve(*('2024-02-28', '2024-03-01')), 2)\ncheck(\"fixture 2: ('2023-02-28', '2023-03-01')\", solve(*('2023-02-28', '2023-03-01')), 1)\ncheck(\"fixture 3: ('2024-01-02', '2024-01-01')\", solve(*('2024-01-02', '2024-01-01')), -1)\ncheck(\"fixture 4: ('2024-01-01', '2024-01-01')\", solve(*('2024-01-01', '2024-01-01')), 0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"8c3b2f08b5cfe4857025262d121167abef36b69732a8944a5b9e534b4d74e5ea","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(start, end):\n    return (date.fromisoformat(end)-date.fromisoformat(start)).days\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck(\"fixture 1: ('2024-02-28', '2024-03-01')\", solve(*('2024-02-28', '2024-03-01')), 2)\ncheck(\"fixture 2: ('2023-02-28', '2023-03-01')\", solve(*('2023-02-28', '2023-03-01')), 1)\ncheck(\"fixture 3: ('2024-01-02', '2024-01-01')\", solve(*('2024-01-02', '2024-01-01')), -1)\ncheck(\"fixture 4: ('2024-01-01', '2024-01-01')\", solve(*('2024-01-01', '2024-01-01')), 0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xn-proleptic-gregorian-date-distance","generated_at":"2026-09-29T14:38:03.364675+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Calendar conventions results depend on the stated convention.","repair":"Apply the specified mathematical contract directly, preserving all terms and boundary cases: return (date.fromisoformat(end)-date.fromisoformat(start)).days","root_cause":"An inclusive date count replaces signed elapsed-day distance.","sha256":"e14dc5f6e5897b4db0f3099bff8a741d97b3345bf89ce4ee1007ac8aa0b748fb","title":"Proleptic gregorian date distance · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.464,"exit_code":1,"observations":[{"actual":2,"check":"fixture 1: ('2024-02-28', '2024-03-01')","expected":2,"passed":true},{"actual":1,"check":"fixture 2: ('2023-02-28', '2023-03-01')","expected":1,"passed":true},{"actual":1,"check":"fixture 3: ('2024-01-02', '2024-01-01')","expected":-1,"passed":false},{"actual":0,"check":"fixture 4: ('2024-01-01', '2024-01-01')","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ('2024-02-28', '2024-03-01')\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"fixture 2: ('2023-02-28', '2023-03-01')\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 3: ('2024-01-02', '2024-01-01')\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"fixture 4: ('2024-01-01', '2024-01-01')\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":47.431,"exit_code":1,"observations":[{"actual":3,"check":"fixture 1: ('2024-02-28', '2024-03-01')","expected":2,"passed":false},{"actual":2,"check":"fixture 2: ('2023-02-28', '2023-03-01')","expected":1,"passed":false},{"actual":0,"check":"fixture 3: ('2024-01-02', '2024-01-01')","expected":-1,"passed":false},{"actual":1,"check":"fixture 4: ('2024-01-01', '2024-01-01')","expected":0,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ('2024-02-28', '2024-03-01')\", \"actual\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"fixture 2: ('2023-02-28', '2023-03-01')\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"fixture 3: ('2024-01-02', '2024-01-01')\", \"actual\": 0, \"expected\": -1, \"passed\": false}, {\"check\": \"fixture 4: ('2024-01-01', '2024-01-01')\", \"actual\": 1, \"expected\": 0, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.228,"exit_code":0,"observations":[{"actual":2,"check":"fixture 1: ('2024-02-28', '2024-03-01')","expected":2,"passed":true},{"actual":1,"check":"fixture 2: ('2023-02-28', '2023-03-01')","expected":1,"passed":true},{"actual":-1,"check":"fixture 3: ('2024-01-02', '2024-01-01')","expected":-1,"passed":true},{"actual":0,"check":"fixture 4: ('2024-01-01', '2024-01-01')","expected":0,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ('2024-02-28', '2024-03-01')\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"fixture 2: ('2023-02-28', '2023-03-01')\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 3: ('2024-01-02', '2024-01-01')\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"fixture 4: ('2024-01-01', '2024-01-01')\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}