FA-7766 / Connection lifecycle / Open access
Connection attempt timeout is separate from read timeout · case 01
Connection attempt timeout is separate from read timeout.
ROOT CAUSE
The faulty implementation uses `min(remaining,read_timeout)` for the connection-attempt-timeout-is-separate-from-read-timeout decision.
VERIFIED REPAIR
Apply the explicit connection-attempt-timeout-is-separate-from-read-timeout contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `connect_timeout if phase == "connect" else read_timeout` and still violates a separate fixture.
Case contract
Given phase, connect_timeout, read_timeout, remaining, connection attempt timeout is separate from read timeout. Return the protocol decision or transformed value; fields are validated and fixtures state boundary outcomes.
Why this case matters
This deterministic connection lifecycle model isolates the connection-attempt-timeout-is-separate-from-read-timeout 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(phase, connect_timeout, read_timeout, remaining):
return min(remaining,read_timeout)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('connect', 2, 30, 100), 2)", "check('fixture 2', solve('read', 2, 30, 5), 5)", "check('fixture 3', solve('connect', 2, 30, 0), 0)", "check('fixture 4', solve('read', 2, 30, 100), 30)"]
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 | 5 | 5 | Passed |
| fixture 3 | 0 | 0 | Passed |
| fixture 4 | 30 | 30 | Passed |
| fixture 1 | 30 | 2 | Failed |
SHA-256 / 4ac0fcd6d9ec625fcde9b2c527826abedd78cd2ba69ab1aa51a58ee87844834d
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(phase, connect_timeout, read_timeout, remaining):
return connect_timeout if phase == "connect" else read_timeout
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('connect', 2, 30, 100), 2)", "check('fixture 2', solve('read', 2, 30, 5), 5)", "check('fixture 3', solve('connect', 2, 30, 0), 0)", "check('fixture 4', solve('read', 2, 30, 100), 30)"]
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 | 30 | 5 | Failed |
| fixture 3 | 2 | 0 | Failed |
| fixture 4 | 30 | 30 | Passed |
| fixture 1 | 2 | 2 | Passed |
SHA-256 / 003914fdb4123d9c199e7a71cf9022a58caecc1b3427e6f1f38f4a7f35c4222f
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(phase, connect_timeout, read_timeout, remaining):
return min(remaining,connect_timeout if phase == "connect" else read_timeout)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('connect', 2, 30, 100), 2)", "check('fixture 2', solve('read', 2, 30, 5), 5)", "check('fixture 3', solve('connect', 2, 30, 0), 0)", "check('fixture 4', solve('read', 2, 30, 100), 30)"]
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 | 5 | 5 | Passed |
| fixture 3 | 0 | 0 | Passed |
| fixture 4 | 30 | 30 | Passed |
| fixture 1 | 2 | 2 | Passed |
SHA-256 / 51db1225738aeec0af8ad641c8b61b1c4c54fe0f99536b300344a193c1bf722a
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:15.100119+00:00.
Case digest / 380db4c5f0fe3b4e6595d6e338d7c9f5ca718cc0ebe6e7d9038545c813fed11b