FAILURE MAP
← Case archive

FA-18736 / Time representation / Open access

Noon countdown retains day units or masks a past selected noon · case 01

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

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

ROOT CAUSE

Noon countdown retains day units or masks a past selected noon.

THE FAILURE

Noon countdown retains day units or masks a past selected noon.

Unsuccessful approach: The partial correction still substitutes int((next_noon - Fraction(r['num'],r['den'])) * 86400) 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']) - 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'])
    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', '1'][0, '43200', '0', '-4800001/2', '0', False, '1', '86400']Failed
fixture 2[0, '64800', '21600', '-9600001/4', '1/4', False, '1', '3/4'][0, '64800', '21600', '-9600001/4', '1/4', False, '1', '64800']Failed
fixture 3[1, '0', '-43200', '-2400000', '1/2', True, '1', '1/2'][1, '0', '-43200', '-2400000', '1/2', True, '1', '43200']Failed
fixture 4[1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '1/4'][1, '21600', '-21600', '-9599999/4', '3/4', True, '1', '21600']Failed
fixture 5[0, '21600', '-21600', '-9600003/4', '-1/4', True, '0', '1/4'][0, '21600', '-21600', '-9600003/4', '-1/4', True, '0', '21600']Failed
fixture 6[-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '3/4'][-1, '64800', '21600', '-9600005/4', '-3/4', False, '0', '64800']Failed
fixture 7[-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '1/4'][-1, '21600', '-21600', '-9600007/4', '-5/4', True, '-1', '21600']Failed
fixture 8[0, '5400108/125', '108/125', '-240000049999/100000', '1/100000', False, '1', '99999/100000'][0, '5400108/125', '108/125', '-240000049999/100000', '1/100000', False, '1', '10799892/125']Failed
fixture 9[2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '1/2'][2400001, '0', '-43200', '0', '4800001/2', True, '2400001', '43200']Failed
fixture 10[2400001, '43200', '0', '1/2', '2400001', False, '2400002', '1'][2400001, '43200', '0', '1/2', '2400001', False, '2400002', '86400']Failed
fixture 11[2, '72000', '28800', '-14399989/6', '7/3', False, '3', '2/3'][2, '72000', '28800', '-14399989/6', '7/3', False, '3', '57600']Failed
variant capture[0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '6/7'][0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7']Failed

SHA-256 / ea569865ac3fd2b427799d45452a47e1621b9565062b3fa636846582af46dcea

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(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 = int((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', '86399'][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']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', '74057'][0, '388800/7', '86400/7', '-33600005/14', '1/7', False, '1', '518400/7']Failed

SHA-256 / d2c36c1eb8ea1a86d956d71e75bb8e33a12c331c8cb2a3c0dbbc463f7e8074c2

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 12 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / 61917b0124ac8cf0748dec513c01c914a980f000404f4fafdefbb43ad7036d97