FA-7136 / Network routing / Open access
Least loaded route normalizes by capacity · case 01
Least loaded route normalizes by capacity.
ROOT CAUSE
The faulty implementation uses `min(servers,key=lambda s:s[1])[0] if servers else None` for the least-loaded-route-normalizes-by-capacity decision.
VERIFIED REPAIR
Apply the explicit least-loaded-route-normalizes-by-capacity contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `max(servers,key=lambda s:s[1]/s[2])[0] if servers else None` and still violates a separate fixture.
Case contract
Bounded offline decision model: least loaded route normalizes by capacity. 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 least-loaded-route-normalizes-by-capacity 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(servers):
return min(servers,key=lambda s:s[1])[0] if servers else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 5, 10), ('b', 3, 3)]), 'a')", "check('fixture 2', solve([('a', 1, 10), ('b', 5, 10)]), 'a')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('a', 1, 2)]), 'a')"]
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 | a | Passed |
| fixture 3 | None | None | Passed |
| fixture 4 | a | a | Passed |
| fixture 1 | b | a | Failed |
SHA-256 / bee65387e63fc3db7ec5d6c7583b17b0aef12090b66210731e8118fd88bf8093
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(servers):
return max(servers,key=lambda s:s[1]/s[2])[0] if servers else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 5, 10), ('b', 3, 3)]), 'a')", "check('fixture 2', solve([('a', 1, 10), ('b', 5, 10)]), 'a')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('a', 1, 2)]), 'a')"]
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 | a | Failed |
| fixture 3 | None | None | Passed |
| fixture 4 | a | a | Passed |
| fixture 1 | b | a | Failed |
SHA-256 / ff5d1aefb0850157a9057612bc836db8cc2b66325ddc91e7e7eceab8afc1e613
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(servers):
return min(servers,key=lambda s:s[1]/s[2])[0] if servers else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 5, 10), ('b', 3, 3)]), 'a')", "check('fixture 2', solve([('a', 1, 10), ('b', 5, 10)]), 'a')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('a', 1, 2)]), 'a')"]
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 | a | Passed |
| fixture 3 | None | None | Passed |
| fixture 4 | a | a | Passed |
| fixture 1 | a | a | Passed |
SHA-256 / f3d9cacc1b167e75218cf1fa327a3c11e95dbd7f6d43afeaa84119ab44d8a786
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.712247+00:00.
Case digest / 20e06a28be29ed5deca675c7b13f0630a183998ecd862aeb726333cc90e88a9f