FA-18756 / Time representation / Open access
Clock fraction admits next whole second or negative residue · case 01
The decoded time state disagrees with the explicit regression oracle for fraction_ok.
ROOT CAUSE
Clock fraction admits next whole second or negative residue.
THE FAILURE
Clock fraction admits next whole second or negative residue.
Unsuccessful approach: The partial correction still substitutes 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 = ((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 | [True, [10, 12, 0, 0, 1000], None, 907201000] | [False, None, None, None] | Failed |
| 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 / e54a5280cf754ba81fc683371417c34415c9a6cc6b6a628078e369deede38afb
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 = 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 | [True, [10, 12, 0, 0, -1], None, 907199999] | [False, None, None, None] | Failed |
| 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 / deebaf9ea1a5c87417d0252847ba2ca43f843c6ee05b4e0c582b85ba4350baa3
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 16 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:01.097372+00:00.
Case digest / dbccb868cf0ca550c3ee79d40863d37b1a51f7e4c6d90b769fdcb9144de26760