FAILURE MAP
← Case archive

FA-18716 / Time representation / Open access

Modified day coordinate omits half-day epoch adjustment · case 01

The decoded time state disagrees with the explicit regression oracle for modified.

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

ROOT CAUSE

Modified day coordinate omits half-day epoch adjustment.

VERIFIED REPAIR

Preserve the declared coordinate and state contract at modified: modified = Fraction(r['num'],r['den']) - Fraction(4800001,2).

Unsuccessful approach: The partial correction still substitutes Fraction(r['num'],r['den']) - Fraction(2400001) at the same fault site.

Case contract

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

Why this case matters

Clock transfer and timestamp consumers require preserved coordinate, phase, validity and elapsed-time semantics.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    shifted = Fraction(r['num'],r['den']) + Fraction(1,2)
    day = shifted.numerator // shifted.denominator
    fraction = shifted - day
    tick = fraction * 86400
    noon_delta = tick - 43200
    modified = Fraction(r['num'],r['den']) - 2400000
    roundtrip = Fraction(day) + Fraction(tick,86400) - Fraction(1,2)
    before_noon = tick < 43200
    next_noon = Fraction(day) if before_noon else Fraction(day+1)
    until_noon = (next_noon - Fraction(r['num'],r['den'])) * 86400
    return [day,str(tick),str(noon_delta),str(modified),str(roundtrip),before_noon,str(next_noon),str(until_noon)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'num': 0, 'den': 1}), [0, '43200', '0', '-4800001/2', '0', False, '1', '86400'])
