FA-17771 / Time representation / Open access
Extra-second label is reduced modulo sixty · case 01
The decoded time state disagrees with the explicit regression oracle for second.
ROOT CAUSE
Extra-second label is reduced modulo sixty.
VERIFIED REPAIR
Preserve the declared coordinate and state contract at second: second = None if not valid else (60 if extra else r['label'] % 60).
Unsuccessful approach: The partial correction still substitutes None if not valid else min(59,r['label'] % 60) at the same fault site.
Case contract
A stipulated positive-leap day has label 86400 following ordinary 0..86399; a normal day does not. Return validity, atomic origin+label or None, display [hour,minute,second] (23:59:60 for extra label), final-label flag, ticks until next midnight or None, and atomic next-midnight coordinate. No real-world leap table is claimed.
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):
length = 86400 + int(r['leap'])
valid = 0 <= r['label'] < length
atomic = r['origin'] + r['label'] if valid else None
extra = valid and r['label'] == 86400
hour = None if not valid else (23 if extra else r['label'] // 3600)
minute = None if not valid else (59 if extra else r['label'] // 60 % 60)
second = None if not valid else r['label'] % 60
last = valid and r['label'] == length - 1
remaining = None if not valid else length - r['label']
midnight = r['origin'] + length
return [valid,atomic,[hour,minute,second],last,remaining,midnight]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'leap': True, 'label': 86400, 'origin': 100000}), [True, 186400, [23, 59, 60], True, 1, 186401])
check('fixture 2', solve({'leap': False, 'label': 86400, 'origin': 100000}), [False, None, [None, None, None], False, None, 186400])
check('fixture 3', solve({'leap': True, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], False, 2, 86451])
check('fixture 4', solve({'leap': False, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], True, 1, 86450])
check('fixture 5', solve({'leap': True, 'label': 0, 'origin': -100}), [True, -100, [0, 0, 0], False, 86401, 86301])
check('fixture 6', solve({'leap': False, 'label': 3601, 'origin': 0}), [True, 3601, [1, 0, 1], False, 82799, 86400])
check('fixture 7', solve({'leap': True, 'label': -1, 'origin': 100}), [False, None, [None, None, None], False, None, 86501])
check('fixture 8', solve({'leap': True, 'label': 86401, 'origin': 20}), [False, None, [None, None, None], False, None, 86421])
check('fixture 9', solve({'leap': False, 'label': 0, 'origin': 0}), [True, 0, [0, 0, 0], False, 86400, 86400])
check('fixture 10', solve({'leap': True, 'label': 3661, 'origin': -20}), [True, 3641, [1, 1, 1], False, 82740, 86381])
variant = [({'leap': True, 'label': 86400, 'origin': 100001}, [True, 186401, [23, 59, 60], True, 1, 186402]), ({'leap': True, 'label': 86400, 'origin': 100002}, [True, 186402, [23, 59, 60], True, 1, 186403]), ({'leap': True, 'label': 86400, 'origin': 100003}, [True, 186403, [23, 59, 60], True, 1, 186404]), ({'leap': True, 'label': 86400, 'origin': 100004}, [True, 186404, [23, 59, 60], True, 1, 186405]), ({'leap': True, 'label': 86400, 'origin': 100005}, [True, 186405, [23, 59, 60], True, 1, 186406])]
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, 186400, [23, 59, 0], True, 1, 186401] | [True, 186400, [23, 59, 60], True, 1, 186401] | Failed |
| fixture 2 | [False, None, [None, None, None], False, None, 186400] | [False, None, [None, None, None], False, None, 186400] | Passed |
| fixture 3 | [True, 86449, [23, 59, 59], False, 2, 86451] | [True, 86449, [23, 59, 59], False, 2, 86451] | Passed |
| fixture 4 | [True, 86449, [23, 59, 59], True, 1, 86450] | [True, 86449, [23, 59, 59], True, 1, 86450] | Passed |
| fixture 5 | [True, -100, [0, 0, 0], False, 86401, 86301] | [True, -100, [0, 0, 0], False, 86401, 86301] | Passed |
| fixture 6 | [True, 3601, [1, 0, 1], False, 82799, 86400] | [True, 3601, [1, 0, 1], False, 82799, 86400] | Passed |
| fixture 7 | [False, None, [None, None, None], False, None, 86501] | [False, None, [None, None, None], False, None, 86501] | Passed |
| fixture 8 | [False, None, [None, None, None], False, None, 86421] | [False, None, [None, None, None], False, None, 86421] | Passed |
| fixture 9 | [True, 0, [0, 0, 0], False, 86400, 86400] | [True, 0, [0, 0, 0], False, 86400, 86400] | Passed |
| fixture 10 | [True, 3641, [1, 1, 1], False, 82740, 86381] | [True, 3641, [1, 1, 1], False, 82740, 86381] | Passed |
| variant capture | [True, 186401, [23, 59, 0], True, 1, 186402] | [True, 186401, [23, 59, 60], True, 1, 186402] | Failed |
SHA-256 / dba9fcc2a08d669dbdd8f5df8d905f273349dacf58b25cd28d3962348ba71bf3
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):
length = 86400 + int(r['leap'])
valid = 0 <= r['label'] < length
atomic = r['origin'] + r['label'] if valid else None
extra = valid and r['label'] == 86400
hour = None if not valid else (23 if extra else r['label'] // 3600)
minute = None if not valid else (59 if extra else r['label'] // 60 % 60)
second = None if not valid else min(59,r['label'] % 60)
last = valid and r['label'] == length - 1
remaining = None if not valid else length - r['label']
midnight = r['origin'] + length
return [valid,atomic,[hour,minute,second],last,remaining,midnight]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'leap': True, 'label': 86400, 'origin': 100000}), [True, 186400, [23, 59, 60], True, 1, 186401])
check('fixture 2', solve({'leap': False, 'label': 86400, 'origin': 100000}), [False, None, [None, None, None], False, None, 186400])
check('fixture 3', solve({'leap': True, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], False, 2, 86451])
check('fixture 4', solve({'leap': False, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], True, 1, 86450])
check('fixture 5', solve({'leap': True, 'label': 0, 'origin': -100}), [True, -100, [0, 0, 0], False, 86401, 86301])
check('fixture 6', solve({'leap': False, 'label': 3601, 'origin': 0}), [True, 3601, [1, 0, 1], False, 82799, 86400])
check('fixture 7', solve({'leap': True, 'label': -1, 'origin': 100}), [False, None, [None, None, None], False, None, 86501])
check('fixture 8', solve({'leap': True, 'label': 86401, 'origin': 20}), [False, None, [None, None, None], False, None, 86421])
check('fixture 9', solve({'leap': False, 'label': 0, 'origin': 0}), [True, 0, [0, 0, 0], False, 86400, 86400])
check('fixture 10', solve({'leap': True, 'label': 3661, 'origin': -20}), [True, 3641, [1, 1, 1], False, 82740, 86381])
variant = [({'leap': True, 'label': 86400, 'origin': 100001}, [True, 186401, [23, 59, 60], True, 1, 186402]), ({'leap': True, 'label': 86400, 'origin': 100002}, [True, 186402, [23, 59, 60], True, 1, 186403]), ({'leap': True, 'label': 86400, 'origin': 100003}, [True, 186403, [23, 59, 60], True, 1, 186404]), ({'leap': True, 'label': 86400, 'origin': 100004}, [True, 186404, [23, 59, 60], True, 1, 186405]), ({'leap': True, 'label': 86400, 'origin': 100005}, [True, 186405, [23, 59, 60], True, 1, 186406])]
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, 186400, [23, 59, 0], True, 1, 186401] | [True, 186400, [23, 59, 60], True, 1, 186401] | Failed |
| fixture 2 | [False, None, [None, None, None], False, None, 186400] | [False, None, [None, None, None], False, None, 186400] | Passed |
| fixture 3 | [True, 86449, [23, 59, 59], False, 2, 86451] | [True, 86449, [23, 59, 59], False, 2, 86451] | Passed |
| fixture 4 | [True, 86449, [23, 59, 59], True, 1, 86450] | [True, 86449, [23, 59, 59], True, 1, 86450] | Passed |
| fixture 5 | [True, -100, [0, 0, 0], False, 86401, 86301] | [True, -100, [0, 0, 0], False, 86401, 86301] | Passed |
| fixture 6 | [True, 3601, [1, 0, 1], False, 82799, 86400] | [True, 3601, [1, 0, 1], False, 82799, 86400] | Passed |
| fixture 7 | [False, None, [None, None, None], False, None, 86501] | [False, None, [None, None, None], False, None, 86501] | Passed |
| fixture 8 | [False, None, [None, None, None], False, None, 86421] | [False, None, [None, None, None], False, None, 86421] | Passed |
| fixture 9 | [True, 0, [0, 0, 0], False, 86400, 86400] | [True, 0, [0, 0, 0], False, 86400, 86400] | Passed |
| fixture 10 | [True, 3641, [1, 1, 1], False, 82740, 86381] | [True, 3641, [1, 1, 1], False, 82740, 86381] | Passed |
| variant capture | [True, 186401, [23, 59, 0], True, 1, 186402] | [True, 186401, [23, 59, 60], True, 1, 186402] | Failed |
SHA-256 / bd63b7d6830231bcdaa34c541117ae92344c8769afd8674dc96539b67ec6ddd3
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):
length = 86400 + int(r['leap'])
valid = 0 <= r['label'] < length
atomic = r['origin'] + r['label'] if valid else None
extra = valid and r['label'] == 86400
hour = None if not valid else (23 if extra else r['label'] // 3600)
minute = None if not valid else (59 if extra else r['label'] // 60 % 60)
second = None if not valid else (60 if extra else r['label'] % 60)
last = valid and r['label'] == length - 1
remaining = None if not valid else length - r['label']
midnight = r['origin'] + length
return [valid,atomic,[hour,minute,second],last,remaining,midnight]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'leap': True, 'label': 86400, 'origin': 100000}), [True, 186400, [23, 59, 60], True, 1, 186401])
check('fixture 2', solve({'leap': False, 'label': 86400, 'origin': 100000}), [False, None, [None, None, None], False, None, 186400])
check('fixture 3', solve({'leap': True, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], False, 2, 86451])
check('fixture 4', solve({'leap': False, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], True, 1, 86450])
check('fixture 5', solve({'leap': True, 'label': 0, 'origin': -100}), [True, -100, [0, 0, 0], False, 86401, 86301])
check('fixture 6', solve({'leap': False, 'label': 3601, 'origin': 0}), [True, 3601, [1, 0, 1], False, 82799, 86400])
check('fixture 7', solve({'leap': True, 'label': -1, 'origin': 100}), [False, None, [None, None, None], False, None, 86501])
check('fixture 8', solve({'leap': True, 'label': 86401, 'origin': 20}), [False, None, [None, None, None], False, None, 86421])
check('fixture 9', solve({'leap': False, 'label': 0, 'origin': 0}), [True, 0, [0, 0, 0], False, 86400, 86400])
check('fixture 10', solve({'leap': True, 'label': 3661, 'origin': -20}), [True, 3641, [1, 1, 1], False, 82740, 86381])
variant = [({'leap': True, 'label': 86400, 'origin': 100001}, [True, 186401, [23, 59, 60], True, 1, 186402]), ({'leap': True, 'label': 86400, 'origin': 100002}, [True, 186402, [23, 59, 60], True, 1, 186403]), ({'leap': True, 'label': 86400, 'origin': 100003}, [True, 186403, [23, 59, 60], True, 1, 186404]), ({'leap': True, 'label': 86400, 'origin': 100004}, [True, 186404, [23, 59, 60], True, 1, 186405]), ({'leap': True, 'label': 86400, 'origin': 100005}, [True, 186405, [23, 59, 60], True, 1, 186406])]
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, 186400, [23, 59, 60], True, 1, 186401] | [True, 186400, [23, 59, 60], True, 1, 186401] | Passed |
| fixture 2 | [False, None, [None, None, None], False, None, 186400] | [False, None, [None, None, None], False, None, 186400] | Passed |
| fixture 3 | [True, 86449, [23, 59, 59], False, 2, 86451] | [True, 86449, [23, 59, 59], False, 2, 86451] | Passed |
| fixture 4 | [True, 86449, [23, 59, 59], True, 1, 86450] | [True, 86449, [23, 59, 59], True, 1, 86450] | Passed |
| fixture 5 | [True, -100, [0, 0, 0], False, 86401, 86301] | [True, -100, [0, 0, 0], False, 86401, 86301] | Passed |
| fixture 6 | [True, 3601, [1, 0, 1], False, 82799, 86400] | [True, 3601, [1, 0, 1], False, 82799, 86400] | Passed |
| fixture 7 | [False, None, [None, None, None], False, None, 86501] | [False, None, [None, None, None], False, None, 86501] | Passed |
| fixture 8 | [False, None, [None, None, None], False, None, 86421] | [False, None, [None, None, None], False, None, 86421] | Passed |
| fixture 9 | [True, 0, [0, 0, 0], False, 86400, 86400] | [True, 0, [0, 0, 0], False, 86400, 86400] | Passed |
| fixture 10 | [True, 3641, [1, 1, 1], False, 82740, 86381] | [True, 3641, [1, 1, 1], False, 82740, 86381] | Passed |
| variant capture | [True, 186401, [23, 59, 60], True, 1, 186402] | [True, 186401, [23, 59, 60], True, 1, 186402] | Passed |
SHA-256 / f3916ac5f40c0fa3b0131c2fee03d434e8e3f18a2f9f87478e53adbca738f845
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:39:50.462317+00:00.
Case digest / d45a0cb52eb0a349b4fdb8fe3256aae6f83ec60ea04570ddca2797da07b58cbb