FA-7786 / Connection lifecycle / Open access
Connection close notification is emitted once · case 01
Connection close notification is emitted once.
ROOT CAUSE
The faulty implementation uses `["notify","release"] if now_closed else []` for the connection-close-notification-is-emitted-once decision.
VERIFIED REPAIR
Apply the explicit connection-close-notification-is-emitted-once contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `["notify"] if now_closed and not was_closed else []` and still violates a separate fixture.
Case contract
Given was_closed, now_closed, leased, connection close notification is emitted once. 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-close-notification-is-emitted-once 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(was_closed, now_closed, leased):
return ["notify","release"] if now_closed else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(False, True, True), ['notify', 'release'])", "check('fixture 2', solve(True, True, True), [])", "check('fixture 3', solve(False, True, False), ['notify'])", "check('fixture 4', solve(True, False, 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 | ['notify', 'release'] | [] | Failed |
| fixture 3 | ['notify', 'release'] | ['notify'] | Failed |
| fixture 4 | [] | [] | Passed |
| fixture 1 | ['notify', 'release'] | ['notify', 'release'] | Passed |
SHA-256 / b31d77d697a09b6d74a84392a5c11b6802688a6c455b52d3526c58e85270b696
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(was_closed, now_closed, leased):
return ["notify"] if now_closed and not was_closed else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(False, True, True), ['notify', 'release'])", "check('fixture 2', solve(True, True, True), [])", "check('fixture 3', solve(False, True, False), ['notify'])", "check('fixture 4', solve(True, False, 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 | [] | [] | Passed |
| fixture 3 | ['notify'] | ['notify'] | Passed |
| fixture 4 | [] | [] | Passed |
| fixture 1 | ['notify'] | ['notify', 'release'] | Failed |
SHA-256 / e31b036622854ccdbaa5104a704b4b0ec442dbd08a939c1d928cb7f04b932786
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(was_closed, now_closed, leased):
return (["notify"]+(["release"] if leased else [])) if now_closed and not was_closed else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(False, True, True), ['notify', 'release'])", "check('fixture 2', solve(True, True, True), [])", "check('fixture 3', solve(False, True, False), ['notify'])", "check('fixture 4', solve(True, False, 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 | [] | [] | Passed |
| fixture 3 | ['notify'] | ['notify'] | Passed |
| fixture 4 | [] | [] | Passed |
| fixture 1 | ['notify', 'release'] | ['notify', 'release'] | Passed |
SHA-256 / b8f50b11d347d58e158f9e27b38178984c8c95fcb184f578b6f9639baf979f6a
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.306791+00:00.
Case digest / f4e192f24a17c875155b13bb370d56aadceba2bc87b8b75af40bd01aa8141b7b