FAILURE MAP
← Case archive

FA-7726 / Connection lifecycle / Open access

Pool cap includes in progress connection attempts · case 01

Pool cap includes in progress connection attempts.

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

ROOT CAUSE

The faulty implementation uses `sum(o for o,c in host_counts.values()) < global_cap and host_counts.get(host,(0,0))[0] < host_cap` for the pool-cap-includes-in-progress-connection-attempts decision.

VERIFIED REPAIR

Apply the explicit pool-cap-includes-in-progress-connection-attempts contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `sum(o+c for o,c in host_counts.values()) <= global_cap and sum(host_counts.get(host,(0,0))) <= host_cap` and still violates a separate fixture.

Case contract

Given host_counts, host, host_cap, global_cap, pool cap includes in progress connection attempts. 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 pool-cap-includes-in-progress-connection-attempts 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(host_counts, host, host_cap, global_cap):
    return sum(o for o,c in host_counts.values()) < global_cap and host_counts.get(host,(0,0))[0] < host_cap
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'a': (1, 1)}, 'a', 2, 10), False)", "check('fixture 2', solve({'a': (1, 0), 'b': (2, 1)}, 'a', 3, 4), False)", "check('fixture 3', solve({}, 'a', 1, 1), True)", "check('fixture 4', solve({'a': (1, 0)}, 'a', 2, 3), 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 3TrueTruePassed
fixture 4TrueTruePassed
fixture 1TrueFalseFailed

SHA-256 / 283c5a3f3ccc6322dbcf55ff8e5c89d3c0efd7427c50e21e1f9c83ae846071aa

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(host_counts, host, host_cap, global_cap):
    return sum(o+c for o,c in host_counts.values()) <= global_cap and sum(host_counts.get(host,(0,0))) <= host_cap
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'a': (1, 1)}, 'a', 2, 10), False)", "check('fixture 2', solve({'a': (1, 0), 'b': (2, 1)}, 'a', 3, 4), False)", "check('fixture 3', solve({}, 'a', 1, 1), True)", "check('fixture 4', solve({'a': (1, 0)}, 'a', 2, 3), 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 3TrueTruePassed
fixture 4TrueTruePassed
fixture 1TrueFalseFailed

SHA-256 / 743435ba3dad6eeee94726ae67a6daa70bc94da6546163056444c4a6956ddc72

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(host_counts, host, host_cap, global_cap):
    return sum(o+c for o,c in host_counts.values()) < global_cap and sum(host_counts.get(host,(0,0))) < host_cap
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'a': (1, 1)}, 'a', 2, 10), False)", "check('fixture 2', solve({'a': (1, 0), 'b': (2, 1)}, 'a', 3, 4), False)", "check('fixture 3', solve({}, 'a', 1, 1), True)", "check('fixture 4', solve({'a': (1, 0)}, 'a', 2, 3), 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 3TrueTruePassed
fixture 4TrueTruePassed
fixture 1FalseFalsePassed

SHA-256 / 4b730fcd0b0f0e7eb0e9070e7b37ccee6381d77cb66ade25e3a25c699a32512b

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

Case digest / 3d1ef0a12e1a991061af52fcb2d43dbab1360d6b465d8d8d543aec8142359660