{"abstract":"Dns srv priority is selected before weight.","category":"DNS resolution","checks":4,"contract":"Given records, draw, dns srv priority is selected before weight. Return the protocol decision or transformed value; fields are validated and fixtures state boundary outcomes.","contract_signature":"records, draw","evaluation_group":"xh-dns-srv-priority-is-selected-before-weight","failed_approach":"The attempted repair uses `min(records,key=lambda r:r[1],default=(None,))[0]` and still violates a separate fixture.","family":"xh-dns-srv-priority-is-selected-before-weight","id":"FA-7446","implementations":{"attempt":{"sha256":"9fc89b0df87dca87727a98f54c37f154cb9d4ae9909b22e9845ebacf2c5c55c5","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(records, draw):\n    return min(records,key=lambda r:r[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', 10, 1), ('b', 10, 3), ('bad', 20, 100)], 1), 'b')\", \"check('fixture 2', solve([('a', 10, 1), ('bad', 20, 100)], 0), 'a')\", \"check('fixture 3', solve([], 0), None)\", \"check('fixture 4', solve([('a', 0, 1)], 0), '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":"75a371ec80459996e1b7d4ecbdec438c93882e4bbc727da9abb85e0ed882338a","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(records, draw):\n    return max(records,key=lambda r:r[2],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', 10, 1), ('b', 10, 3), ('bad', 20, 100)], 1), 'b')\", \"check('fixture 2', solve([('a', 10, 1), ('bad', 20, 100)], 0), 'a')\", \"check('fixture 3', solve([], 0), None)\", \"check('fixture 4', solve([('a', 0, 1)], 0), '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-dns-srv-priority-is-selected-before-weight","generated_at":"2026-09-29T14:38:12.253625+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic dns resolution model isolates the dns-srv-priority-is-selected-before-weight policy at a network component boundary.","root_cause":"The faulty implementation uses `max(records,key=lambda r:r[2],default=(None,))[0]` for the dns-srv-priority-is-selected-before-weight decision.","sha256":"778fcd42e1d558dfaf7d170350669a0c941e3aadf79c5deee6afdb2e1e80c468","title":"Dns srv priority is selected before weight · 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":107.036,"exit_code":1,"observations":[{"actual":"a","check":"fixture 2","expected":"a","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\": \"a\", \"expected\": \"a\", \"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":53.833,"exit_code":1,"observations":[{"actual":"bad","check":"fixture 2","expected":"a","passed":false},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"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\": \"bad\", \"expected\": \"a\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"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."}}