FA-17391 / Time representation / Open access
Whole-second word reverses network byte order · case 01
The decoded time state disagrees with the explicit regression oracle for word.
ROOT CAUSE
Whole-second word reverses network byte order.
VERIFIED REPAIR
Preserve the declared coordinate and state contract at word: word = r[0] * 256 + r[1].
Unsuccessful approach: The partial correction still substitutes r[0] * 255 + r[1] 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[1] * 256 + r[0]
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, 256000, '256.000', 256] | [True, 1000, '1.000', 1] | Failed |
| fixture 2 | [True, -999, '-0.999', -1] | [True, -999, '-0.999', -1] | Passed |
| fixture 3 | [True, 128999, '128.999', 129] | [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, 512259, '512.259', 512] | [True, 2259, '2.259', 2] | Failed |
| fixture 8 | [True, -128001, '-128.001', -128] | [True, 32767999, '32767.999', 32768] | Failed |
| fixture 9 | [True, -257000, '-257.000', -257] | [True, -2000, '-2.000', -2] | Failed |
| fixture 10 | [True, 999, '0.999', 1] | [True, 999, '0.999', 1] | Passed |
| variant capture | [True, 512000, '512.000', 512] | [True, 2000, '2.000', 2] | Failed |
SHA-256 / 062fee7a8f2f6650793b140946be93cf6ad9f3c7e88720b7ac193af9bbde1c87
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] * 255 + 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, -255999, '-255.999', -256] | [True, -999, '-0.999', -1] | Failed |
| fixture 3 | [True, 32640999, '32640.999', 32641] | [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, 32640999, '32640.999', 32641] | [True, 32767999, '32767.999', 32768] | Failed |
| fixture 9 | [True, -257000, '-257.000', -257] | [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 / b48c8f5102f963a238670a3a3cd2591a8166decfda1d0a69bf803a2b1d8f41d9
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:45.784171+00:00.
Case digest / cf7b3974af54a0950bc868b09b64685eaa555176789a46f28bfb3b1c017b01e3