{"abstract":"Pool idle selection chooses most recently used healthy socket.","category":"Connection lifecycle","checks":4,"contract":"Bounded offline decision model: pool idle selection chooses most recently used healthy socket. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.","contract_signature":"sockets","evaluation_group":"xh-pool-idle-selection-chooses-most-recently-used-healthy-socket","failed_approach":"The attempted repair uses `min((s for s in sockets if s[2]),key=lambda s:s[1],default=(None,))[0]` and still violates a separate fixture.","family":"xh-pool-idle-selection-chooses-most-recently-used-healthy-socket","id":"FA-7731","implementations":{"attempt":{"sha256":"030d4a07ca9ac75cab1161b534e77ccb73bea25d01a25dddf7e5c79fd0c0e839","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(sockets):\n    return min((s for s in sockets if s[2]),key=lambda s:s[1],default=(None,))[0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve([('a', 1, True), ('b', 2, True), ('bad', 3, False)]), 'b')\", \"check('fixture 2', solve([]), None)\", \"check('fixture 3', solve([('bad', 3, False)]), None)\", \"check('fixture 4', solve([('a', 1, True)]), 'a')\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"47d37e172538801bfd3b73d6cbc889d371f8bb3695e8301bceebbf119caf7b68","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(sockets):\n    return max(sockets,key=lambda s:s[1],default=(None,))[0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve([('a', 1, True), ('b', 2, True), ('bad', 3, False)]), 'b')\", \"check('fixture 2', solve([]), None)\", \"check('fixture 3', solve([('bad', 3, False)]), None)\", \"check('fixture 4', solve([('a', 1, True)]), 'a')\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xh-pool-idle-selection-chooses-most-recently-used-healthy-socket","generated_at":"2026-09-29T14:38:14.819208+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic connection lifecycle model isolates the pool-idle-selection-chooses-most-recently-used-healthy-socket policy at a network component boundary.","root_cause":"The faulty implementation uses `max(sockets,key=lambda s:s[1],default=(None,))[0]` for the pool-idle-selection-chooses-most-recently-used-healthy-socket decision.","sha256":"285b140c4efec50ca6c0cfe5d963fc8045aa742848cdc7fca6847068e2b5d1d1","title":"Pool idle selection chooses most recently used healthy socket · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":43.009,"exit_code":1,"observations":[{"actual":null,"check":"fixture 2","expected":null,"passed":true},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":"a","check":"fixture 4","expected":"a","passed":true},{"actual":"a","check":"fixture 1","expected":"b","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.485,"exit_code":1,"observations":[{"actual":null,"check":"fixture 2","expected":null,"passed":true},{"actual":"bad","check":"fixture 3","expected":null,"passed":false},{"actual":"a","check":"fixture 4","expected":"a","passed":true},{"actual":"bad","check":"fixture 1","expected":"b","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": \"bad\", \"expected\": null, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": \"bad\", \"expected\": \"b\", \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}