FA-18386 / Time representation / Open access
Epoch reconstruction forgets bias or absolute epoch · case 01
The decoded time state disagrees with the explicit regression oracle for roundtrip.
ROOT CAUSE
Epoch reconstruction forgets bias or absolute epoch.
VERIFIED REPAIR
Preserve the declared coordinate and state contract at roundtrip: roundtrip = None if word is None else (word - 32768 + r['epoch']) * 1000000000 + fraction.
Unsuccessful approach: The partial correction still substitutes None if word is None else (word - 32768) * 1000000000 + fraction at the same fault site.
Case contract
A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.
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):
relative = r['total'] - r['epoch'] * 1000000000
seconds = relative // 1000000000
fraction = relative % 1000000000
in_range = -32768 <= seconds <= 32767
word = seconds + 32768 if in_range else None
low = (r['epoch'] - 32768) * 1000000000
high = (r['epoch'] + 32768) * 1000000000 - 1
clamped = min(high,max(low,r['total']))
lost = r['total'] - clamped
roundtrip = None if word is None else word * 1000000000 + fraction
return [word,fraction,in_range,clamped,lost,[low,high],roundtrip]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'total': 10000000000, 'epoch': 10}), [32768, 0, True, 10000000000, 0, [-32758000000000, 32777999999999], 10000000000])
check('fixture 2', solve({'total': 9999999999, 'epoch': 10}), [32767, 999999999, True, 9999999999, 0, [-32758000000000, 32777999999999], 9999999999])
check('fixture 3', solve({'total': -32758000000000, 'epoch': 10}), [0, 0, True, -32758000000000, 0, [-32758000000000, 32777999999999], -32758000000000])
check('fixture 4', solve({'total': -32758000000001, 'epoch': 10}), [None, 999999999, False, -32758000000000, -1, [-32758000000000, 32777999999999], None])
check('fixture 5', solve({'total': 32777999999999, 'epoch': 10}), [65535, 999999999, True, 32777999999999, 0, [-32758000000000, 32777999999999], 32777999999999])
check('fixture 6', solve({'total': 32778000000000, 'epoch': 10}), [None, 0, False, 32777999999999, 1, [-32758000000000, 32777999999999], None])
check('fixture 7', solve({'total': 32777000000000, 'epoch': 10}), [65535, 0, True, 32777000000000, 0, [-32758000000000, 32777999999999], 32777000000000])
check('fixture 8', solve({'total': 0, 'epoch': 10}), [32758, 0, True, 0, 0, [-32758000000000, 32777999999999], 0])
check('fixture 9', solve({'total': -1, 'epoch': 10}), [32757, 999999999, True, -1, 0, [-32758000000000, 32777999999999], -1])
check('fixture 10', solve({'total': 12345678901, 'epoch': 10}), [32770, 345678901, True, 12345678901, 0, [-32758000000000, 32777999999999], 12345678901])
variant = [({'total': 10000000001, 'epoch': 10}, [32768, 1, True, 10000000001, 0, [-32758000000000, 32777999999999], 10000000001]), ({'total': 10000000002, 'epoch': 10}, [32768, 2, True, 10000000002, 0, [-32758000000000, 32777999999999], 10000000002]), ({'total': 10000000003, 'epoch': 10}, [32768, 3, True, 10000000003, 0, [-32758000000000, 32777999999999], 10000000003]), ({'total': 10000000004, 'epoch': 10}, [32768, 4, True, 10000000004, 0, [-32758000000000, 32777999999999], 10000000004]), ({'total': 10000000005, 'epoch': 10}, [32768, 5, True, 10000000005, 0, [-32758000000000, 32777999999999], 10000000005])]
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 | [32768, 0, True, 10000000000, 0, [-32758000000000, 32777999999999], 32768000000000] | [32768, 0, True, 10000000000, 0, [-32758000000000, 32777999999999], 10000000000] | Failed |
| fixture 2 | [32767, 999999999, True, 9999999999, 0, [-32758000000000, 32777999999999], 32767999999999] | [32767, 999999999, True, 9999999999, 0, [-32758000000000, 32777999999999], 9999999999] | Failed |
| fixture 3 | [0, 0, True, -32758000000000, 0, [-32758000000000, 32777999999999], 0] | [0, 0, True, -32758000000000, 0, [-32758000000000, 32777999999999], -32758000000000] | Failed |
| fixture 4 | [None, 999999999, False, -32758000000000, -1, [-32758000000000, 32777999999999], None] | [None, 999999999, False, -32758000000000, -1, [-32758000000000, 32777999999999], None] | Passed |
| fixture 5 | [65535, 999999999, True, 32777999999999, 0, [-32758000000000, 32777999999999], 65535999999999] | [65535, 999999999, True, 32777999999999, 0, [-32758000000000, 32777999999999], 32777999999999] | Failed |
| fixture 6 | [None, 0, False, 32777999999999, 1, [-32758000000000, 32777999999999], None] | [None, 0, False, 32777999999999, 1, [-32758000000000, 32777999999999], None] | Passed |
| fixture 7 | [65535, 0, True, 32777000000000, 0, [-32758000000000, 32777999999999], 65535000000000] | [65535, 0, True, 32777000000000, 0, [-32758000000000, 32777999999999], 32777000000000] | Failed |
| fixture 8 | [32758, 0, True, 0, 0, [-32758000000000, 32777999999999], 32758000000000] | [32758, 0, True, 0, 0, [-32758000000000, 32777999999999], 0] | Failed |
| fixture 9 | [32757, 999999999, True, -1, 0, [-32758000000000, 32777999999999], 32757999999999] | [32757, 999999999, True, -1, 0, [-32758000000000, 32777999999999], -1] | Failed |
| fixture 10 | [32770, 345678901, True, 12345678901, 0, [-32758000000000, 32777999999999], 32770345678901] | [32770, 345678901, True, 12345678901, 0, [-32758000000000, 32777999999999], 12345678901] | Failed |
| variant capture | [32768, 1, True, 10000000001, 0, [-32758000000000, 32777999999999], 32768000000001] | [32768, 1, True, 10000000001, 0, [-32758000000000, 32777999999999], 10000000001] | Failed |
SHA-256 / ff7dc5174cdb3ad9934951d57531402692b0611e553e3709759db1a5e7d2f72d
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):
relative = r['total'] - r['epoch'] * 1000000000
seconds = relative // 1000000000
fraction = relative % 1000000000
in_range = -32768 <= seconds <= 32767
word = seconds + 32768 if in_range else None
low = (r['epoch'] - 32768) * 1000000000
high = (r['epoch'] + 32768) * 1000000000 - 1
clamped = min(high,max(low,r['total']))
lost = r['total'] - clamped
roundtrip = None if word is None else (word - 32768) * 1000000000 + fraction
return [word,fraction,in_range,clamped,lost,[low,high],roundtrip]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'total': 10000000000, 'epoch': 10}), [32768, 0, True, 10000000000, 0, [-32758000000000, 32777999999999], 10000000000])
check('fixture 2', solve({'total': 9999999999, 'epoch': 10}), [32767, 999999999, True, 9999999999, 0, [-32758000000000, 32777999999999], 9999999999])
check('fixture 3', solve({'total': -32758000000000, 'epoch': 10}), [0, 0, True, -32758000000000, 0, [-32758000000000, 32777999999999], -32758000000000])
check('fixture 4', solve({'total': -32758000000001, 'epoch': 10}), [None, 999999999, False, -32758000000000, -1, [-32758000000000, 32777999999999], None])
check('fixture 5', solve({'total': 32777999999999, 'epoch': 10}), [65535, 999999999, True, 32777999999999, 0, [-32758000000000, 32777999999999], 32777999999999])
check('fixture 6', solve({'total': 32778000000000, 'epoch': 10}), [None, 0, False, 32777999999999, 1, [-32758000000000, 32777999999999], None])
check('fixture 7', solve({'total': 32777000000000, 'epoch': 10}), [65535, 0, True, 32777000000000, 0, [-32758000000000, 32777999999999], 32777000000000])
check('fixture 8', solve({'total': 0, 'epoch': 10}), [32758, 0, True, 0, 0, [-32758000000000, 32777999999999], 0])
check('fixture 9', solve({'total': -1, 'epoch': 10}), [32757, 999999999, True, -1, 0, [-32758000000000, 32777999999999], -1])
check('fixture 10', solve({'total': 12345678901, 'epoch': 10}), [32770, 345678901, True, 12345678901, 0, [-32758000000000, 32777999999999], 12345678901])
variant = [({'total': 10000000001, 'epoch': 10}, [32768, 1, True, 10000000001, 0, [-32758000000000, 32777999999999], 10000000001]), ({'total': 10000000002, 'epoch': 10}, [32768, 2, True, 10000000002, 0, [-32758000000000, 32777999999999], 10000000002]), ({'total': 10000000003, 'epoch': 10}, [32768, 3, True, 10000000003, 0, [-32758000000000, 32777999999999], 10000000003]), ({'total': 10000000004, 'epoch': 10}, [32768, 4, True, 10000000004, 0, [-32758000000000, 32777999999999], 10000000004]), ({'total': 10000000005, 'epoch': 10}, [32768, 5, True, 10000000005, 0, [-32758000000000, 32777999999999], 10000000005])]
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 | [32768, 0, True, 10000000000, 0, [-32758000000000, 32777999999999], 0] | [32768, 0, True, 10000000000, 0, [-32758000000000, 32777999999999], 10000000000] | Failed |
| fixture 2 | [32767, 999999999, True, 9999999999, 0, [-32758000000000, 32777999999999], -1] | [32767, 999999999, True, 9999999999, 0, [-32758000000000, 32777999999999], 9999999999] | Failed |
| fixture 3 | [0, 0, True, -32758000000000, 0, [-32758000000000, 32777999999999], -32768000000000] | [0, 0, True, -32758000000000, 0, [-32758000000000, 32777999999999], -32758000000000] | Failed |
| fixture 4 | [None, 999999999, False, -32758000000000, -1, [-32758000000000, 32777999999999], None] | [None, 999999999, False, -32758000000000, -1, [-32758000000000, 32777999999999], None] | Passed |
| fixture 5 | [65535, 999999999, True, 32777999999999, 0, [-32758000000000, 32777999999999], 32767999999999] | [65535, 999999999, True, 32777999999999, 0, [-32758000000000, 32777999999999], 32777999999999] | Failed |
| fixture 6 | [None, 0, False, 32777999999999, 1, [-32758000000000, 32777999999999], None] | [None, 0, False, 32777999999999, 1, [-32758000000000, 32777999999999], None] | Passed |
| fixture 7 | [65535, 0, True, 32777000000000, 0, [-32758000000000, 32777999999999], 32767000000000] | [65535, 0, True, 32777000000000, 0, [-32758000000000, 32777999999999], 32777000000000] | Failed |
| fixture 8 | [32758, 0, True, 0, 0, [-32758000000000, 32777999999999], -10000000000] | [32758, 0, True, 0, 0, [-32758000000000, 32777999999999], 0] | Failed |
| fixture 9 | [32757, 999999999, True, -1, 0, [-32758000000000, 32777999999999], -10000000001] | [32757, 999999999, True, -1, 0, [-32758000000000, 32777999999999], -1] | Failed |
| fixture 10 | [32770, 345678901, True, 12345678901, 0, [-32758000000000, 32777999999999], 2345678901] | [32770, 345678901, True, 12345678901, 0, [-32758000000000, 32777999999999], 12345678901] | Failed |
| variant capture | [32768, 1, True, 10000000001, 0, [-32758000000000, 32777999999999], 1] | [32768, 1, True, 10000000001, 0, [-32758000000000, 32777999999999], 10000000001] | Failed |
SHA-256 / 04cb31572efdd1e3d00a38ace17be9abbb648b31bc2ef970ddd046710563a6e8
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):
relative = r['total'] - r['epoch'] * 1000000000
seconds = relative // 1000000000
fraction = relative % 1000000000
in_range = -32768 <= seconds <= 32767
word = seconds + 32768 if in_range else None
low = (r['epoch'] - 32768) * 1000000000
high = (r['epoch'] + 32768) * 1000000000 - 1
clamped = min(high,max(low,r['total']))
lost = r['total'] - clamped
roundtrip = None if word is None else (word - 32768 + r['epoch']) * 1000000000 + fraction
return [word,fraction,in_range,clamped,lost,[low,high],roundtrip]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'total': 10000000000, 'epoch': 10}), [32768, 0, True, 10000000000, 0, [-32758000000000, 32777999999999], 10000000000])
check('fixture 2', solve({'total': 9999999999, 'epoch': 10}), [32767, 999999999, True, 9999999999, 0, [-32758000000000, 32777999999999], 9999999999])
check('fixture 3', solve({'total': -32758000000000, 'epoch': 10}), [0, 0, True, -32758000000000, 0, [-32758000000000, 32777999999999], -32758000000000])
check('fixture 4', solve({'total': -32758000000001, 'epoch': 10}), [None, 999999999, False, -32758000000000, -1, [-32758000000000, 32777999999999], None])
check('fixture 5', solve({'total': 32777999999999, 'epoch': 10}), [65535, 999999999, True, 32777999999999, 0, [-32758000000000, 32777999999999], 32777999999999])
check('fixture 6', solve({'total': 32778000000000, 'epoch': 10}), [None, 0, False, 32777999999999, 1, [-32758000000000, 32777999999999], None])
check('fixture 7', solve({'total': 32777000000000, 'epoch': 10}), [65535, 0, True, 32777000000000, 0, [-32758000000000, 32777999999999], 32777000000000])
check('fixture 8', solve({'total': 0, 'epoch': 10}), [32758, 0, True, 0, 0, [-32758000000000, 32777999999999], 0])
check('fixture 9', solve({'total': -1, 'epoch': 10}), [32757, 999999999, True, -1, 0, [-32758000000000, 32777999999999], -1])
check('fixture 10', solve({'total': 12345678901, 'epoch': 10}), [32770, 345678901, True, 12345678901, 0, [-32758000000000, 32777999999999], 12345678901])
variant = [({'total': 10000000001, 'epoch': 10}, [32768, 1, True, 10000000001, 0, [-32758000000000, 32777999999999], 10000000001]), ({'total': 10000000002, 'epoch': 10}, [32768, 2, True, 10000000002, 0, [-32758000000000, 32777999999999], 10000000002]), ({'total': 10000000003, 'epoch': 10}, [32768, 3, True, 10000000003, 0, [-32758000000000, 32777999999999], 10000000003]), ({'total': 10000000004, 'epoch': 10}, [32768, 4, True, 10000000004, 0, [-32758000000000, 32777999999999], 10000000004]), ({'total': 10000000005, 'epoch': 10}, [32768, 5, True, 10000000005, 0, [-32758000000000, 32777999999999], 10000000005])]
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 | [32768, 0, True, 10000000000, 0, [-32758000000000, 32777999999999], 10000000000] | [32768, 0, True, 10000000000, 0, [-32758000000000, 32777999999999], 10000000000] | Passed |
| fixture 2 | [32767, 999999999, True, 9999999999, 0, [-32758000000000, 32777999999999], 9999999999] | [32767, 999999999, True, 9999999999, 0, [-32758000000000, 32777999999999], 9999999999] | Passed |
| fixture 3 | [0, 0, True, -32758000000000, 0, [-32758000000000, 32777999999999], -32758000000000] | [0, 0, True, -32758000000000, 0, [-32758000000000, 32777999999999], -32758000000000] | Passed |
| fixture 4 | [None, 999999999, False, -32758000000000, -1, [-32758000000000, 32777999999999], None] | [None, 999999999, False, -32758000000000, -1, [-32758000000000, 32777999999999], None] | Passed |
| fixture 5 | [65535, 999999999, True, 32777999999999, 0, [-32758000000000, 32777999999999], 32777999999999] | [65535, 999999999, True, 32777999999999, 0, [-32758000000000, 32777999999999], 32777999999999] | Passed |
| fixture 6 | [None, 0, False, 32777999999999, 1, [-32758000000000, 32777999999999], None] | [None, 0, False, 32777999999999, 1, [-32758000000000, 32777999999999], None] | Passed |
| fixture 7 | [65535, 0, True, 32777000000000, 0, [-32758000000000, 32777999999999], 32777000000000] | [65535, 0, True, 32777000000000, 0, [-32758000000000, 32777999999999], 32777000000000] | Passed |
| fixture 8 | [32758, 0, True, 0, 0, [-32758000000000, 32777999999999], 0] | [32758, 0, True, 0, 0, [-32758000000000, 32777999999999], 0] | Passed |
| fixture 9 | [32757, 999999999, True, -1, 0, [-32758000000000, 32777999999999], -1] | [32757, 999999999, True, -1, 0, [-32758000000000, 32777999999999], -1] | Passed |
| fixture 10 | [32770, 345678901, True, 12345678901, 0, [-32758000000000, 32777999999999], 12345678901] | [32770, 345678901, True, 12345678901, 0, [-32758000000000, 32777999999999], 12345678901] | Passed |
| variant capture | [32768, 1, True, 10000000001, 0, [-32758000000000, 32777999999999], 10000000001] | [32768, 1, True, 10000000001, 0, [-32758000000000, 32777999999999], 10000000001] | Passed |
SHA-256 / b0d35299e4e9ffeea7edf1e5efe9ca9f741bd0e18617a455fdc1c64ce5539a88
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:56.998765+00:00.
Case digest / e4889e02fb7e4dd38b6ece39e0b60fac1c95cf2d0e99151e349dfc2dcc33b150