Commit Graph
7 Commits
Author SHA1 Message Date
beefaf44e0 output: distinguish nameserver resolution failures from domain errors
When an in-bailiwick nameserver cannot be resolved (no glue records and
iterative resolution fails), the traversal previously returned a generic
RespError. This made the Results section show many identical '6.7%
resulted in an error' lines and the Summary show '100% resulted in an
error' — even though the domain itself may be perfectly reachable in
practice via glue held by the registry.

Add a new RespNSResolutionFailed response type (string: ns_error)
for this specific case. Changes:

- traverse/response.go: add RespNSResolutionFailed, include it in
  IsTerminal() and String()
- traverse/traverser.go: use RespNSResolutionFailed with a descriptive
  ErrorMessage when ResolveNS fails in processReferral
- output/stats.go: map ns_error to nameserver lookup failed in
  summaryTypeLabel
- output/text.go: handle RespNSResolutionFailed in formatResultLine

Before:
  Results:     6.7% resulted in an error (x15)
  Summary:   100% resulted in an error

After:
  Results:     6.7% nameserver ns-a.hansenits.com.au could not be resolved (x15)
  Summary:   100% nameserver lookup failed

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-08 15:43:47 +10:00
dd667f734c fix: remove duplicate test declarations from PR #12/#13 conflict
CI / test (push) Has been cancelled
Phase 4.2 (PR #12) and test coverage improvement (PR #13) independently
added overlapping test functions. Remove duplicates from PR #13 files:

- internal/dns/iterative_test.go: remove TestExtractNSNames,
  TestExtractNSNamesEmpty, TestIterativeQueryWithExchangeSuccess,
  TestIterativeQueryWithExchangeNilResponse, TestIterativeQueryWithExchangeTCPFallback
  (kept in roots_test.go and query_test.go from PR #12)
- internal/output/coverage_test.go: remove TestRRDataStringDefault,
  TestContainsString, TestCollectUniqueServerIPs, TestNewFormatterNilWriter
  (kept in stats_test.go and formatter_test.go from PR #12)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-08 04:30:06 +10:00
dbd9322a1b test: merge PR #13 test coverage improvements into main
Resolves merge conflicts between Phase 4.2 comprehensive test suite and
the test coverage improvement branch:
- config_test.go: take PR's better table-driven tests + keep main's extra tests
- coverage_test.go: keep main's Phase 4.2 comprehensive tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-08 04:24:56 +10:00
ee20ed51f6 docs: comprehensive documentation for HAN-387
CI / test (pull_request) Failing after 1m19s
- README.md: full project overview, installation, quick start, CLI reference,
  output format descriptions, architecture overview, and dnstraverse comparison
- GoDoc: package-level documentation for traverse, dns, config, output, and
  fingerprint packages
- GoDoc: TraverserConfig and TraversalResult type comments in traverser.go

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-08 04:05:15 +10:00
45e15297f4 test: improve coverage to >80% on all core packages
CI / test (pull_request) Failing after 2m11s
Add comprehensive test coverage for internal packages:

- internal/config: 66.2% → 98.5%
- internal/dns: 67.8% → 84.3%
- internal/output: 48.8% → 89.1%
- internal/traverse: 56.3% → 86.9%

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-08 03:57:29 +10:00
8e7beacc22 fix: address code review issues on PR #9
CI / test (pull_request) Waiting to run
- gofmt main.go to fix tab indentation in main() body
- stats.go ComputeSummary: return nil when Answers and ByType are empty
- dns/types.go: remove duplicate ParseQueryType (dead code)
- formatter.go: log hook errors to stderr when Debug > 0; add Debug to Config
- text.go referralID: remove redundant depth==0 branch
- text.go writeServers: remove version lookup placeholder string

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-08 02:32:58 +10:00
Gary Hansenandmultica-agent 5a54834c5f feat: implement output formatting and display (HAN-383)
CI / test (pull_request) Failing after 2m2s
Add text and JSON formatters with real-time progress via traverser hooks,
summary statistics, and CLI integration for --show-* and --json flags.

Co-authored-by: multica-agent <github@multica.ai>
2026-06-08 02:21:13 +10:00