FAILURE MAP
← Case archive

FA-12231 / Navigation route constraints / Open access

Map matching snaps a waypoint onto an inaccessible bridge deck · case 01

Map matching snaps a waypoint onto an inaccessible bridge deck in the controlled route-policy fixture.

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

ROOT CAUSE

Horizontal proximity ignores the explicitly known road level.

VERIFIED REPAIR

Filter by deck and mode before minimizing distance with stable ID tie-breaking.

Unsuccessful approach: Filtering by deck fixes elevation confusion but ignores travel-mode permission.

Case contract

Candidates are (ID, nonnegative integer distance, deck, modes). Return the closest ID matching the known deck and requested mode, or None. Ties use lexicographic ID.

Why this case matters

Navigation policies depend on road context that a shortest-path cost alone does not encode.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(candidates, deck, mode):
    return min(candidates, key=lambda c:(c[1],c[0]))[0] if candidates else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
c = [('bridge',0,N+1,['car']),('walk',1,N,['walk']),('road',2,N,['car'])]
check('deck and mode', solve(c,N,'car'), 'road')
check('pedestrian deck', solve(c,N,'walk'), 'walk')
check('bridge deck', solve(c,N+1,'car'), 'bridge')
check('missing mode', solve(c,N,'bike'), None)
check('missing deck', solve(c,N+2,'car'), None)
check('empty candidates', solve([],N,'car'), None)
check('stable tie', solve([('z',N,N,['car']),('a',N,N,['car'])],N,'car'), 'a')
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
deck and modebridgeroadFailed
pedestrian deckbridgewalkFailed
bridge deckbridgebridgePassed
missing modebridgeNoneFailed
missing deckbridgeNoneFailed
empty candidatesNoneNonePassed
stable tieaaPassed

SHA-256 / d266e653df86104889c45cd124f91ea6204ce848cbd4b0541c56896e6529fd55

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(candidates, deck, mode):
    eligible = [c for c in candidates if c[2] == deck]
    return min(eligible,key=lambda c:(c[1],c[0]))[0] if eligible else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
c = [('bridge',0,N+1,['car']),('walk',1,N,['walk']),('road',2,N,['car'])]
check('deck and mode', solve(c,N,'car'), 'road')
check('pedestrian deck', solve(c,N,'walk'), 'walk')
check('bridge deck', solve(c,N+1,'car'), 'bridge')
check('missing mode', solve(c,N,'bike'), None)
check('missing deck', solve(c,N+2,'car'), None)
check('empty candidates', solve([],N,'car'), None)
check('stable tie', solve([('z',N,N,['car']),('a',N,N,['car'])],N,'car'), 'a')
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
deck and modewalkroadFailed
pedestrian deckwalkwalkPassed
bridge deckbridgebridgePassed
missing modewalkNoneFailed
missing deckNoneNonePassed
empty candidatesNoneNonePassed
stable tieaaPassed

SHA-256 / faaaadcb17b564ae3c1b2e1ea6b944f2edb80f7f4f306604f55c533c93e62b12

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(candidates, deck, mode):
    eligible = [c for c in candidates if c[2] == deck and mode in c[3]]
    return min(eligible,key=lambda c:(c[1],c[0]))[0] if eligible else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
c = [('bridge',0,N+1,['car']),('walk',1,N,['walk']),('road',2,N,['car'])]
check('deck and mode', solve(c,N,'car'), 'road')
check('pedestrian deck', solve(c,N,'walk'), 'walk')
check('bridge deck', solve(c,N+1,'car'), 'bridge')
check('missing mode', solve(c,N,'bike'), None)
check('missing deck', solve(c,N+2,'car'), None)
check('empty candidates', solve([],N,'car'), None)
check('stable tie', solve([('z',N,N,['car']),('a',N,N,['car'])],N,'car'), 'a')
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
deck and moderoadroadPassed
pedestrian deckwalkwalkPassed
bridge deckbridgebridgePassed
missing modeNoneNonePassed
missing deckNoneNonePassed
empty candidatesNoneNonePassed
stable tieaaPassed

SHA-256 / 3115580c93adeda474d35639aafa9bed4d151e8908257267414841d7c601cc67

Verification & scope

Simplified deterministic offline policy model; not a production router or authoritative road guidance. 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:38:54.964950+00:00.

Case digest / d5bae18d31bb2899ab9b1b67e3bd354a0ed55a47787233d01df8ee4eab6f4513