FAILURE MAP
← Case archive

FA-17661 / Time representation / Open access

Fold enumeration discards the second branch or keeps invalid branches · case 01

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

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

ROOT CAUSE

Fold enumeration discards the second branch or keeps invalid branches.

VERIFIED REPAIR

Preserve the declared coordinate and state contract at candidates: candidates = sorted(set(([old_candidate] if old_valid else []) + ([new_candidate] if new_valid else []))).

Unsuccessful approach: The partial correction still substitutes sorted(set([old_candidate,new_candidate])) at the same fault site.

Case contract

A stipulated backward offset transition at UTC T changes larger old offset to smaller new offset. Candidate UTC coordinates local-offset are admitted on their owning sides (<T old, >=T new). Return sorted unique candidates, ambiguity flag, selected instant under earlier/later/reject policy, selected offset and civil roundtrip. No timezone database is modeled.

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):
    old_candidate = r['local'] - r['old']
    new_candidate = r['local'] - r['new']
    old_valid = old_candidate < r['transition']
    new_valid = new_candidate >= r['transition']
    candidates = [old_candidate] if old_valid else [new_candidate]
    count = len(candidates)
    ambiguous = count == 2
    chosen = None if count == 0 or (ambiguous and r['policy'] == 'reject') else candidates[-1 if r['policy'] == 'later' else 0]
    offset = None if chosen is None else (r['old'] if chosen < r['transition'] else r['new'])
    roundtrip = None if chosen is None else chosen + offset
    return [candidates,ambiguous,chosen,offset,roundtrip]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[89], False, 89, 20, 109])
