FA-7751 / Connection lifecycle / Open access
Connect completion checks socket error not writability alone · case 01
Connect completion checks socket error not writability alone.
ROOT CAUSE
The faulty implementation uses `writable` for the connect-completion-checks-socket-error-not-writability-alone decision.
VERIFIED REPAIR
Apply the explicit connect-completion-checks-socket-error-not-writability-alone contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `error == 0` and still violates a separate fixture.
Case contract
Bounded offline decision model: connect completion checks socket error not writability alone. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.
Why this case matters
This deterministic connection lifecycle model isolates the connect-completion-checks-socket-error-not-writability-alone 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(writable, error):
return writable
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 111), False)", "check('fixture 2', solve(False, 0), False)", "check('fixture 3', solve(True, 0), True)", "check('fixture 4', solve(False, 111), 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 | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 1 | True | False | Failed |
SHA-256 / 1e83eada854323765685b67e87148d05cc1a918f76e3152597eec119fc3b948c
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(writable, error):
return error == 0
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 111), False)", "check('fixture 2', solve(False, 0), False)", "check('fixture 3', solve(True, 0), True)", "check('fixture 4', solve(False, 111), 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 | False | Failed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 1 | False | False | Passed |
SHA-256 / 5781c978a99769a8075530a80142577a845db8db3d6f0e16d6512bcdf92e108a
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(writable, error):
return writable and error == 0
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 111), False)", "check('fixture 2', solve(False, 0), False)", "check('fixture 3', solve(True, 0), True)", "check('fixture 4', solve(False, 111), 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 | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 1 | False | False | Passed |
SHA-256 / 738e5ac8d417557db78658cf6963d81387f9ef3d7d9cfcd9a70aee57598844ef
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:14.886536+00:00.
Case digest / 056b2eea1a9de8063669002b26dbf0dbbdb0a9875b9b3c8df3baf543ac186166