FA-7096 / Network routing / Open access
Path prefix routing requires segment boundaries · case 01
Path prefix routing requires segment boundaries.
ROOT CAUSE
The faulty implementation uses `path.startswith(prefix)` for the path-prefix-routing-requires-segment-boundaries decision.
VERIFIED REPAIR
Apply the explicit path-prefix-routing-requires-segment-boundaries contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `path == prefix` and still violates a separate fixture.
Case contract
Bounded offline decision model: path prefix routing requires segment boundaries. 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 path-prefix-routing-requires-segment-boundaries 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(path, prefix):
return path.startswith(prefix)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/apiary', '/api'), False)", "check('fixture 2', solve('/api/x', '/api'), True)", "check('fixture 3', solve('/api', '/api'), True)", "check('fixture 4', solve('/else', '/api'), False)"]
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 | True | True | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 1 | True | False | Failed |
SHA-256 / ef28aa97b55ae251e8cac05357ac3da0815cdacf8a470ef5790313065ce82672
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(path, prefix):
return path == prefix
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/apiary', '/api'), False)", "check('fixture 2', solve('/api/x', '/api'), True)", "check('fixture 3', solve('/api', '/api'), True)", "check('fixture 4', solve('/else', '/api'), False)"]
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 | False | True | Failed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 1 | False | False | Passed |
SHA-256 / 8d42b00813aaba2b03fe930f39cfe17d66f654aadd808419e60f0a72fe2cd9ef
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(path, prefix):
return path == prefix or path.startswith(prefix.rstrip("/")+"/")
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/apiary', '/api'), False)", "check('fixture 2', solve('/api/x', '/api'), True)", "check('fixture 3', solve('/api', '/api'), True)", "check('fixture 4', solve('/else', '/api'), False)"]
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 | True | True | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 1 | False | False | Passed |
SHA-256 / 3a146f0f6986994e19480fafe1ff17aa012057702e9c32f6600bb9783698da84
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.422903+00:00.
Case digest / db7ff859f4e1891b52e922cb0f702096fe3d66b974485df574bd049148d93b72