FA-17421 / Time representation / Open access
Magnitude fails to complement a negative fractional instant · case 01
The decoded time state disagrees with the explicit regression oracle for magnitude.
ROOT CAUSE
Magnitude fails to complement a negative fractional instant.
VERIFIED REPAIR
Preserve the declared coordinate and state contract at magnitude: magnitude = abs(total).
Unsuccessful approach: The partial correction still substitutes abs(seconds) * 1000 + fraction 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 = 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, '--1.001', -1] | [True, -999, '-0.999', -1] | Failed |
| fixture 3 | [True, -32767001, '--32768.999', -32767] | [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 | [True, 32767999, '32767.999', 32768] | [True, 32767999, '32767.999', 32768] | Passed |
| fixture 9 | [True, -2000, '--2.000', -2] | [True, -2000, '-2.000', -2] | Failed |
| 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 / 880d2e53a9d086f31bbd8133807bee87fd4271b9761bb0ffc40b3b07e46c3789
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 < 1000
total = seconds * 1000 + fraction
negative = total < 0
magnitude = abs(seconds) * 1000 + fraction
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, '-1.001', -1] | [True, -999, '-0.999', -1] | Failed |
| fixture 3 | [True, -32767001, '-32768.999', -32767] | [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 | [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 / a3c238b28405bdd5ca57eefb9c00d069046228b3f12d507bd2f7a485dadafe72
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):
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 | [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 | [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 / 6a0b68021316fa2c78faae39a976ebeefa970eae96bebc4cd1a690315d9557bb
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.165549+00:00.
Case digest / 8dcc614db2fbb3d1127ca44473cd7d721e6ce5adae9769ac95fbebabe26cbbd4