FA-18786 / Time representation / Open access
Canonical coordinate uses original day after carry or treats milliseconds as seconds · case 01
The decoded time state disagrees with the explicit regression oracle for coordinate.
ROOT CAUSE
Canonical coordinate uses original day after carry or treats milliseconds as seconds.
VERIFIED REPAIR
Preserve the declared coordinate and state contract at coordinate: coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction'].
Unsuccessful approach: The partial correction still substitutes ((day*24+hour)*3600+r['minute']*60+r['second']+r['fraction'])*1000 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 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 = ((r['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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [True, [11, 0, 0, 0, 0], 10, 864000000] | [True, [11, 0, 0, 0, 0], 10, 950400000] | Failed |
| 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, -86400000] | [True, [0, 0, 0, 0, 0], -1, 0] | Failed |
| 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, 950400000] | [True, [12, 0, 0, 0, 0], 11, 1036800000] | Failed |
SHA-256 / 288cbc588ebe9cdd5d15361e2db4170ee222b5a8a7897df773d0ed13917fb5e9
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 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']+r['fraction'])*1000
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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, 951398000] | [True, [10, 23, 59, 59, 999], None, 950399999] | Failed |
| 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, 45003000] | [True, [0, 12, 30, 1, 2], None, 45001002] | Failed |
| variant capture | [True, [12, 0, 0, 0, 0], 11, 1036800000] | [True, [12, 0, 0, 0, 0], 11, 1036800000] | Passed |
SHA-256 / bc7127c6ed314e2d10bdde2079e28932eb4d5502b6740a65a1514828b4d9560c
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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:01.097372+00:00.
Case digest / 0d938458dfe5ac8e0788685b4cc5db9437d74ed6aabaca2ca7ea8a951eb56416