FAILURE MAP
← Case archive

FA-18711 / Time representation / Open access

Noon displacement keeps midnight reference or reverses sign · case 01

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

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

ROOT CAUSE

Noon displacement keeps midnight reference or reverses sign.

VERIFIED REPAIR

Preserve the declared coordinate and state contract at noon_delta: noon_delta = tick - 43200.

Unsuccessful approach: The partial correction still substitutes 43200 - tick 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
    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', '43200', '-4800001/2', '0', False, '1', '86400'][0, '43200', '0', '-4800001/2', '0', False, '1', '86400']Failed
fixture 2[0, '64800', '64800', '-9600001/4', '1/4', False, '1', '64800'][0, '64800', '21600', '-9600001/4', '1/4', False, '1', '64800']Failed
fixture 3[1, '0', '0', '-2400000', '1/2', True, '1', '43200'][1, '0', '-43200', '-2400000', '1/2', True, '1', '43200']Failed
fixture 4[1, '21600', '21600', '-9599999/4', '3/4', True, '1', '21600'][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']Failed
fixture 6[-1, '64800', '64800', '-9600005/4', '-3/4', False, '0', '64800'][-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']Failed
fixture 8[0, '5400108/125', '5400108/125', '-240000049999/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', '0', '0', '4800001/2', True, '2400001', '43200'][2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200']Failed
fixture 10[2400001, '43200', '43200', '1/2', '2400001', False, '2400002', '86400'][2400001, '43200', '0', '1/2', '2400001', False, '2400002', '86400']Failed
fixture 11[2, '72000', '72000', '-14399989/6', '7/3', False, '3', '57600'][2, '72000', '28800', '-14399989/6', '7/3', False, '3', '57600']Failed
variant capture[0, '388800/7', '388800/7', '-33600005/14', '1/7', False, '1', '518400/7'][0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7']Failed

SHA-256 / c04ca1bb59a043fdde57a264ad1a1edd195fd10adfe9aa3bd1097596e8bf0d7a

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 = 43200 - tick
    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']Failed
fixture 3[1, '0', '43200', '-2400000', '1/2', True, '1', '43200'][1, '0', '-43200', '-2400000', '1/2', True, '1', '43200']Failed
fixture 4[1, '21600', '21600', '-9599999/4', '3/4', True, '1', '21600'][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']Failed
fixture 6[-1, '64800', '-21600', '-9600005/4', '-3/4', False, '0', '64800'][-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']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']Failed
fixture 9[2400001, '0', '43200', '0', '4800001/2', True, '2400001', '43200'][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']Failed
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']Failed

SHA-256 / 0ddae61f99a63c8f61b311020c4aabd987b116be3a984fa3f44e9bc9c08931e6

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

Case digest / 32e68b4000c87ad4e13ce3c1346f8de36d4991de4b7964d9f91634dff2c03efc