FAILURE MAP
← Case archive

FA-18766 / Time representation / Open access

Twenty-four-hour label permits nonzero seconds or fraction · case 01

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

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

ROOT CAUSE

Twenty-four-hour label permits nonzero seconds or fraction.

VERIFIED REPAIR

Preserve the declared coordinate and state contract at end_valid: end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0).

Unsuccessful approach: The partial correction still substitutes not end_label or (r['minute'] == 0 and r['second'] == 0) at the same fault site.

Case contract

Controlled local date index plus clock label permits ordinary 00:00:00 through 23:59:59, or exact 24:00:00 with zero fractional milliseconds only. Normalize 24:00 to following day 00:00, retaining end-of-day provenance for roundtrip. Date index is an abstract signed day, not Gregorian arithmetic. Return admission, normalized tuple, original-day provenance and total millisecond coordinate.

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):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or r['minute'] == 0
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
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[True, [11, 0, 0, 0, 0], 10, 950400000][True, [11, 0, 0, 0, 0], 10, 950400000]Passed
fixture 2[True, [10, 0, 0, 0, 0], None, 864000000][True, [10, 0, 0, 0, 0], None, 864000000]Passed
fixture 3[True, [10, 23, 59, 59, 999], None, 950399999][True, [10, 23, 59, 59, 999], None, 950399999]Passed
fixture 4[True, [0, 0, 0, 0, 0], -1, 0][True, [0, 0, 0, 0, 0], -1, 0]Passed
fixture 5[True, [11, 0, 0, 1, 0], 10, 950401000][False, None, None, None]Failed
fixture 6[True, [11, 0, 0, 0, 1], 10, 950400001][False, None, None, None]Failed
fixture 7[False, None, None, None][False, None, None, None]Passed
fixture 8[False, None, None, None][False, None, None, None]Passed
fixture 9[False, None, None, None][False, None, None, None]Passed
fixture 10[False, None, None, None][False, None, None, None]Passed
fixture 11[False, None, None, None][False, None, None, None]Passed
fixture 12[False, None, None, None][False, None, None, None]Passed
fixture 13[False, None, None, None][False, None, None, None]Passed
fixture 14[False, None, None, None][False, None, None, None]Passed
fixture 15[True, [0, 12, 30, 1, 2], None, 45001002][True, [0, 12, 30, 1, 2], None, 45001002]Passed
variant capture[True, [12, 0, 0, 0, 0], 11, 1036800000][True, [12, 0, 0, 0, 0], 11, 1036800000]Passed

SHA-256 / 21227b482a532d813270686968c32a9a6e6430398c63141f809b556a3052ff9c

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):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
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[True, [11, 0, 0, 0, 0], 10, 950400000][True, [11, 0, 0, 0, 0], 10, 950400000]Passed
fixture 2[True, [10, 0, 0, 0, 0], None, 864000000][True, [10, 0, 0, 0, 0], None, 864000000]Passed
fixture 3[True, [10, 23, 59, 59, 999], None, 950399999][True, [10, 23, 59, 59, 999], None, 950399999]Passed
fixture 4[True, [0, 0, 0, 0, 0], -1, 0][True, [0, 0, 0, 0, 0], -1, 0]Passed
fixture 5[False, None, None, None][False, None, None, None]Passed
fixture 6[True, [11, 0, 0, 0, 1], 10, 950400001][False, None, None, None]Failed
fixture 7[False, None, None, None][False, None, None, None]Passed
fixture 8[False, None, None, None][False, None, None, None]Passed
fixture 9[False, None, None, None][False, None, None, None]Passed
fixture 10[False, None, None, None][False, None, None, None]Passed
fixture 11[False, None, None, None][False, None, None, None]Passed
fixture 12[False, None, None, None][False, None, None, None]Passed
fixture 13[False, None, None, None][False, None, None, None]Passed
fixture 14[False, None, None, None][False, None, None, None]Passed
fixture 15[True, [0, 12, 30, 1, 2], None, 45001002][True, [0, 12, 30, 1, 2], None, 45001002]Passed
variant capture[True, [12, 0, 0, 0, 0], 11, 1036800000][True, [12, 0, 0, 0, 0], 11, 1036800000]Passed

SHA-256 / 9faff29cd4971717e180d452b3c7671365cd6fd7e453a2eff76b99e52f7af5eb

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):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
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[True, [11, 0, 0, 0, 0], 10, 950400000][True, [11, 0, 0, 0, 0], 10, 950400000]Passed
fixture 2[True, [10, 0, 0, 0, 0], None, 864000000][True, [10, 0, 0, 0, 0], None, 864000000]Passed
fixture 3[True, [10, 23, 59, 59, 999], None, 950399999][True, [10, 23, 59, 59, 999], None, 950399999]Passed
fixture 4[True, [0, 0, 0, 0, 0], -1, 0][True, [0, 0, 0, 0, 0], -1, 0]Passed
fixture 5[False, None, None, None][False, None, None, None]Passed
fixture 6[False, None, None, None][False, None, None, None]Passed
fixture 7[False, None, None, None][False, None, None, None]Passed
fixture 8[False, None, None, None][False, None, None, None]Passed
fixture 9[False, None, None, None][False, None, None, None]Passed
fixture 10[False, None, None, None][False, None, None, None]Passed
fixture 11[False, None, None, None][False, None, None, None]Passed
fixture 12[False, None, None, None][False, None, None, None]Passed
fixture 13[False, None, None, None][False, None, None, None]Passed
fixture 14[False, None, None, None][False, None, None, None]Passed
fixture 15[True, [0, 12, 30, 1, 2], None, 45001002][True, [0, 12, 30, 1, 2], None, 45001002]Passed
variant capture[True, [12, 0, 0, 0, 0], 11, 1036800000][True, [12, 0, 0, 0, 0], 11, 1036800000]Passed

SHA-256 / 2a8ea0930c45b984aa2f96f737caff35367e0148a9fbf543b6e52f98ba292ec0

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

Case digest / 7a93ecaa1552830db52b044c52120bcd12bc36fd55a1532fdcc6d3c1b37049bd