check('fixture 2', solve({'num': 1, 'den': 4}), [0, '64800', '21600', '-9600001/4', '1/4', False, '1', '64800'])
check('fixture 3', solve({'num': 1, 'den': 2}), [1, '0', '-43200', '-2400000', '1/2', True, '1', '43200'])
check('fixture 4', solve({'num': 3, 'den': 4}), [1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '21600'])
check('fixture 5', solve({'num': -1, 'den': 4}), [0, '21600', '-21600', '-9600003/4', '-1/4', True, '0', '21600'])
check('fixture 6', solve({'num': -3, 'den': 4}), [-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800'])
check('fixture 7', solve({'num': -5, 'den': 4}), [-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '21600'])
check('fixture 8', solve({'num': 1, 'den': 100000}), [0, '5400108/125', '108/125', '-240000049999/100000', '1/100000', False, '1', '10799892/125'])
check('fixture 9', solve({'num': 4800001, 'den': 2}), [2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200'])
check('fixture 10', solve({'num': 4800002, 'den': 2}), [2400001, '43200', '0', '1/2', '2400001', False, '2400002', '86400'])
check('fixture 11', solve({'num': 7, 'den': 3}), [2, '72000', '28800', '-14399989/6', '7/3', False, '3', '57600'])
variant = [({'num': 1, 'den': 7}, [0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7']), ({'num': 2, 'den': 7}, [0, '475200/7', '172800/7', '-33600003/14', '2/7', False, '1', '432000/7']), ({'num': 3, 'den': 7}, [0, '561600/7', '259200/7', '-33600001/14', '3/7', False, '1', '345600/7']), ({'num': 4, 'den': 7}, [1, '43200/7', '-259200/7', '-33599999/14', '4/7', True, '1', '259200/7']), ({'num': 5, 'den': 7}, [1, '129600/7', '-172800/7', '-33599997/14', '5/7', True, '1', '172800/7'])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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[0, '43200', '0', '-2400000', '0', False, '1', '86400'][0, '43200', '0', '-4800001/2', '0', False, '1', '86400']Failed
fixture 2[0, '64800', '21600', '-9599999/4', '1/4', False, '1', '64800'][0, '64800', '21600', '-9600001/4', '1/4', False, '1', '64800']Failed
fixture 3[1, '0', '-43200', '-4799999/2', '1/2', True, '1', '43200'][1, '0', '-43200', '-2400000', '1/2', True, '1', '43200']Failed
fixture 4[1, '21600', '-21600', '-9599997/4', '3/4', True, '1', '21600'][1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '21600']Failed
fixture 5[0, '21600', '-21600', '-9600001/4', '-1/4', True, '0', '21600'][0, '21600', '-21600', '-9600003/4', '-1/4', True, '0', '21600']Failed
fixture 6[-1, '64800', '21600', '-9600003/4', '-3/4', False, '0', '64800'][-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800']Failed
fixture 7[-1, '21600', '-21600', '-9600005/4', '-5/4', True, '-1', '21600'][-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '21600']Failed
fixture 8[0, '5400108/125', '108/125', '-239999999999/100000', '1/100000', False, '1', '10799892/125'][0, '5400108/125', '108/125', '-240000049999/100000', '1/100000', False, '1', '10799892/125']Failed
fixture 9[2400001, '0', '-43200', '1/2', '4800001/2', True, '2400001', '43200'][2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200']Failed
fixture 10[2400001, '43200', '0', '1', '2400001', False, '2400002', '86400'][2400001, '43200', '0', '1/2', '2400001', False, '2400002', '86400']Failed
fixture 11[2, '72000', '28800', '-7199993/3', '7/3', False, '3', '57600'][2, '72000', '28800', '-14399989/6', '7/3', False, '3', '57600']Failed
variant capture[0, '388800/7', '86400/7', '-16799999/7', '1/7', False, '1', '518400/7'][0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7']Failed

SHA-256 / 317132a2880e6aff3426d45cb794ac8aa3ddd6a8fcfb9d0d502f84b33353cc09

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    shifted = Fraction(r['num'],r['den']) + Fraction(1,2)
    day = shifted.numerator // shifted.denominator
    fraction = shifted - day
    tick = fraction * 86400
    noon_delta = tick - 43200
    modified = Fraction(r['num'],r['den']) - Fraction(2400001)
    roundtrip = Fraction(day) + Fraction(tick,86400) - Fraction(1,2)
    before_noon = tick < 43200
    next_noon = Fraction(day) if before_noon else Fraction(day+1)
    until_noon = (next_noon - Fraction(r['num'],r['den'])) * 86400
    return [day,str(tick),str(noon_delta),str(modified),str(roundtrip),before_noon,str(next_noon),str(until_noon)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'num': 0, 'den': 1}), [0, '43200', '0', '-4800001/2', '0', False, '1', '86400'])
check('fixture 2', solve({'num': 1, 'den': 4}), [0, '64800', '21600', '-9600001/4', '1/4', False, '1', '64800'])
check('fixture 3', solve({'num': 1, 'den': 2}), [1, '0', '-43200', '-2400000', '1/2', True, '1', '43200'])
check('fixture 4', solve({'num': 3, 'den': 4}), [1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '21600'])
check('fixture 5', solve({'num': -1, 'den': 4}), [0, '21600', '-21600', '-9600003/4', '-1/4', True, '0', '21600'])
check('fixture 6', solve({'num': -3, 'den': 4}), [-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800'])
check('fixture 7', solve({'num': -5, 'den': 4}), [-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '21600'])
check('fixture 8', solve({'num': 1, 'den': 100000}), [0, '5400108/125', '108/125', '-240000049999/100000', '1/100000', False, '1', '10799892/125'])
check('fixture 9', solve({'num': 4800001, 'den': 2}), [2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200'])
check('fixture 10', solve({'num': 4800002, 'den': 2}), [2400001, '43200', '0', '1/2', '2400001', False, '2400002', '86400'])
check('fixture 11', solve({'num': 7, 'den': 3}), [2, '72000', '28800', '-14399989/6', '7/3', False, '3', '57600'])
variant = [({'num': 1, 'den': 7}, [0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7']), ({'num': 2, 'den': 7}, [0, '475200/7', '172800/7', '-33600003/14', '2/7', False, '1', '432000/7']), ({'num': 3, 'den': 7}, [0, '561600/7', '259200/7', '-33600001/14', '3/7', False, '1', '345600/7']), ({'num': 4, 'den': 7}, [1, '43200/7', '-259200/7', '-33599999/14', '4/7', True, '1', '259200/7']), ({'num': 5, 'den': 7}, [1, '129600/7', '-172800/7', '-33599997/14', '5/7', True, '1', '172800/7'])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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[0, '43200', '0', '-2400001', '0', False, '1', '86400'][0, '43200', '0', '-4800001/2', '0', False, '1', '86400']Failed
fixture 2[0, '64800', '21600', '-9600003/4', '1/4', False, '1', '64800'][0, '64800', '21600', '-9600001/4', '1/4', False, '1', '64800']Failed
fixture 3[1, '0', '-43200', '-4800001/2', '1/2', True, '1', '43200'][1, '0', '-43200', '-2400000', '1/2', True, '1', '43200']Failed
fixture 4[1, '21600', '-21600', '-9600001/4', '3/4', True, '1', '21600'][1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '21600']Failed
fixture 5[0, '21600', '-21600', '-9600005/4', '-1/4', True, '0', '21600'][0, '21600', '-21600', '-9600003/4', '-1/4', True, '0', '21600']Failed
fixture 6[-1, '64800', '21600', '-9600007/4', '-3/4', False, '0', '64800'][-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800']Failed
fixture 7[-1, '21600', '-21600', '-9600009/4', '-5/4', True, '-1', '21600'][-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '21600']Failed
fixture 8[0, '5400108/125', '108/125', '-240000099999/100000', '1/100000', False, '1', '10799892/125'][0, '5400108/125', '108/125', '-240000049999/100000', '1/100000', False, '1', '10799892/125']Failed
fixture 9[2400001, '0', '-43200', '-1/2', '4800001/2', True, '2400001', '43200'][2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200']Failed
fixture 10[2400001, '43200', '0', '0', '2400001', False, '2400002', '86400'][2400001, '43200', '0', '1/2', '2400001', False, '2400002', '86400']Failed
fixture 11[2, '72000', '28800', '-7199996/3', '7/3', False, '3', '57600'][2, '72000', '28800', '-14399989/6', '7/3', False, '3', '57600']Failed
variant capture[0, '388800/7', '86400/7', '-16800006/7', '1/7', False, '1', '518400/7'][0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7']Failed

SHA-256 / 87245be827556764b8a5cb5361d30df382c59debb85b68cd3714cee0072a3869

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    shifted = Fraction(r['num'],r['den']) + Fraction(1,2)
    day = shifted.numerator // shifted.denominator
    fraction = shifted - day
    tick = fraction * 86400
    noon_delta = tick - 43200
    modified = Fraction(r['num'],r['den']) - Fraction(4800001,2)
    roundtrip = Fraction(day) + Fraction(tick,86400) - Fraction(1,2)
    before_noon = tick < 43200
    next_noon = Fraction(day) if before_noon else Fraction(day+1)
    until_noon = (next_noon - Fraction(r['num'],r['den'])) * 86400
    return [day,str(tick),str(noon_delta),str(modified),str(roundtrip),before_noon,str(next_noon),str(until_noon)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'num': 0, 'den': 1}), [0, '43200', '0', '-4800001/2', '0', False, '1', '86400'])
check('fixture 2', solve({'num': 1, 'den': 4}), [0, '64800', '21600', '-9600001/4', '1/4', False, '1', '64800'])
check('fixture 3', solve({'num': 1, 'den': 2}), [1, '0', '-43200', '-2400000', '1/2', True, '1', '43200'])
check('fixture 4', solve({'num': 3, 'den': 4}), [1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '21600'])
check('fixture 5', solve({'num': -1, 'den': 4}), [0, '21600', '-21600', '-9600003/4', '-1/4', True, '0', '21600'])
check('fixture 6', solve({'num': -3, 'den': 4}), [-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800'])
check('fixture 7', solve({'num': -5, 'den': 4}), [-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '21600'])
check('fixture 8', solve({'num': 1, 'den': 100000}), [0, '5400108/125', '108/125', '-240000049999/100000', '1/100000', False, '1', '10799892/125'])
check('fixture 9', solve({'num': 4800001, 'den': 2}), [2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200'])
check('fixture 10', solve({'num': 4800002, 'den': 2}), [2400001, '43200', '0', '1/2', '2400001', False, '2400002', '86400'])
check('fixture 11', solve({'num': 7, 'den': 3}), [2, '72000', '28800', '-14399989/6', '7/3', False, '3', '57600'])
variant = [({'num': 1, 'den': 7}, [0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7']), ({'num': 2, 'den': 7}, [0, '475200/7', '172800/7', '-33600003/14', '2/7', False, '1', '432000/7']), ({'num': 3, 'den': 7}, [0, '561600/7', '259200/7', '-33600001/14', '3/7', False, '1', '345600/7']), ({'num': 4, 'den': 7}, [1, '43200/7', '-259200/7', '-33599999/14', '4/7', True, '1', '259200/7']), ({'num': 5, 'den': 7}, [1, '129600/7', '-172800/7', '-33599997/14', '5/7', True, '1', '172800/7'])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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[0, '43200', '0', '-4800001/2', '0', False, '1', '86400'][0, '43200', '0', '-4800001/2', '0', False, '1', '86400']Passed
fixture 2[0, '64800', '21600', '-9600001/4', '1/4', False, '1', '64800'][0, '64800', '21600', '-9600001/4', '1/4', False, '1', '64800']Passed
fixture 3[1, '0', '-43200', '-2400000', '1/2', True, '1', '43200'][1, '0', '-43200', '-2400000', '1/2', True, '1', '43200']Passed
fixture 4[1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '21600'][1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '21600']Passed
fixture 5[0, '21600', '-21600', '-9600003/4', '-1/4', True, '0', '21600'][0, '21600', '-21600', '-9600003/4', '-1/4', True, '0', '21600']Passed
fixture 6[-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800'][-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800']Passed
fixture 7[-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '21600'][-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '21600']Passed
fixture 8[0, '5400108/125', '108/125', '-240000049999/100000', '1/100000', False, '1', '10799892/125'][0, '5400108/125', '108/125', '-240000049999/100000', '1/100000', False, '1', '10799892/125']Passed
fixture 9[2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200'][2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200']Passed
fixture 10[2400001, '43200', '0', '1/2', '2400001', False, '2400002', '86400'][2400001, '43200', '0', '1/2', '2400001', False, '2400002', '86400']Passed
fixture 11[2, '72000', '28800', '-14399989/6', '7/3', False, '3', '57600'][2, '72000', '28800', '-14399989/6', '7/3', False, '3', '57600']Passed
variant capture[0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7'][0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7']Passed

SHA-256 / b9f71cc2a7853b5e79469e13883c105f77ec96ea13eecdf189d728aa1fc0ee77

Verification & scope

Deterministic integer reference model with stipulated units and policies; not a complete clock, wire standard or platform implementation. 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:40:00.370312+00:00.

Case digest / 1533e732b0b4c76a4771158d38ac13a6271e68ef2459e743f171c5726c0c52fe