FA-18701 / Time representation / Open access
Civil fraction inherits signed remainder or unshifted day number · case 01
The decoded time state disagrees with the explicit regression oracle for fraction.
ROOT CAUSE
Civil fraction inherits signed remainder or unshifted day number.
VERIFIED REPAIR
Preserve the declared coordinate and state contract at fraction: fraction = shifted - day.
Unsuccessful approach: The partial correction still substitutes shifted - int(Fraction(r['num'],r['den'])) 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 % 1 if shifted >= 0 else -(abs(shifted)%1)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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, '-21600', '-64800', '-9600005/4', '-7/4', True, '-1', '-21600'] | [-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800'] | Failed |
| fixture 7 | [-1, '-64800', '-108000', '-9600007/4', '-9/4', True, '-1', '21600'] | [-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '21600'] | Failed |
| 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 / 89f194aae1cf4ddc06d1cdcbb653b5a5b6effa071e4b44919838cbcb3fa7e3f6
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 - int(Fraction(r['num'],r['den']))
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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, '86400', '43200', '-2400000', '3/2', False, '2', '129600'] | [1, '0', '-43200', '-2400000', '1/2', True, '1', '43200'] | Failed |
| fixture 4 | [1, '108000', '64800', '-9599999/4', '7/4', False, '2', '108000'] | [1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '21600'] | Failed |
| 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, '-21600', '-64800', '-9600005/4', '-7/4', True, '-1', '-21600'] | [-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800'] | Failed |
| 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, '86400', '43200', '0', '4800003/2', False, '2400002', '129600'] | [2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200'] | Failed |
| 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 / 892ced4741c9119b7dec927673ae2afb4b06a9a2086771458bf314b3a8f15ed3
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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.286876+00:00.
Case digest / 6713cf54c74309bb641ba614aa8109762dcf319d462428ad73a6ee5e1fe2625b