FAILURE MAP
← Case archive

FA-18641 / Time representation / Open access

Era anchor truncates negative eras or uses maximum label as period · case 01

The decoded time state disagrees with the explicit regression oracle for base_era.

Verified by executionVariant 1 · 18 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Era anchor truncates negative eras or uses maximum label as period.

VERIFIED REPAIR

Preserve the declared coordinate and state contract at base_era: base_era = r['reference'] // 1024.

Unsuccessful approach: The partial correction still substitutes r['reference'] // 1023 at the same fault site.

Case contract

Controlled week counter has 1024-week eras. A received low week 0..1023 and tick-within-week 0..99 must resolve near trusted absolute reference week, considering neighboring eras. Pick minimum absolute week distance; ties are ambiguous and rejected. Also require distance within trust radius. Report accepted absolute week/tick plus ambiguity, distance and selected era. No GNSS standards compliance is claimed. A nonnegative reference uncertainty invalidates selection if nearest distance plus uncertainty reaches the 512-week half-era boundary.

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):
    base_era = int(Fraction(r['reference'],1024))
    candidates = [(base_era + k) * 1024 + r['week'] for k in (-1,0,1)]
    distances = [abs(x-r['reference']) for x in candidates]
    nearest = min(distances)
    winners = [x for x,d in zip(candidates,distances) if d == nearest]
    ambiguous = len(winners) != 1 or (r['reference_uncertainty'] > 0 and nearest + r['reference_uncertainty'] >= 512)
    valid_fields = 0 <= r['week'] < 1024 and 0 <= r['tick'] < 100
    trusted = nearest <= r['radius']
    chosen = winners[0] if not ambiguous and valid_fields and trusted else None
    absolute_tick = None if chosen is None else chosen * 100 + r['tick']
    return [chosen,absolute_tick,ambiguous,nearest,None if chosen is None else chosen//1024]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reference': 1023, 'week': 0, 'tick': 1, 'radius': 2, 'reference_uncertainty': 0}), [1024, 102401, False, 1, 1])
check('fixture 2', solve({'reference': 1024, 'week': 1023, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}), [1023, 102302, False, 1, 0])
check('fixture 3', solve({'reference': 512, 'week': 0, 'tick': 5, 'radius': 600, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 4', solve({'reference': 0, 'week': 512, 'tick': 1, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 5', solve({'reference': -1, 'week': 0, 'tick': 1, 'radius': 1, 'reference_uncertainty': 0}), [0, 1, False, 1, 0])
check('fixture 6', solve({'reference': -1025, 'week': 1023, 'tick': 2, 'radius': 1, 'reference_uncertainty': 0}), [-1025, -102498, False, 0, -2])
check('fixture 7', solve({'reference': 100, 'week': 100, 'tick': 99, 'radius': 0, 'reference_uncertainty': 0}), [100, 10099, False, 0, 0])
check('fixture 8', solve({'reference': 100, 'week': 100, 'tick': 100, 'radius': 1, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 9', solve({'reference': 1024, 'week': 1024, 'tick': 0, 'radius': 1024, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 10', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 99, 'reference_uncertainty': 0}), [None, None, False, 100, None])
check('fixture 11', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 100, 'reference_uncertainty': 0}), [200, 20001, False, 100, 0])
check('fixture 12', solve({'reference': 3072, 'week': 1, 'tick': 2, 'radius': 10, 'reference_uncertainty': 0}), [3073, 307302, False, 1, 3])
check('fixture 13', solve({'reference': -513, 'week': 1023, 'tick': 0, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 14', solve({'reference': 5120000, 'week': 0, 'tick': 0, 'radius': 1, 'reference_uncertainty': 0}), [5120000, 512000000, False, 0, 5000])
check('fixture 15', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 411}), [200, 20001, False, 100, 0])
check('fixture 16', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 412}), [None, None, True, 100, None])
check('fixture 17', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 500}), [None, None, True, 100, None])
variant = [({'reference': 1023, 'week': 0, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102402, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 3, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102403, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 4, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102404, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 5, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102405, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 6, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102406, False, 1, 1])]
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 fixtureActualExpectedOutcome
fixture 1[1024, 102401, False, 1, 1][1024, 102401, False, 1, 1]Passed
fixture 2[1023, 102302, False, 1, 0][1023, 102302, False, 1, 0]Passed
fixture 3[None, None, True, 512, None][None, None, True, 512, None]Passed
fixture 4[None, None, True, 512, None][None, None, True, 512, None]Passed
fixture 5[0, 1, False, 1, 0][0, 1, False, 1, 0]Passed
fixture 6[-1025, -102498, False, 0, -2][-1025, -102498, False, 0, -2]Passed
fixture 7[100, 10099, False, 0, 0][100, 10099, False, 0, 0]Passed
fixture 8[None, None, False, 0, None][None, None, False, 0, None]Passed
fixture 9[None, None, False, 0, None][None, None, False, 0, None]Passed
fixture 10[None, None, False, 100, None][None, None, False, 100, None]Passed
fixture 11[200, 20001, False, 100, 0][200, 20001, False, 100, 0]Passed
fixture 12[3073, 307302, False, 1, 3][3073, 307302, False, 1, 3]Passed
fixture 13[-1, -100, False, 512, -1][None, None, True, 512, None]Failed
fixture 14[5120000, 512000000, False, 0, 5000][5120000, 512000000, False, 0, 5000]Passed
fixture 15[200, 20001, False, 100, 0][200, 20001, False, 100, 0]Passed
fixture 16[None, None, True, 100, None][None, None, True, 100, None]Passed
fixture 17[None, None, True, 100, None][None, None, True, 100, None]Passed
variant capture[1024, 102402, False, 1, 1][1024, 102402, False, 1, 1]Passed

SHA-256 / d206c72c3fbe14720ebba913f447b870dbcd0e916fcb4530154f03f444f39008

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):
    base_era = r['reference'] // 1023
    candidates = [(base_era + k) * 1024 + r['week'] for k in (-1,0,1)]
    distances = [abs(x-r['reference']) for x in candidates]
    nearest = min(distances)
    winners = [x for x,d in zip(candidates,distances) if d == nearest]
    ambiguous = len(winners) != 1 or (r['reference_uncertainty'] > 0 and nearest + r['reference_uncertainty'] >= 512)
    valid_fields = 0 <= r['week'] < 1024 and 0 <= r['tick'] < 100
    trusted = nearest <= r['radius']
    chosen = winners[0] if not ambiguous and valid_fields and trusted else None
    absolute_tick = None if chosen is None else chosen * 100 + r['tick']
    return [chosen,absolute_tick,ambiguous,nearest,None if chosen is None else chosen//1024]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reference': 1023, 'week': 0, 'tick': 1, 'radius': 2, 'reference_uncertainty': 0}), [1024, 102401, False, 1, 1])
check('fixture 2', solve({'reference': 1024, 'week': 1023, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}), [1023, 102302, False, 1, 0])
check('fixture 3', solve({'reference': 512, 'week': 0, 'tick': 5, 'radius': 600, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 4', solve({'reference': 0, 'week': 512, 'tick': 1, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 5', solve({'reference': -1, 'week': 0, 'tick': 1, 'radius': 1, 'reference_uncertainty': 0}), [0, 1, False, 1, 0])
check('fixture 6', solve({'reference': -1025, 'week': 1023, 'tick': 2, 'radius': 1, 'reference_uncertainty': 0}), [-1025, -102498, False, 0, -2])
check('fixture 7', solve({'reference': 100, 'week': 100, 'tick': 99, 'radius': 0, 'reference_uncertainty': 0}), [100, 10099, False, 0, 0])
check('fixture 8', solve({'reference': 100, 'week': 100, 'tick': 100, 'radius': 1, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 9', solve({'reference': 1024, 'week': 1024, 'tick': 0, 'radius': 1024, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 10', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 99, 'reference_uncertainty': 0}), [None, None, False, 100, None])
check('fixture 11', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 100, 'reference_uncertainty': 0}), [200, 20001, False, 100, 0])
check('fixture 12', solve({'reference': 3072, 'week': 1, 'tick': 2, 'radius': 10, 'reference_uncertainty': 0}), [3073, 307302, False, 1, 3])
check('fixture 13', solve({'reference': -513, 'week': 1023, 'tick': 0, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 14', solve({'reference': 5120000, 'week': 0, 'tick': 0, 'radius': 1, 'reference_uncertainty': 0}), [5120000, 512000000, False, 0, 5000])
check('fixture 15', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 411}), [200, 20001, False, 100, 0])
check('fixture 16', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 412}), [None, None, True, 100, None])
check('fixture 17', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 500}), [None, None, True, 100, None])
variant = [({'reference': 1023, 'week': 0, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102402, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 3, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102403, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 4, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102404, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 5, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102405, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 6, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102406, False, 1, 1])]
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 fixtureActualExpectedOutcome
fixture 1[1024, 102401, False, 1, 1][1024, 102401, False, 1, 1]Passed
fixture 2[1023, 102302, False, 1, 0][1023, 102302, False, 1, 0]Passed
fixture 3[None, None, True, 512, None][None, None, True, 512, None]Passed
fixture 4[None, None, True, 512, None][None, None, True, 512, None]Passed
fixture 5[0, 1, False, 1, 0][0, 1, False, 1, 0]Passed
fixture 6[-1025, -102498, False, 0, -2][-1025, -102498, False, 0, -2]Passed
fixture 7[100, 10099, False, 0, 0][100, 10099, False, 0, 0]Passed
fixture 8[None, None, False, 0, None][None, None, False, 0, None]Passed
fixture 9[None, None, False, 0, None][None, None, False, 0, None]Passed
fixture 10[None, None, False, 100, None][None, None, False, 100, None]Passed
fixture 11[200, 20001, False, 100, 0][200, 20001, False, 100, 0]Passed
fixture 12[3073, 307302, False, 1, 3][3073, 307302, False, 1, 3]Passed
fixture 13[None, None, True, 512, None][None, None, True, 512, None]Passed
fixture 14[None, None, False, 3072, None][5120000, 512000000, False, 0, 5000]Failed
fixture 15[200, 20001, False, 100, 0][200, 20001, False, 100, 0]Passed
fixture 16[None, None, True, 100, None][None, None, True, 100, None]Passed
fixture 17[None, None, True, 100, None][None, None, True, 100, None]Passed
variant capture[1024, 102402, False, 1, 1][1024, 102402, False, 1, 1]Passed

SHA-256 / 0f7c1f5ff3774ebcb0af9628e85ecbbc7528b8e7bf1d1fdbdac33d676d41ed39

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):
    base_era = r['reference'] // 1024
    candidates = [(base_era + k) * 1024 + r['week'] for k in (-1,0,1)]
    distances = [abs(x-r['reference']) for x in candidates]
    nearest = min(distances)
    winners = [x for x,d in zip(candidates,distances) if d == nearest]
    ambiguous = len(winners) != 1 or (r['reference_uncertainty'] > 0 and nearest + r['reference_uncertainty'] >= 512)
    valid_fields = 0 <= r['week'] < 1024 and 0 <= r['tick'] < 100
    trusted = nearest <= r['radius']
    chosen = winners[0] if not ambiguous and valid_fields and trusted else None
    absolute_tick = None if chosen is None else chosen * 100 + r['tick']
    return [chosen,absolute_tick,ambiguous,nearest,None if chosen is None else chosen//1024]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reference': 1023, 'week': 0, 'tick': 1, 'radius': 2, 'reference_uncertainty': 0}), [1024, 102401, False, 1, 1])
check('fixture 2', solve({'reference': 1024, 'week': 1023, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}), [1023, 102302, False, 1, 0])
check('fixture 3', solve({'reference': 512, 'week': 0, 'tick': 5, 'radius': 600, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 4', solve({'reference': 0, 'week': 512, 'tick': 1, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 5', solve({'reference': -1, 'week': 0, 'tick': 1, 'radius': 1, 'reference_uncertainty': 0}), [0, 1, False, 1, 0])
check('fixture 6', solve({'reference': -1025, 'week': 1023, 'tick': 2, 'radius': 1, 'reference_uncertainty': 0}), [-1025, -102498, False, 0, -2])
check('fixture 7', solve({'reference': 100, 'week': 100, 'tick': 99, 'radius': 0, 'reference_uncertainty': 0}), [100, 10099, False, 0, 0])
check('fixture 8', solve({'reference': 100, 'week': 100, 'tick': 100, 'radius': 1, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 9', solve({'reference': 1024, 'week': 1024, 'tick': 0, 'radius': 1024, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 10', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 99, 'reference_uncertainty': 0}), [None, None, False, 100, None])
check('fixture 11', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 100, 'reference_uncertainty': 0}), [200, 20001, False, 100, 0])
check('fixture 12', solve({'reference': 3072, 'week': 1, 'tick': 2, 'radius': 10, 'reference_uncertainty': 0}), [3073, 307302, False, 1, 3])
check('fixture 13', solve({'reference': -513, 'week': 1023, 'tick': 0, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 14', solve({'reference': 5120000, 'week': 0, 'tick': 0, 'radius': 1, 'reference_uncertainty': 0}), [5120000, 512000000, False, 0, 5000])
check('fixture 15', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 411}), [200, 20001, False, 100, 0])
check('fixture 16', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 412}), [None, None, True, 100, None])
check('fixture 17', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 500}), [None, None, True, 100, None])
variant = [({'reference': 1023, 'week': 0, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102402, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 3, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102403, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 4, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102404, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 5, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102405, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 6, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102406, False, 1, 1])]
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 fixtureActualExpectedOutcome
fixture 1[1024, 102401, False, 1, 1][1024, 102401, False, 1, 1]Passed
fixture 2[1023, 102302, False, 1, 0][1023, 102302, False, 1, 0]Passed
fixture 3[None, None, True, 512, None][None, None, True, 512, None]Passed
fixture 4[None, None, True, 512, None][None, None, True, 512, None]Passed
fixture 5[0, 1, False, 1, 0][0, 1, False, 1, 0]Passed
fixture 6[-1025, -102498, False, 0, -2][-1025, -102498, False, 0, -2]Passed
fixture 7[100, 10099, False, 0, 0][100, 10099, False, 0, 0]Passed
fixture 8[None, None, False, 0, None][None, None, False, 0, None]Passed
fixture 9[None, None, False, 0, None][None, None, False, 0, None]Passed
fixture 10[None, None, False, 100, None][None, None, False, 100, None]Passed
fixture 11[200, 20001, False, 100, 0][200, 20001, False, 100, 0]Passed
fixture 12[3073, 307302, False, 1, 3][3073, 307302, False, 1, 3]Passed
fixture 13[None, None, True, 512, None][None, None, True, 512, None]Passed
fixture 14[5120000, 512000000, False, 0, 5000][5120000, 512000000, False, 0, 5000]Passed
fixture 15[200, 20001, False, 100, 0][200, 20001, False, 100, 0]Passed
fixture 16[None, None, True, 100, None][None, None, True, 100, None]Passed
fixture 17[None, None, True, 100, None][None, None, True, 100, None]Passed
variant capture[1024, 102402, False, 1, 1][1024, 102402, False, 1, 1]Passed

SHA-256 / e852cdb04c78fb5ac7be83d5d2028d4a79be87046978a924b1bd4267e9d1a089

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:59.658200+00:00.

Case digest / 089e16006f3b88beaa1eeab531fb86bf3eaa535113774ded684b21eed52c22d9