FAILURE MAP
← Case archive

FA-7186 / Network routing / Open access

Ecmp selection uses flow identity not packet ordinal · case 01

Ecmp selection uses flow identity not packet ordinal.

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

ROOT CAUSE

The faulty implementation uses `paths[ordinal % len(paths)] if paths else None` for the ecmp-selection-uses-flow-identity-not-packet-ordinal decision.

VERIFIED REPAIR

Apply the explicit ecmp-selection-uses-flow-identity-not-packet-ordinal contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `paths[flow_hash % (len(paths)-1)] if len(paths)>1 else None` and still violates a separate fixture.

Case contract

Bounded offline decision model: ecmp selection uses flow identity not packet ordinal. 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 ecmp-selection-uses-flow-identity-not-packet-ordinal 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(flow_hash, paths, ordinal):
    return paths[ordinal % len(paths)] if paths else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, ['a', 'b'], 0), 'b')", "check('fixture 2', solve(2, ['a', 'b'], 1), 'a')", "check('fixture 3', solve(0, ['x'], 5), 'x')", "check('fixture 4', solve(1, [], 1), 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 fixtureActualExpectedOutcome
fixture 2baFailed
fixture 3xxPassed
fixture 4NoneNonePassed
fixture 1abFailed

SHA-256 / 58532d759f685e999c95f10dee6a1b0f4fd0f5f4b87c6bd41e2fd61305d5934f

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(flow_hash, paths, ordinal):
    return paths[flow_hash % (len(paths)-1)] if len(paths)>1 else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, ['a', 'b'], 0), 'b')", "check('fixture 2', solve(2, ['a', 'b'], 1), 'a')", "check('fixture 3', solve(0, ['x'], 5), 'x')", "check('fixture 4', solve(1, [], 1), 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 fixtureActualExpectedOutcome
fixture 2aaPassed
fixture 3NonexFailed
fixture 4NoneNonePassed
fixture 1abFailed

SHA-256 / 71f0efda693e98fe18e177f40b4cc1e309b635a6d189ede0f99b88affdd041fa

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(flow_hash, paths, ordinal):
    return paths[flow_hash % len(paths)] if paths else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, ['a', 'b'], 0), 'b')", "check('fixture 2', solve(2, ['a', 'b'], 1), 'a')", "check('fixture 3', solve(0, ['x'], 5), 'x')", "check('fixture 4', solve(1, [], 1), 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 fixtureActualExpectedOutcome
fixture 2aaPassed
fixture 3xxPassed
fixture 4NoneNonePassed
fixture 1bbPassed

SHA-256 / 00f185cf2cbff0e1ac3768fffe544c045b3cf57bcfef7b13f321544c443edab9

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

Case digest / 46328bed5ddf828a971ef219e31f68abc2bb787441cc056b70dbcda57b72ddad