Skip to content

ARCHITECTURE.md and DEVELOPER_GUIDE.md describe APIs that no longer exist (sample test doesn't compile) #79

Closed

Description

@TMHSDigital

Why it matters

These are the docs a new contributor reads first. The DEVELOPER_GUIDE's example test doesn't compile, and it queries a real domain over the network, which contradicts the project's hermetic test approach. #64 covers the Pages landing site; this issue covers the developer docs.

Evidence

  • docs/ARCHITECTURE.md:43-57:
    • Describes flag.Parse()/flag.Arg(0); the code uses a FlagSet plus parseInterspersed.
    • Names validateDNSServer/validateDomain; these are now validate.DNSServer/validate.Domain.
  • §2.2 gives LoadWordlist(path) ([]string,int,error). The real signature is (path, domain) (entries, dup, skipped, err). It also omits ReadLines/Build/Normalize.
  • §2.3 shows ResolveTypes/ResolveDomainWithRetry taking dnsServer/verbose. They actually take *net.Resolver and Logf. The prose says resolution "outputs a boolean".
  • §2.6 references processedWords/foundSubdomains, which don't exist.
  • ARCHITECTURE.md:134 says the TUI config is saved "atomically with os.WriteFile", which isn't atomic (see CLI and TUI build scans separately and have drifted (skipped-entry count, seed, DNS validation, defaults) #80).
  • Both file trees omit internal/validate/, internal/dns/ratelimit.go, main_e2e_test.go, the TUI tests and tools/wordlist-gen_test.go. ARCHITECTURE never mentions -dL.
  • docs/DEVELOPER_GUIDE.md:150-185: the sample calls dns.ResolveDomain(ctx, domain, timeout, "8.8.8.8:53", false). The current signature is (ctx, *net.Resolver, domain, timeout, Logf).

Suggested approach

  • Rewrite the affected sections from the current code.
  • Regenerate the file trees (e.g. with tree -I _site).
  • Point the sample test at the hermetic test DNS server.
  • To prevent recurrence, keep signatures out of prose and link to pkg.go.dev or godoc instead.

Done when

Every identifier in both docs exists in the code, and the sample test compiles and passes when pasted into internal/dns.

Activity

  1. added
    documentation
    priority: medium
    area: docs
    on Oct 5, 2026
  2. added a commit that references this issue on Oct 5, 2026
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

    area: docsdocumentationpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions