Skip to content

fix: keep verbose and TUI diagnostics accurate - #336

Merged
TMHSDigital merged 1 commit into
TMHSDigital:mainfrom
laozhej:fix/diagnostics-and-stale-comments-329
Nov 15, 2026
Merged

TMHSDigital merged 1 commit into
TMHSDigital:mainfrom
laozhej:fix/diagnostics-and-stale-comments-329

Conversation

@laozhej

@laozhej laozhej commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #329.

Successful lookups without records now log No records with the requested record types instead of Failed to resolve ... Error: <nil>. TUI launch warnings go through the configured diagnostics writer, so -log-format json keeps every warning a JSON object.

The CLI retains its early argument check before input files are read and removes the duplicate call from validateFlags, documenting its precondition. The three stale comments now describe streamed JSON elements and the array being closed by Finish.

Regression coverage uses the in-process DNS server for NODATA, found records and real DNS errors, and checks both TUI warnings against the JSON diagnostic schema. Existing text-warning and argument-order tests are retained.

Validation on macOS arm64, Go 1.27.4:

  • Both new regressions fail on unchanged d0c56f0 with the reported nil-error and plain-text warning output.
  • Focused regression, text TUI, domain conflict and early argument-error tests pass after the fix.
  • go test -race ./... passes across all packages (SUBENUM_NETWORK_TESTS=0; no live targets).
  • make lint passes with golangci-lint 2.15.0, reporting 0 issues.

AI disclosure: OpenAI Codex prepared and tested this change.

@TMHSDigital
TMHSDigital merged commit f1e4d8c into TMHSDigital:main Nov 15, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading comments and small redundancies in the core path

2 participants