FAILURE MAP
← Case archive

FA-12221 / Navigation route constraints / Open access

Toll avoidance checks only the route endpoints · case 01

Toll avoidance checks only the route endpoints in the controlled route-policy fixture.

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

ROOT CAUSE

Interior toll segments are ignored when evaluating a completed route.

VERIFIED REPAIR

Inspect every segment and reject only charged road-toll segments.

Unsuccessful approach: Rejecting all charged segments also excludes ferry fares, although this policy explicitly avoids road tolls only.

Case contract

Segments are (kind, charge_in_cents), with kind road_toll, ferry, or free. Return whether a route satisfies avoidance of positive road tolls; an empty route satisfies it.

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(segments):
    return not segments or all(kind != 'road_toll' or fee == 0 for kind,fee in [segments[0],segments[-1]])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('interior toll', solve([('free',0),('road_toll',N),('free',0)]), False)
check('ferry fare is distinct', solve([('ferry',N)]), True)
check('zero toll', solve([('road_toll',0)]), True)
check('first segment toll', solve([('road_toll',N),('free',0)]), False)
check('last segment toll', solve([('free',0),('road_toll',N)]), False)
check('empty route', solve([]), True)
check('all free', solve([('free',0)]*N), True)
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
interior tollTrueFalseFailed
ferry fare is distinctTrueTruePassed
zero tollTrueTruePassed
first segment tollFalseFalsePassed
last segment tollFalseFalsePassed
empty routeTrueTruePassed
all freeTrueTruePassed

SHA-256 / e1f2d2f38a63aabfc7cf5715c0a2cf6ced637e0992bd0fc3654150f73bd5fcd2

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(segments):
    return all(fee == 0 for kind,fee in segments)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('interior toll', solve([('free',0),('road_toll',N),('free',0)]), False)
check('ferry fare is distinct', solve([('ferry',N)]), True)
check('zero toll', solve([('road_toll',0)]), True)
check('first segment toll', solve([('road_toll',N),('free',0)]), False)
check('last segment toll', solve([('free',0),('road_toll',N)]), False)
check('empty route', solve([]), True)
check('all free', solve([('free',0)]*N), True)
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
interior tollFalseFalsePassed
ferry fare is distinctFalseTrueFailed
zero tollTrueTruePassed
first segment tollFalseFalsePassed
last segment tollFalseFalsePassed
empty routeTrueTruePassed
all freeTrueTruePassed

SHA-256 / 40c813d6af6517a0741f3305de6e77bd66abdc36a113436386f5acad5227a23d

3 / The verified repair

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

N = 1
observations = []
def solve(segments):
    return all(kind != 'road_toll' or fee == 0 for kind,fee in segments)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('interior toll', solve([('free',0),('road_toll',N),('free',0)]), False)
check('ferry fare is distinct', solve([('ferry',N)]), True)
check('zero toll', solve([('road_toll',0)]), True)
check('first segment toll', solve([('road_toll',N),('free',0)]), False)
check('last segment toll', solve([('free',0),('road_toll',N)]), False)
check('empty route', solve([]), True)
check('all free', solve([('free',0)]*N), True)
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
interior tollFalseFalsePassed
ferry fare is distinctTrueTruePassed
zero tollTrueTruePassed
first segment tollFalseFalsePassed
last segment tollFalseFalsePassed
empty routeTrueTruePassed
all freeTrueTruePassed

SHA-256 / d4c7e51b48a6b360fb2ecf0f967938ec3f11e6006856281555cab61ef8c0a8e4

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

Case digest / 8502d47ef1b5c1462287691dd45aa51592fe1a97862b73d1f27edd79ab5f6919