FA-17416 / Time representation / Open access
Timestamp sign marker misses the minimum code or negative subsecond instants · case 01
The decoded time state disagrees with the explicit regression oracle for negative.
ROOT CAUSE
Timestamp sign marker misses the minimum code or negative subsecond instants.
VERIFIED REPAIR
Preserve the declared coordinate and state contract at negative: negative = total < 0.
Unsuccessful approach: The partial correction still substitutes total < -1000 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 = word > 32768
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] | 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 / 4ad2e7247a0693bae6f5b9182ff7345f7fae54c66528ea179b995b9bc47b9172
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 < -1000
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] | Failed |
| 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 / 96104d7269619535a61192169e6a052841784fc670030f9e2ee6ee124319986e
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.173156+00:00.
Case digest / 4f75853ac00297a7cb82ec5ec8f45d1031f8d9b2a1a538cbbdd3842b47f2ddd4