FA-7011 / Proxy forwarding / Open access
Proxy error status distinguishes timeout from connect failure · case 01
Proxy error status distinguishes timeout from connect failure.
ROOT CAUSE
The faulty implementation uses `502 if not connected else 200` for the proxy-error-status-distinguishes-timeout-from-connect-failure decision.
VERIFIED REPAIR
Apply the explicit proxy-error-status-distinguishes-timeout-from-connect-failure contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `504 if not connected else 200` and still violates a separate fixture.
Case contract
Bounded offline decision model: proxy error status distinguishes timeout from connect failure. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.
Why this case matters
This deterministic proxy forwarding model isolates the proxy-error-status-distinguishes-timeout-from-connect-failure 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(timeout, connected):
return 502 if not connected else 200
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), 504)", "check('fixture 2', solve(False, False), 502)", "check('fixture 3', solve(False, True), 200)", "check('fixture 4', solve(True, True), 504)"]
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 | 502 | 502 | Passed |
| fixture 3 | 200 | 200 | Passed |
| fixture 4 | 200 | 504 | Failed |
| fixture 1 | 502 | 504 | Failed |
SHA-256 / 91de5d78f9cf5e8cfb90b2ef2c51e19e4b0e4f3010df6136fa29be16d91f989b
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(timeout, connected):
return 504 if not connected else 200
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), 504)", "check('fixture 2', solve(False, False), 502)", "check('fixture 3', solve(False, True), 200)", "check('fixture 4', solve(True, True), 504)"]
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 | 504 | 502 | Failed |
| fixture 3 | 200 | 200 | Passed |
| fixture 4 | 200 | 504 | Failed |
| fixture 1 | 504 | 504 | Passed |
SHA-256 / 5e3c49400caa9fe651c08e59379c05bde2d0386ccd99df1394fae134ea533406
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(timeout, connected):
return 504 if timeout else (502 if not connected else 200)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), 504)", "check('fixture 2', solve(False, False), 502)", "check('fixture 3', solve(False, True), 200)", "check('fixture 4', solve(True, True), 504)"]
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 | 502 | 502 | Passed |
| fixture 3 | 200 | 200 | Passed |
| fixture 4 | 504 | 504 | Passed |
| fixture 1 | 504 | 504 | Passed |
SHA-256 / 88bff42b5ebc8d34d6f658b060a7c47a60908560ba32806030877a702fb90d5b
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:07.456764+00:00.
Case digest / c74a57cd89669017e4731fe66737d3aad055559b2b0fc154e56097b9f176c61a