FA-17866 / Time representation / Open access
Whole timestamp accepts Unicode digit forms or embedded spaces · case 01
The decoded time state disagrees with the explicit regression oracle for whole_valid.
ROOT CAUSE
Whole timestamp accepts Unicode digit forms or embedded spaces.
VERIFIED REPAIR
Preserve the declared coordinate and state contract at whole_valid: whole_valid = len(whole) > 0 and all('0' <= c <= '9' for c in whole).
Unsuccessful approach: The partial correction still substitutes len(whole) > 0 and whole.isdecimal() at the same fault site.
Case contract
Parse exact ASCII signed decimal epoch seconds: optional one leading minus, nonempty whole digits, optional dot plus one to three fractional digits. Reject whitespace, plus, comma, exponent, empty fraction, non-ASCII digits and excess precision. Return validity, exact signed milliseconds or None, and negative-zero lexical marker. No floating point is used.
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):
negative = r['text'].startswith('-')
payload = r['text'][1:] if negative else r['text']
parts = payload.split('.')
whole = parts[0]
fraction = parts[1] if len(parts) == 2 else ''
whole_valid = len(whole) > 0 and whole.isdigit()
fraction_valid = len(parts) == 1 or (len(parts) == 2 and 1 <= len(fraction) <= 3 and all('0' <= c <= '9' for c in fraction))
valid = whole_valid and fraction_valid and len(parts) <= 2
magnitude = int(whole) * 1000 + int(fraction.ljust(3,'0')) if valid else None
milliseconds = (-magnitude if negative else magnitude) if valid else None
return [valid,milliseconds,valid and negative and magnitude == 0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'text': '1.2', 'probe': 1}), [True, 1200, False])
check('fixture 2', solve({'text': '-0.125', 'probe': 1}), [True, -125, False])
check('fixture 3', solve({'text': '12', 'probe': 1}), [True, 12000, False])
check('fixture 4', solve({'text': '-1.2', 'probe': 1}), [True, -1200, False])
check('fixture 5', solve({'text': '0', 'probe': 1}), [True, 0, False])
check('fixture 6', solve({'text': '-0.000', 'probe': 1}), [True, 0, True])
check('fixture 7', solve({'text': '1.', 'probe': 1}), [False, None, False])
check('fixture 8', solve({'text': '--1', 'probe': 1}), [False, None, False])
check('fixture 9', solve({'text': '+1', 'probe': 1}), [False, None, False])
check('fixture 10', solve({'text': ' 1', 'probe': 1}), [False, None, False])
check('fixture 11', solve({'text': '1,2', 'probe': 1}), [False, None, False])
check('fixture 12', solve({'text': '1.2.3', 'probe': 1}), [False, None, False])
check('fixture 13', solve({'text': '.2', 'probe': 1}), [False, None, False])
check('fixture 14', solve({'text': '1.2300', 'probe': 1}), [False, None, False])
check('fixture 15', solve({'text': '١', 'probe': 1}), [False, None, False])
check('fixture 16', solve({'text': '1.٢', 'probe': 1}), [False, None, False])
check('fixture 17', solve({'text': '1 2', 'probe': 1}), [False, None, False])
check('fixture 18', solve({'text': '2.000', 'probe': 1}), [True, 2000, False])
check('fixture 19', solve({'text': '0.12', 'probe': 1}), [True, 120, False])
variant = [({'text': '1.125', 'probe': 1}, [True, 1125, False]), ({'text': '2.125', 'probe': 1}, [True, 2125, False]), ({'text': '3.125', 'probe': 1}, [True, 3125, False]), ({'text': '4.125', 'probe': 1}, [True, 4125, False]), ({'text': '5.125', 'probe': 1}, [True, 5125, False])]
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, 1200, False] | [True, 1200, False] | Passed |
| fixture 2 | [True, -125, False] | [True, -125, False] | Passed |
| fixture 3 | [True, 12000, False] | [True, 12000, False] | Passed |
| fixture 4 | [True, -1200, False] | [True, -1200, False] | Passed |
| fixture 5 | [True, 0, False] | [True, 0, False] | Passed |
| fixture 6 | [True, 0, True] | [True, 0, True] | Passed |
| fixture 7 | [False, None, False] | [False, None, False] | Passed |
| fixture 8 | [False, None, False] | [False, None, False] | Passed |
| fixture 9 | [False, None, False] | [False, None, False] | Passed |
| fixture 10 | [False, None, False] | [False, None, False] | Passed |
| fixture 11 | [False, None, False] | [False, None, False] | Passed |
| fixture 12 | [False, None, False] | [False, None, False] | Passed |
| fixture 13 | [False, None, False] | [False, None, False] | Passed |
| fixture 14 | [False, None, False] | [False, None, False] | Passed |
| fixture 15 | [True, 1000, False] | [False, None, False] | Failed |
| fixture 16 | [False, None, False] | [False, None, False] | Passed |
| fixture 17 | [False, None, False] | [False, None, False] | Passed |
| fixture 18 | [True, 2000, False] | [True, 2000, False] | Passed |
| fixture 19 | [True, 120, False] | [True, 120, False] | Passed |
| variant capture | [True, 1125, False] | [True, 1125, False] | Passed |
SHA-256 / d9ca9bc978c7d6dc276c072a6b2596270be980ed5391f1553a6194f8d6beb302
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):
negative = r['text'].startswith('-')
payload = r['text'][1:] if negative else r['text']
parts = payload.split('.')
whole = parts[0]
fraction = parts[1] if len(parts) == 2 else ''
whole_valid = len(whole) > 0 and whole.isdecimal()
fraction_valid = len(parts) == 1 or (len(parts) == 2 and 1 <= len(fraction) <= 3 and all('0' <= c <= '9' for c in fraction))
valid = whole_valid and fraction_valid and len(parts) <= 2
magnitude = int(whole) * 1000 + int(fraction.ljust(3,'0')) if valid else None
milliseconds = (-magnitude if negative else magnitude) if valid else None
return [valid,milliseconds,valid and negative and magnitude == 0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'text': '1.2', 'probe': 1}), [True, 1200, False])
check('fixture 2', solve({'text': '-0.125', 'probe': 1}), [True, -125, False])
check('fixture 3', solve({'text': '12', 'probe': 1}), [True, 12000, False])
check('fixture 4', solve({'text': '-1.2', 'probe': 1}), [True, -1200, False])
check('fixture 5', solve({'text': '0', 'probe': 1}), [True, 0, False])
check('fixture 6', solve({'text': '-0.000', 'probe': 1}), [True, 0, True])
check('fixture 7', solve({'text': '1.', 'probe': 1}), [False, None, False])
check('fixture 8', solve({'text': '--1', 'probe': 1}), [False, None, False])
check('fixture 9', solve({'text': '+1', 'probe': 1}), [False, None, False])
check('fixture 10', solve({'text': ' 1', 'probe': 1}), [False, None, False])
check('fixture 11', solve({'text': '1,2', 'probe': 1}), [False, None, False])
check('fixture 12', solve({'text': '1.2.3', 'probe': 1}), [False, None, False])
check('fixture 13', solve({'text': '.2', 'probe': 1}), [False, None, False])
check('fixture 14', solve({'text': '1.2300', 'probe': 1}), [False, None, False])
check('fixture 15', solve({'text': '١', 'probe': 1}), [False, None, False])
check('fixture 16', solve({'text': '1.٢', 'probe': 1}), [False, None, False])
check('fixture 17', solve({'text': '1 2', 'probe': 1}), [False, None, False])
check('fixture 18', solve({'text': '2.000', 'probe': 1}), [True, 2000, False])
check('fixture 19', solve({'text': '0.12', 'probe': 1}), [True, 120, False])
variant = [({'text': '1.125', 'probe': 1}, [True, 1125, False]), ({'text': '2.125', 'probe': 1}, [True, 2125, False]), ({'text': '3.125', 'probe': 1}, [True, 3125, False]), ({'text': '4.125', 'probe': 1}, [True, 4125, False]), ({'text': '5.125', 'probe': 1}, [True, 5125, False])]
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, 1200, False] | [True, 1200, False] | Passed |
| fixture 2 | [True, -125, False] | [True, -125, False] | Passed |
| fixture 3 | [True, 12000, False] | [True, 12000, False] | Passed |
| fixture 4 | [True, -1200, False] | [True, -1200, False] | Passed |
| fixture 5 | [True, 0, False] | [True, 0, False] | Passed |
| fixture 6 | [True, 0, True] | [True, 0, True] | Passed |
| fixture 7 | [False, None, False] | [False, None, False] | Passed |
| fixture 8 | [False, None, False] | [False, None, False] | Passed |
| fixture 9 | [False, None, False] | [False, None, False] | Passed |
| fixture 10 | [False, None, False] | [False, None, False] | Passed |
| fixture 11 | [False, None, False] | [False, None, False] | Passed |
| fixture 12 | [False, None, False] | [False, None, False] | Passed |
| fixture 13 | [False, None, False] | [False, None, False] | Passed |
| fixture 14 | [False, None, False] | [False, None, False] | Passed |
| fixture 15 | [True, 1000, False] | [False, None, False] | Failed |
| fixture 16 | [False, None, False] | [False, None, False] | Passed |
| fixture 17 | [False, None, False] | [False, None, False] | Passed |
| fixture 18 | [True, 2000, False] | [True, 2000, False] | Passed |
| fixture 19 | [True, 120, False] | [True, 120, False] | Passed |
| variant capture | [True, 1125, False] | [True, 1125, False] | Passed |
SHA-256 / 4e2b0de221f3865fe61f836ae2919dd306be673fb8e1f773af08b3a2e610083d
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):
negative = r['text'].startswith('-')
payload = r['text'][1:] if negative else r['text']
parts = payload.split('.')
whole = parts[0]
fraction = parts[1] if len(parts) == 2 else ''
whole_valid = len(whole) > 0 and all('0' <= c <= '9' for c in whole)
fraction_valid = len(parts) == 1 or (len(parts) == 2 and 1 <= len(fraction) <= 3 and all('0' <= c <= '9' for c in fraction))
valid = whole_valid and fraction_valid and len(parts) <= 2
magnitude = int(whole) * 1000 + int(fraction.ljust(3,'0')) if valid else None
milliseconds = (-magnitude if negative else magnitude) if valid else None
return [valid,milliseconds,valid and negative and magnitude == 0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'text': '1.2', 'probe': 1}), [True, 1200, False])
check('fixture 2', solve({'text': '-0.125', 'probe': 1}), [True, -125, False])
check('fixture 3', solve({'text': '12', 'probe': 1}), [True, 12000, False])
check('fixture 4', solve({'text': '-1.2', 'probe': 1}), [True, -1200, False])
check('fixture 5', solve({'text': '0', 'probe': 1}), [True, 0, False])
check('fixture 6', solve({'text': '-0.000', 'probe': 1}), [True, 0, True])
check('fixture 7', solve({'text': '1.', 'probe': 1}), [False, None, False])
check('fixture 8', solve({'text': '--1', 'probe': 1}), [False, None, False])
check('fixture 9', solve({'text': '+1', 'probe': 1}), [False, None, False])
check('fixture 10', solve({'text': ' 1', 'probe': 1}), [False, None, False])
check('fixture 11', solve({'text': '1,2', 'probe': 1}), [False, None, False])
check('fixture 12', solve({'text': '1.2.3', 'probe': 1}), [False, None, False])
check('fixture 13', solve({'text': '.2', 'probe': 1}), [False, None, False])
check('fixture 14', solve({'text': '1.2300', 'probe': 1}), [False, None, False])
check('fixture 15', solve({'text': '١', 'probe': 1}), [False, None, False])
check('fixture 16', solve({'text': '1.٢', 'probe': 1}), [False, None, False])
check('fixture 17', solve({'text': '1 2', 'probe': 1}), [False, None, False])
check('fixture 18', solve({'text': '2.000', 'probe': 1}), [True, 2000, False])
check('fixture 19', solve({'text': '0.12', 'probe': 1}), [True, 120, False])
variant = [({'text': '1.125', 'probe': 1}, [True, 1125, False]), ({'text': '2.125', 'probe': 1}, [True, 2125, False]), ({'text': '3.125', 'probe': 1}, [True, 3125, False]), ({'text': '4.125', 'probe': 1}, [True, 4125, False]), ({'text': '5.125', 'probe': 1}, [True, 5125, False])]
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, 1200, False] | [True, 1200, False] | Passed |
| fixture 2 | [True, -125, False] | [True, -125, False] | Passed |
| fixture 3 | [True, 12000, False] | [True, 12000, False] | Passed |
| fixture 4 | [True, -1200, False] | [True, -1200, False] | Passed |
| fixture 5 | [True, 0, False] | [True, 0, False] | Passed |
| fixture 6 | [True, 0, True] | [True, 0, True] | Passed |
| fixture 7 | [False, None, False] | [False, None, False] | Passed |
| fixture 8 | [False, None, False] | [False, None, False] | Passed |
| fixture 9 | [False, None, False] | [False, None, False] | Passed |
| fixture 10 | [False, None, False] | [False, None, False] | Passed |
| fixture 11 | [False, None, False] | [False, None, False] | Passed |
| fixture 12 | [False, None, False] | [False, None, False] | Passed |
| fixture 13 | [False, None, False] | [False, None, False] | Passed |
| fixture 14 | [False, None, False] | [False, None, False] | Passed |
| fixture 15 | [False, None, False] | [False, None, False] | Passed |
| fixture 16 | [False, None, False] | [False, None, False] | Passed |
| fixture 17 | [False, None, False] | [False, None, False] | Passed |
| fixture 18 | [True, 2000, False] | [True, 2000, False] | Passed |
| fixture 19 | [True, 120, False] | [True, 120, False] | Passed |
| variant capture | [True, 1125, False] | [True, 1125, False] | Passed |
SHA-256 / 2652b1961708d152f94609d633750c75f6b8cb25bc3659504141e9959ed2cc0a
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:51.717310+00:00.
Case digest / d8eab3b0e31a2a6baa42f73c2194ca5ca2d5999564409242f1fbbc09c50e6e54