FAILURE MAP
← Case archive

FA-7131 / Network routing / Open access

Zero weight upstreams never receive traffic · case 01

Zero weight upstreams never receive traffic.

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

ROOT CAUSE

The faulty implementation uses `list(range(len(weights)))` for the zero-weight-upstreams-never-receive-traffic decision.

VERIFIED REPAIR

Apply the explicit zero-weight-upstreams-never-receive-traffic contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `[i for i,w in enumerate(weights) if w >= 0]` and still violates a separate fixture.

Case contract

Bounded offline decision model: zero weight upstreams never receive traffic. 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 zero-weight-upstreams-never-receive-traffic 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(weights):
    return list(range(len(weights)))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([0, 2, 0]), [1])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([1, 2]), [0, 1])", "check('fixture 4', solve([0]), [])"]
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 fixtureActualExpectedOutcome
fixture 2[][]Passed
fixture 3[0, 1][0, 1]Passed
fixture 4[0][]Failed
fixture 1[0, 1, 2][1]Failed

SHA-256 / 87cb62c6bb1112f95bf0b1c48f27cf5f6ab632daa543963fd215a9c6c9c3c757

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(weights):
    return [i for i,w in enumerate(weights) if w >= 0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([0, 2, 0]), [1])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([1, 2]), [0, 1])", "check('fixture 4', solve([0]), [])"]
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 fixtureActualExpectedOutcome
fixture 2[][]Passed
fixture 3[0, 1][0, 1]Passed
fixture 4[0][]Failed
fixture 1[0, 1, 2][1]Failed

SHA-256 / 97af31cc34eea656c09ed78f752b431ae60716d5c58fea465c0bef0e40955539

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(weights):
    return [i for i,w in enumerate(weights) if w > 0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([0, 2, 0]), [1])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([1, 2]), [0, 1])", "check('fixture 4', solve([0]), [])"]
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 fixtureActualExpectedOutcome
fixture 2[][]Passed
fixture 3[0, 1][0, 1]Passed
fixture 4[][]Passed
fixture 1[1][1]Passed

SHA-256 / 6d317ce1edf9ddc9ee2fe35b06685fb94f053e6089b529880eef7ec50bda8bbc

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

Case digest / 7fa9e9283e708a4ca790f3301cd03d6cd29db6d7f4d2fef41d5e0b95e6741ce0