check('fixture 2', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[90, 100], True, 90, 20, 110])
check('fixture 3', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[90, 100], True, 100, 10, 110])
check('fixture 4', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[90, 100], True, None, None, None])
check('fixture 5', solve({'local': 119, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[99, 109], True, 109, 10, 119])
check('fixture 6', solve({'local': 120, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[110], False, 110, 10, 120])
check('fixture 7', solve({'local': 100, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[80], False, 80, 20, 100])
check('fixture 8', solve({'local': 130, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[120], False, 120, 10, 130])
check('fixture 9', solve({'local': -20, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[-40], False, -40, 20, -20])
check('fixture 10', solve({'local': 115, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[95, 105], True, 105, 10, 115])
variant = [({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[90, 100], True, 90, 20, 110]), ({'local': 111, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[91, 101], True, 91, 20, 111]), ({'local': 112, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[92, 102], True, 92, 20, 112]), ({'local': 113, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[93, 103], True, 93, 20, 113]), ({'local': 114, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[94, 104], True, 94, 20, 114])]
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[[89], False, 89, 20, 109][[89], False, 89, 20, 109]Passed
fixture 2[[90], False, 90, 20, 110][[90, 100], True, 90, 20, 110]Failed
fixture 3[[90], False, 90, 20, 110][[90, 100], True, 100, 10, 110]Failed
fixture 4[[90], False, 90, 20, 110][[90, 100], True, None, None, None]Failed
fixture 5[[99], False, 99, 20, 119][[99, 109], True, 109, 10, 119]Failed
fixture 6[[110], False, 110, 10, 120][[110], False, 110, 10, 120]Passed
fixture 7[[80], False, 80, 20, 100][[80], False, 80, 20, 100]Passed
fixture 8[[120], False, 120, 10, 130][[120], False, 120, 10, 130]Passed
fixture 9[[-40], False, -40, 20, -20][[-40], False, -40, 20, -20]Passed
fixture 10[[95], False, 95, 20, 115][[95, 105], True, 105, 10, 115]Failed
variant capture[[90], False, 90, 20, 110][[90, 100], True, 90, 20, 110]Failed

SHA-256 / 3b3753b2c8408f38509b44430b34bbebd82a340088345b0916dd0905610169b0

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):
    old_candidate = r['local'] - r['old']
    new_candidate = r['local'] - r['new']
    old_valid = old_candidate < r['transition']
    new_valid = new_candidate >= r['transition']
    candidates = sorted(set([old_candidate,new_candidate]))
    count = len(candidates)
    ambiguous = count == 2
    chosen = None if count == 0 or (ambiguous and r['policy'] == 'reject') else candidates[-1 if r['policy'] == 'later' else 0]
    offset = None if chosen is None else (r['old'] if chosen < r['transition'] else r['new'])
    roundtrip = None if chosen is None else chosen + offset
    return [candidates,ambiguous,chosen,offset,roundtrip]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[89], False, 89, 20, 109])
check('fixture 2', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[90, 100], True, 90, 20, 110])
check('fixture 3', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[90, 100], True, 100, 10, 110])
check('fixture 4', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[90, 100], True, None, None, None])
check('fixture 5', solve({'local': 119, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[99, 109], True, 109, 10, 119])
check('fixture 6', solve({'local': 120, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[110], False, 110, 10, 120])
check('fixture 7', solve({'local': 100, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[80], False, 80, 20, 100])
check('fixture 8', solve({'local': 130, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[120], False, 120, 10, 130])
check('fixture 9', solve({'local': -20, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[-40], False, -40, 20, -20])
check('fixture 10', solve({'local': 115, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[95, 105], True, 105, 10, 115])
variant = [({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[90, 100], True, 90, 20, 110]), ({'local': 111, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[91, 101], True, 91, 20, 111]), ({'local': 112, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[92, 102], True, 92, 20, 112]), ({'local': 113, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[93, 103], True, 93, 20, 113]), ({'local': 114, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[94, 104], True, 94, 20, 114])]
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[[89, 99], True, 89, 20, 109][[89], False, 89, 20, 109]Failed
fixture 2[[90, 100], True, 90, 20, 110][[90, 100], True, 90, 20, 110]Passed
fixture 3[[90, 100], True, 100, 10, 110][[90, 100], True, 100, 10, 110]Passed
fixture 4[[90, 100], True, None, None, None][[90, 100], True, None, None, None]Passed
fixture 5[[99, 109], True, 109, 10, 119][[99, 109], True, 109, 10, 119]Passed
fixture 6[[100, 110], True, 100, 10, 110][[110], False, 110, 10, 120]Failed
fixture 7[[80, 90], True, 90, 20, 110][[80], False, 80, 20, 100]Failed
fixture 8[[110, 120], True, None, None, None][[120], False, 120, 10, 130]Failed
fixture 9[[-40, -30], True, -40, 20, -20][[-40], False, -40, 20, -20]Failed
fixture 10[[95, 105], True, 105, 10, 115][[95, 105], True, 105, 10, 115]Passed
variant capture[[90, 100], True, 90, 20, 110][[90, 100], True, 90, 20, 110]Passed

SHA-256 / 9661179de104ddd3604058683fce7f78284f7951337982f8b31365b4032fe53a

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):
    old_candidate = r['local'] - r['old']
    new_candidate = r['local'] - r['new']
    old_valid = old_candidate < r['transition']
    new_valid = new_candidate >= r['transition']
    candidates = sorted(set(([old_candidate] if old_valid else []) + ([new_candidate] if new_valid else [])))
    count = len(candidates)
    ambiguous = count == 2
    chosen = None if count == 0 or (ambiguous and r['policy'] == 'reject') else candidates[-1 if r['policy'] == 'later' else 0]
    offset = None if chosen is None else (r['old'] if chosen < r['transition'] else r['new'])
    roundtrip = None if chosen is None else chosen + offset
    return [candidates,ambiguous,chosen,offset,roundtrip]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[89], False, 89, 20, 109])
check('fixture 2', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[90, 100], True, 90, 20, 110])
check('fixture 3', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[90, 100], True, 100, 10, 110])
check('fixture 4', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[90, 100], True, None, None, None])
check('fixture 5', solve({'local': 119, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[99, 109], True, 109, 10, 119])
check('fixture 6', solve({'local': 120, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[110], False, 110, 10, 120])
check('fixture 7', solve({'local': 100, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[80], False, 80, 20, 100])
check('fixture 8', solve({'local': 130, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[120], False, 120, 10, 130])
check('fixture 9', solve({'local': -20, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[-40], False, -40, 20, -20])
check('fixture 10', solve({'local': 115, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[95, 105], True, 105, 10, 115])
variant = [({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[90, 100], True, 90, 20, 110]), ({'local': 111, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[91, 101], True, 91, 20, 111]), ({'local': 112, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[92, 102], True, 92, 20, 112]), ({'local': 113, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[93, 103], True, 93, 20, 113]), ({'local': 114, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[94, 104], True, 94, 20, 114])]
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[[89], False, 89, 20, 109][[89], False, 89, 20, 109]Passed
fixture 2[[90, 100], True, 90, 20, 110][[90, 100], True, 90, 20, 110]Passed
fixture 3[[90, 100], True, 100, 10, 110][[90, 100], True, 100, 10, 110]Passed
fixture 4[[90, 100], True, None, None, None][[90, 100], True, None, None, None]Passed
fixture 5[[99, 109], True, 109, 10, 119][[99, 109], True, 109, 10, 119]Passed
fixture 6[[110], False, 110, 10, 120][[110], False, 110, 10, 120]Passed
fixture 7[[80], False, 80, 20, 100][[80], False, 80, 20, 100]Passed
fixture 8[[120], False, 120, 10, 130][[120], False, 120, 10, 130]Passed
fixture 9[[-40], False, -40, 20, -20][[-40], False, -40, 20, -20]Passed
fixture 10[[95, 105], True, 105, 10, 115][[95, 105], True, 105, 10, 115]Passed
variant capture[[90, 100], True, 90, 20, 110][[90, 100], True, 90, 20, 110]Passed

SHA-256 / d21c5db944df4d397679661e96bdd23917ab65d501b4d8fcd8f038396d9aa721

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

Case digest / c60ceced77c427018c09fae60296cc2d277cc53ab9b27dfc5a5254c135ae82aa