FA-7091 / Network routing / Open access
Disabled routes are removed before preference selection · case 01
Disabled routes are removed before preference selection.
ROOT CAUSE
The faulty implementation uses `max(routes,key=lambda r:r[1],default=(None,))[0]` for the disabled-routes-are-removed-before-preference-selection decision.
VERIFIED REPAIR
Apply the explicit disabled-routes-are-removed-before-preference-selection contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `min((r for r in routes if r[2]),key=lambda r:r[1],default=(None,))[0]` and still violates a separate fixture.
Case contract
Bounded offline decision model: disabled routes are removed before preference selection. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.
Why this case matters
This deterministic network routing model isolates the disabled-routes-are-removed-before-preference-selection policy at a network component boundary.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(routes):
return max(routes,key=lambda r:r[1],default=(None,))[0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('bad', 9, False), ('a', 5, True)]), 'a')", "check('fixture 2', solve([('a', 5, True), ('b', 9, True)]), 'b')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('bad', 9, False)]), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
exec(_line)
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 2 | b | b | Passed |
| fixture 3 | None | None | Passed |
| fixture 4 | bad | None | Failed |
| fixture 1 | bad | a | Failed |
SHA-256 / c304bfef51da990efe9b0682c3d76ed59a3974b6017e04cc2f9e13a8f47677c9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(routes):
return min((r for r in routes if r[2]),key=lambda r:r[1],default=(None,))[0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('bad', 9, False), ('a', 5, True)]), 'a')", "check('fixture 2', solve([('a', 5, True), ('b', 9, True)]), 'b')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('bad', 9, False)]), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
exec(_line)
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 2 | a | b | Failed |
| fixture 3 | None | None | Passed |
| fixture 4 | None | None | Passed |
| fixture 1 | a | a | Passed |
SHA-256 / 5a0bb42393f5276eae678ba35b4a7358e40f3ee12907b702e15e5c5dd3bbd249
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(routes):
return max((r for r in routes if r[2]),key=lambda r:r[1],default=(None,))[0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('bad', 9, False), ('a', 5, True)]), 'a')", "check('fixture 2', solve([('a', 5, True), ('b', 9, True)]), 'b')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('bad', 9, False)]), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
exec(_line)
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 2 | b | b | Passed |
| fixture 3 | None | None | Passed |
| fixture 4 | None | None | Passed |
| fixture 1 | a | a | Passed |
SHA-256 / b76254bb5c37b96474cba7b1395f6325775803f5dd12bff075d46359b3e6e9fa
Verification & scope
Bounded deterministic policy model over validated inputs; not a complete protocol stack or an interoperability claim. The five variants rotate the same explicit fixture set. 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:08.359073+00:00.
Case digest / 059e01142e227fcfe5d87825f5f502259e562129fd814f90f8411b8c20fe30c0