FA-7346 / DNS resolution / Open access
Dns nxdomain is distinct from empty noerror answer · case 01
Dns nxdomain is distinct from empty noerror answer.
ROOT CAUSE
The faulty implementation uses `'name-error' if not answers else 'answer'` for the dns-nxdomain-is-distinct-from-empty-noerror-answer decision.
VERIFIED REPAIR
Apply the explicit dns-nxdomain-is-distinct-from-empty-noerror-answer contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `'nodata' if not answers else 'answer'` and still violates a separate fixture.
Case contract
Bounded offline decision model: dns nxdomain is distinct from empty noerror answer. 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-nxdomain-is-distinct-from-empty-noerror-answer 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(rcode, answers):
return 'name-error' if not answers else 'answer'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, []), 'name-error')", "check('fixture 2', solve(0, []), 'nodata')", "check('fixture 3', solve(0, ['a']), 'answer')", "check('fixture 4', solve(3, ['a']), 'name-error')"]
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 | name-error | nodata | Failed |
| fixture 3 | answer | answer | Passed |
| fixture 4 | answer | name-error | Failed |
| fixture 1 | name-error | name-error | Passed |
SHA-256 / 5934c78c0a8b5ae1a5311149f7b90a4d9ea55850988ebb17d9569e5e1c63c1c4
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(rcode, answers):
return 'nodata' if not answers else 'answer'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, []), 'name-error')", "check('fixture 2', solve(0, []), 'nodata')", "check('fixture 3', solve(0, ['a']), 'answer')", "check('fixture 4', solve(3, ['a']), 'name-error')"]
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 | nodata | nodata | Passed |
| fixture 3 | answer | answer | Passed |
| fixture 4 | answer | name-error | Failed |
| fixture 1 | nodata | name-error | Failed |
SHA-256 / e88ef6548d67cf2afbe709c324f9596fa35bc90f837483ec3e24ddadd121197b
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(rcode, answers):
return 'name-error' if rcode == 3 else ('answer' if answers else 'nodata')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, []), 'name-error')", "check('fixture 2', solve(0, []), 'nodata')", "check('fixture 3', solve(0, ['a']), 'answer')", "check('fixture 4', solve(3, ['a']), 'name-error')"]
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 | nodata | nodata | Passed |
| fixture 3 | answer | answer | Passed |
| fixture 4 | name-error | name-error | Passed |
| fixture 1 | name-error | name-error | Passed |
SHA-256 / 3d8184793b4c2d2e7e40cfe3f3bd45024f5b154f24f226dda6678f6826afa4a8
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:10.903374+00:00.
Case digest / 377116ec9992f68635b1a47ddf4de6f0c94e8ca9e27b431888440bb997bd8e9b