Skip to content

Commit 63a5998

Browse files
committed
chore(testbed): make smoke_edns.sh self-contained + verified end-to-end
- Pre-install tcpdump in agents/Dockerfile so smoke_edns.sh doesn't need external network access at runtime (the testbed agent containers are intentionally pinned to the internal DNS topology with no upstream resolver, so apt-get install at smoke time can't fetch packages). - Update the smoke_edns.sh probe call to use the new v2 CLI flags (--realm / --transport / --min-trust / --intent-class / --parallelism / --deadline-ms), matching the two-axis selector taxonomy. - Tighten the result-check shell logic so `set -euo pipefail` doesn't bail early when grep doesn't find the marker on a real failure. End-to-end verified locally against bind-orga (stock BIND9 9.20). The agent-hint OPT record (code 0xff96 = 65430) reaches the authoritative on all three discovery query paths — index TXT, SVCB, capabilities TXT — and the wire payload matches the design doc bit-for-bit: 0xff96 (option-code) 0x002b (length=43) 0x00 (VERSION) 0x06 (SELECTOR-COUNT) 01 04 "prod" realm 02 03 "mcp" transport 04 06 "signed" min_trust 10 0a "invocation" client_intent_class 12 01 "4" parallelism 13 05 "30000" deadline_ms Stock BIND9 returns the answer set without an AgentHintEcho — correct behaviour for an inert-to-the-option authoritative, and the client's "no upstream filtering happened" fallback path engages cleanly. Signed-off-by: Layer8 <NWillAU900@gmail.com>
1 parent 8fe0bb5 commit 63a5998

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

tests/testbed/agents/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM python:3.12-slim@sha256:ec948fa5f90f4f8907e89f4800cfd2d2e91e391a4bce4a6afa7
33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
dnsutils \
55
curl \
6+
tcpdump \
67
&& rm -rf /var/lib/apt/lists/*
78

89
WORKDIR /app

tests/testbed/smoke_edns.sh

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,37 @@ docker compose ps --status running | grep -q bind-orga || docker compose up -d b
2626

2727
echo
2828
echo "--- [2] Start tcpdump on agent-a (background) ---"
29-
# 0xff96 in hex == 65430 decimal == AGENT_HINT_OPTION_CODE
30-
# Capturing for 5 seconds is plenty to see two probe calls.
29+
# 0xff96 in hex == 65430 decimal == AGENT_HINT_OPTION_CODE.
30+
# Capturing 20 packets is plenty to see one probe call's worth of queries.
31+
# tcpdump is pre-installed by the agent Dockerfile.
3132
docker exec -d agent-a bash -c \
32-
'apt-get install -y -q tcpdump 2>/dev/null || true; tcpdump -i any -nn -X -c 20 host 172.28.0.10 and port 53 > /tmp/edns_capture.txt 2>&1 &'
33+
'tcpdump -i any -nn -X -c 20 host 172.28.0.10 and port 53 > /tmp/edns_capture.txt 2>&1'
3334
sleep 1
3435

3536
echo
3637
echo "--- [3] Run edns-probe with experimental flag on ---"
3738
docker exec -e DNS_AID_EXPERIMENTAL_EDNS_HINTS=1 agent-a \
3839
dns-aid edns-probe orga.test \
39-
--capabilities=chat,code \
40-
--intent=summarize \
41-
--transport=mcp \
42-
--auth-type=bearer \
40+
--realm prod \
41+
--transport mcp \
42+
--min-trust signed \
43+
--intent-class invocation \
44+
--parallelism 4 \
45+
--deadline-ms 30000 \
4346
--show-wire
4447

4548
echo
4649
echo "--- [4] Capture results ---"
4750
sleep 2
48-
docker exec agent-a cat /tmp/edns_capture.txt 2>/dev/null | head -80 || \
49-
echo " (tcpdump may not have been installed; install it inside the agent-a container manually)"
51+
docker exec agent-a cat /tmp/edns_capture.txt 2>/dev/null | head -80 || true
5052

5153
echo
5254
echo "--- [5] Look for the agent-hint option code (0xff96) in the capture ---"
53-
docker exec agent-a grep -i "ff96\|ff 96" /tmp/edns_capture.txt 2>/dev/null && \
54-
echo " ✓ agent-hint option code 0xff96 (=65430) appeared on the wire" || \
55+
if docker exec agent-a grep -qi "ff96\|ff 96" /tmp/edns_capture.txt; then
56+
echo " ✓ agent-hint option code 0xff96 (=65430) appeared on the wire"
57+
else
5558
echo " ✗ option code not found in capture — feature flag set? tcpdump captured the right packets?"
59+
fi
5660

5761
echo
5862
echo "=== smoke_edns.sh complete ==="

0 commit comments

Comments
 (0)