Skip to content

Stale comments: per-job completion in runner.go, CNAME-only takeover column #233

Closed

Description

@TMHSDigital

Summary

Two code comments contradict what the code next to them does, both left behind by recent changes (#184, #194).

Where

  • internal/scan/runner.go:687-689 (comment above the jobs/completed channels)
  • internal/output/writer.go:159-160 (SetTakeoverColumn)

Details

  • runner.go says "each job still reports its own completion as soon as it is done". Since Dispatcher handshake serializes every job at about 260k jobs/s #184 a worker collects its chunk's completions and sends them in one completed <- done once the whole chunk is finished (runner.go:746-767). The comment at runner.go:148-150 and the CHANGELOG describe this correctly.
  • writer.go says the CLI sets the takeover column "when CNAME records are requested, the only case that yields hints". The CLI calls w.SetTakeoverColumn(dns.HintsTakeover(s.in.recordTypes)) (main_session.go:439), and HintsTakeover is true for CNAME or NS, because NS yields dangling-ns (Support NS, MX and TXT record types with a dangling-NS takeover hint #194).

Impact

Readers of the engine get a wrong picture of when completions arrive (which matters for the resume watermark) and of which record types produce takeover hints.

Suggested fix

Reword both comments to match the code. Comment-only change.

Acceptance criteria

  • Both comments describe the current behavior

Getting started

  • Relevant files: internal/scan/runner.go, internal/output/writer.go
  • How to run tests: go test ./...

Filed by repo-audit/fix-issues at 2ff594c. Severity: low. Effort: S. audit-key: documentation|internal/scan/runner.go|completed-comment

Activity

  1. added
    documentation
    good first issue
    severity: low
    on Nov 12, 2026
  2. TMHSDigital commented on Nov 12, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in 1be9a54. Both comments now match the code:

    • runner.go: a worker reports a whole chunk's completions in one send.
    • SetTakeoverColumn: CNAME or NS lookups yield hints, per dns.HintsTakeover.

    Comment-only change. Verified: go build ./..., go vet and golangci-lint pass on both packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationgood first issueseverity: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions