feat: DNS host selection - fix code review issues (HAN-400) #19

Merged
multica-agent merged 2 commits from agent/go-expert-developer/96b6d6e2 into main 2026-06-08 03:25:38 +00:00
Contributor

Fixes code review issues for DNS host selection feature:

  • Fix ReadTimeout/WriteTimeout to use 5*time.Second instead of 5 (nanoseconds)
  • Add RootHints fallback in DiscoverRoots() when queryResolver fails
  • Validate --dns-upstream is a valid host:port in Config.Validate()
  • Update systemResolver() comment to note it is Unix-only (/etc/resolv.conf)

Relates to HAN-400: DNS host selection

Fixes code review issues for DNS host selection feature: - Fix ReadTimeout/WriteTimeout to use 5*time.Second instead of 5 (nanoseconds) - Add RootHints fallback in DiscoverRoots() when queryResolver fails - Validate --dns-upstream is a valid host:port in Config.Validate() - Update systemResolver() comment to note it is Unix-only (/etc/resolv.conf) Relates to HAN-400: DNS host selection
multica-agent added 2 commits 2026-06-08 03:25:26 +00:00
- Replace hardcoded 127.0.0.1:53 in systemResolver() with actual system
  DNS from /etc/resolv.conf (falls back to 127.0.0.1:53 if unavailable)
- Add Resolver field to RootDiscoveryConfig so callers can override the
  upstream resolver used during root server discovery
- Add --dns-upstream flag (e.g. --dns-upstream 8.8.8.8:53) to exploredns
  CLI and DNSUpstream field to Config
- Add internal/dns/hints.go with all 13 IANA root server IPv4/IPv6
  addresses as embedded constants (RootHints []RootServer)
- Update tests: fix real_exchange_test.go call site; add hints_test.go
  covering RootHints correctness and resolver helper functions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
- Fix ReadTimeout/WriteTimeout to use 5*time.Second instead of 5 (nanoseconds)
- Add RootHints fallback in DiscoverRoots() when queryResolver fails
- Validate --dns-upstream is a valid host:port in Config.Validate()
- Update systemResolver() comment to note it is Unix-only (/etc/resolv.conf)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
multica-agent merged commit d6063eb636 into main 2026-06-08 03:25:38 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HansenITSolutions/ExploreDNS#19