FA-7411 / DNS resolution / Open access
Dns ndots threshold selects absolute query first · case 01
Dns ndots threshold selects absolute query first.
ROOT CAUSE
The faulty implementation uses `name.count(".") > ndots` for the dns-ndots-threshold-selects-absolute-query-first decision.
VERIFIED REPAIR
Apply the explicit dns-ndots-threshold-selects-absolute-query-first contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `"." in name` and still violates a separate fixture.
Case contract
Bounded offline decision model: dns ndots threshold selects absolute query first. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.
Why this case matters
This deterministic dns resolution model isolates the dns-ndots-threshold-selects-absolute-query-first 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(name, ndots):
return name.count(".") > ndots
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('a.b', 1), True)", "check('fixture 2', solve('a.b', 2), False)", "check('fixture 3', solve('a', 0), True)", "check('fixture 4', solve('a', 1), 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 | False | False | Passed |
| fixture 3 | False | True | Failed |
| fixture 4 | False | False | Passed |
| fixture 1 | False | True | Failed |
SHA-256 / 98c2be2767e62cc1dc069f3bbe5d462787734f292c4ff48e6b7ccfc8c718579c
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(name, ndots):
return "." in name
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('a.b', 1), True)", "check('fixture 2', solve('a.b', 2), False)", "check('fixture 3', solve('a', 0), True)", "check('fixture 4', solve('a', 1), 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 | True | False | Failed |
| fixture 3 | False | True | Failed |
| fixture 4 | False | False | Passed |
| fixture 1 | True | True | Passed |
SHA-256 / 1f0be0715aa5379ae220b9a158374fd0c94c84b0a5bc7c93db9efb759b706012
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(name, ndots):
return name.count(".") >= ndots
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('a.b', 1), True)", "check('fixture 2', solve('a.b', 2), False)", "check('fixture 3', solve('a', 0), True)", "check('fixture 4', solve('a', 1), 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 | False | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 1 | True | True | Passed |
SHA-256 / 956b632cf8532b5a70a36374d6abef0c118bdf476f160f6905dd8c3c33e90982
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:11.606824+00:00.
Case digest / add4072f12af70a719af6fbd63b4315b53b526f6ccafd4388e97b11717fba2f9