FA-17406 / Time representation / Open access
Fraction validator confuses the reserved endpoint · case 01
The decoded time state disagrees with the explicit regression oracle for valid.
ROOT CAUSE
Fraction validator confuses the reserved endpoint.
THE FAILURE
Fraction validator confuses the reserved endpoint.
Unsuccessful approach: The partial correction still substitutes fraction < 999 at the same fault site.
Case contract
Decode four unsigned bytes: signed 16-bit big-endian seconds and unsigned 16-bit fractional microticks, 1000 per second. Fraction >=1000 is invalid. Return validity and, only for valid input, exact total microticks, signed decimal timestamp with three fractional digits, and whole-second coordinate after a one-microtick increment. Negative display uses magnitude decomposition.
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):
word = r[0] * 256 + r[1]
seconds = word - 65536 if word >= 32768 else word
fraction = r[2] * 256 + r[3]
valid = fraction <= 1000
total = seconds * 1000 + fraction
negative = total < 0
magnitude = abs(total)
whole = magnitude // 1000
part = magnitude % 1000
next_second = seconds + (fraction + 1) // 1000
return [valid, total if valid else None, ('-' if negative else '') + str(whole) + '.' + str(part).zfill(3) if valid else None,next_second if valid else None]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([0, 1, 0, 0]), [True, 1000, '1.000', 1])
check('fixture 2', solve([255, 255, 0, 1]), [True, -999, '-0.999', -1])
check('fixture 3', solve([128, 0, 3, 231]), [True, -32767001, '-32767.001', -32767])
check('fixture 4', solve([0, 0, 0, 0]), [True, 0, '0.000', 0])
check('fixture 5', solve([0, 0, 3, 232]), [False, None, None, None])
check('fixture 6', solve([255, 255, 3, 232]), [False, None, None, None])
check('fixture 7', solve([0, 2, 1, 3]), [True, 2259, '2.259', 2])
check('fixture 8', solve([127, 255, 3, 231]), [True, 32767999, '32767.999', 32768])
check('fixture 9', solve([255, 254, 0, 0]), [True, -2000, '-2.000', -2])
check('fixture 10', solve([0, 0, 3, 231]), [True, 999, '0.999', 1])
variant = [([0, 2, 0, 0], [True, 2000, '2.000', 2]), ([0, 3, 0, 0], [True, 3000, '3.000', 3]), ([0, 4, 0, 0], [True, 4000, '4.000', 4]), ([0, 5, 0, 0], [True, 5000, '5.000', 5]), ([0, 6, 0, 0], [True, 6000, '6.000', 6])]
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, 1000, '1.000', 1] | [True, 1000, '1.000', 1] | Passed |
| fixture 2 | [True, -999, '-0.999', -1] | [True, -999, '-0.999', -1] | Passed |
| fixture 3 | [True, -32767001, '-32767.001', -32767] | [True, -32767001, '-32767.001', -32767] | Passed |
| fixture 4 | [True, 0, '0.000', 0] | [True, 0, '0.000', 0] | Passed |
| fixture 5 | [True, 1000, '1.000', 1] | [False, None, None, None] | Failed |
| fixture 6 | [True, 0, '0.000', 0] | [False, None, None, None] | Failed |
| fixture 7 | [True, 2259, '2.259', 2] | [True, 2259, '2.259', 2] | Passed |
| fixture 8 | [True, 32767999, '32767.999', 32768] | [True, 32767999, '32767.999', 32768] | Passed |
| fixture 9 | [True, -2000, '-2.000', -2] | [True, -2000, '-2.000', -2] | Passed |
| fixture 10 | [True, 999, '0.999', 1] | [True, 999, '0.999', 1] | Passed |
| variant capture | [True, 2000, '2.000', 2] | [True, 2000, '2.000', 2] | Passed |
SHA-256 / 36a3f9bf2fc3a00904b39bc2486d35e174f7d7e21f6d8251b50f533f09b651c4
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):
word = r[0] * 256 + r[1]
seconds = word - 65536 if word >= 32768 else word
fraction = r[2] * 256 + r[3]
valid = fraction < 999
total = seconds * 1000 + fraction
negative = total < 0
magnitude = abs(total)
whole = magnitude // 1000
part = magnitude % 1000
next_second = seconds + (fraction + 1) // 1000
return [valid, total if valid else None, ('-' if negative else '') + str(whole) + '.' + str(part).zfill(3) if valid else None,next_second if valid else None]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([0, 1, 0, 0]), [True, 1000, '1.000', 1])
check('fixture 2', solve([255, 255, 0, 1]), [True, -999, '-0.999', -1])
check('fixture 3', solve([128, 0, 3, 231]), [True, -32767001, '-32767.001', -32767])
check('fixture 4', solve([0, 0, 0, 0]), [True, 0, '0.000', 0])
check('fixture 5', solve([0, 0, 3, 232]), [False, None, None, None])
check('fixture 6', solve([255, 255, 3, 232]), [False, None, None, None])
check('fixture 7', solve([0, 2, 1, 3]), [True, 2259, '2.259', 2])
check('fixture 8', solve([127, 255, 3, 231]), [True, 32767999, '32767.999', 32768])
check('fixture 9', solve([255, 254, 0, 0]), [True, -2000, '-2.000', -2])
check('fixture 10', solve([0, 0, 3, 231]), [True, 999, '0.999', 1])
variant = [([0, 2, 0, 0], [True, 2000, '2.000', 2]), ([0, 3, 0, 0], [True, 3000, '3.000', 3]), ([0, 4, 0, 0], [True, 4000, '4.000', 4]), ([0, 5, 0, 0], [True, 5000, '5.000', 5]), ([0, 6, 0, 0], [True, 6000, '6.000', 6])]
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, 1000, '1.000', 1] | [True, 1000, '1.000', 1] | Passed |
| fixture 2 | [True, -999, '-0.999', -1] | [True, -999, '-0.999', -1] | Passed |
| fixture 3 | [False, None, None, None] | [True, -32767001, '-32767.001', -32767] | Failed |
| fixture 4 | [True, 0, '0.000', 0] | [True, 0, '0.000', 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 | [True, 2259, '2.259', 2] | [True, 2259, '2.259', 2] | Passed |
| fixture 8 | [False, None, None, None] | [True, 32767999, '32767.999', 32768] | Failed |
| fixture 9 | [True, -2000, '-2.000', -2] | [True, -2000, '-2.000', -2] | Passed |
| fixture 10 | [False, None, None, None] | [True, 999, '0.999', 1] | Failed |
| variant capture | [True, 2000, '2.000', 2] | [True, 2000, '2.000', 2] | Passed |
SHA-256 / 3d847a4586304a0d24ba1405cf93a6aa3053e729532d5a7be304b398ec127947
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 11 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:39:46.512961+00:00.
Case digest / 6b4a754b548445ae7630731f3b3057696c3e0215bb404a94063be7a007972d7c