FAILURE MAP
← Case archive

FA-7371 / DNS resolution / Open access

Dns cache key includes query type · case 01

Dns cache key includes query type.

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

ROOT CAUSE

The faulty implementation uses `name.lower().rstrip(".")` for the dns-cache-key-includes-query-type decision.

VERIFIED REPAIR

Apply the explicit dns-cache-key-includes-query-type contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `(name,type_)` and still violates a separate fixture.

Case contract

Bounded offline decision model: dns cache key includes query type. 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-cache-key-includes-query-type 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, type_):
    return name.lower().rstrip(".")
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('EXAMPLE.', 1), ('example', 1))", "check('fixture 2', solve('example', 28), ('example', 28))", "check('fixture 3', solve('x', 1), ('x', 1))", "check('fixture 4', solve('X.', 15), ('x', 15))"]
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 2example['example', 28]Failed
fixture 3x['x', 1]Failed
fixture 4x['x', 15]Failed
fixture 1example['example', 1]Failed

SHA-256 / a6fe16407682a0e663667363a12ba10f8dd03ee747768f747ea78505313cdce9

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, type_):
    return (name,type_)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('EXAMPLE.', 1), ('example', 1))", "check('fixture 2', solve('example', 28), ('example', 28))", "check('fixture 3', solve('x', 1), ('x', 1))", "check('fixture 4', solve('X.', 15), ('x', 15))"]
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 2['example', 28]['example', 28]Passed
fixture 3['x', 1]['x', 1]Passed
fixture 4['X.', 15]['x', 15]Failed
fixture 1['EXAMPLE.', 1]['example', 1]Failed

SHA-256 / ab97b28e11afe85888776dfe29da51aaa1803113b90422cae80d883cf69066ce

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, type_):
    return (name.lower().rstrip("."),type_)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('EXAMPLE.', 1), ('example', 1))", "check('fixture 2', solve('example', 28), ('example', 28))", "check('fixture 3', solve('x', 1), ('x', 1))", "check('fixture 4', solve('X.', 15), ('x', 15))"]
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 2['example', 28]['example', 28]Passed
fixture 3['x', 1]['x', 1]Passed
fixture 4['x', 15]['x', 15]Passed
fixture 1['example', 1]['example', 1]Passed

SHA-256 / 23232dd0a23cd80c5568204ab6f8d45026782f4acfa42562ce35808e11378678

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

Case digest / 9845bc00333d1a3ed48a8044c7debde5b635a50e564ca018bf833d2b023d1d2f