FAILURE MAP
← Case archive

FA-7776 / Connection lifecycle / Open access

Connection drain accepts existing streams but not new streams · case 01

Connection drain accepts existing streams but not new streams.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The faulty implementation uses `state != "closed"` for the connection-drain-accepts-existing-streams-but-not-new-streams decision.

VERIFIED REPAIR

Apply the explicit connection-drain-accepts-existing-streams-but-not-new-streams contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `state == "open"` and still violates a separate fixture.

Case contract

Given state, existing, connection drain accepts existing streams but not new streams. 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-drain-accepts-existing-streams-but-not-new-streams 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(state, existing):
    return state != "closed"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('draining', True), True)", "check('fixture 2', solve('draining', False), False)", "check('fixture 3', solve('closed', True), False)", "check('fixture 4', solve('open', False), True)"]
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 fixtureActualExpectedOutcome
fixture 2TrueFalseFailed
fixture 3FalseFalsePassed
fixture 4TrueTruePassed
fixture 1TrueTruePassed

SHA-256 / 8aa8d201df6d65f8e3e63decfe14fa32d1b7c549a20f3bfa03c485dd6a8b48f7

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(state, existing):
    return state == "open"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('draining', True), True)", "check('fixture 2', solve('draining', False), False)", "check('fixture 3', solve('closed', True), False)", "check('fixture 4', solve('open', False), True)"]
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 fixtureActualExpectedOutcome
fixture 2FalseFalsePassed
fixture 3FalseFalsePassed
fixture 4TrueTruePassed
fixture 1FalseTrueFailed

SHA-256 / 12de1219b5d51d047a35a763e8a21d1bf6e8517f3af2d8edec999f8aa695ddcd

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(state, existing):
    return state == "open" or state == "draining" and existing
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('draining', True), True)", "check('fixture 2', solve('draining', False), False)", "check('fixture 3', solve('closed', True), False)", "check('fixture 4', solve('open', False), True)"]
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 fixtureActualExpectedOutcome
fixture 2FalseFalsePassed
fixture 3FalseFalsePassed
fixture 4TrueTruePassed
fixture 1TrueTruePassed

SHA-256 / 522e4147e1c6274d661e01e97fee6b08fe904f5d9d59fb912047c5d7015e52c2

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.189243+00:00.

Case digest / f1c608a7067e10c6b1a82b373f112407fa4011efe92c0a4bf6ba6b0bfb7732f1