FA-7161 / Network routing / Open access
Route rewrite adds exactly one path separator · case 01
Route rewrite adds exactly one path separator.
ROOT CAUSE
The faulty implementation uses `base+tail` for the route-rewrite-adds-exactly-one-path-separator decision.
VERIFIED REPAIR
Apply the explicit route-rewrite-adds-exactly-one-path-separator contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `base+"/"+tail` and still violates a separate fixture.
Case contract
Bounded offline decision model: route rewrite adds exactly one path separator. 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 route-rewrite-adds-exactly-one-path-separator 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(base, tail):
return base+tail
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/v1/', '/x'), '/v1/x')", "check('fixture 2', solve('/v1', 'x'), '/v1/x')", "check('fixture 3', solve('/', '/'), '/')", "check('fixture 4', solve('/v1/', ''), '/v1/')"]
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 | /v1x | /v1/x | Failed |
| fixture 3 | // | / | Failed |
| fixture 4 | /v1/ | /v1/ | Passed |
| fixture 1 | /v1//x | /v1/x | Failed |
SHA-256 / 63c7a1db645b2b6ea34aaa17fd8cdb9b7890dc77fd6edb20b84563ab730bbd0f
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(base, tail):
return base+"/"+tail
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/v1/', '/x'), '/v1/x')", "check('fixture 2', solve('/v1', 'x'), '/v1/x')", "check('fixture 3', solve('/', '/'), '/')", "check('fixture 4', solve('/v1/', ''), '/v1/')"]
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 | /v1/x | /v1/x | Passed |
| fixture 3 | /// | / | Failed |
| fixture 4 | /v1// | /v1/ | Failed |
| fixture 1 | /v1///x | /v1/x | Failed |
SHA-256 / 9fac127e44e7312d17923562d7d62eb18961d49ecc050fc18b271375e2a95aac
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(base, tail):
return base.rstrip("/")+"/"+tail.lstrip("/")
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/v1/', '/x'), '/v1/x')", "check('fixture 2', solve('/v1', 'x'), '/v1/x')", "check('fixture 3', solve('/', '/'), '/')", "check('fixture 4', solve('/v1/', ''), '/v1/')"]
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 | /v1/x | /v1/x | Passed |
| fixture 3 | / | / | Passed |
| fixture 4 | /v1/ | /v1/ | Passed |
| fixture 1 | /v1/x | /v1/x | Passed |
SHA-256 / ac25b2e5bf5d365736f95a7e7325e2fd8eb8973a2e71267cf193d5be218e07f6
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.973918+00:00.
Case digest / 103a204d0ce7d0dceb79e6aa5ade13f9c38b26e620717180e66d3db5889f8813