Skip to content

ARCHITECTURE.md misses chunked hand-off, -auto-rate, retry pass, NS/MX/TXT #228

Closed

Description

@TMHSDigital

Summary

docs/ARCHITECTURE.md (and the matching lists in DEVELOPER_GUIDE.md) predate several engine changes: chunked job hand-off (#184), -auto-rate (#220), -retry-inconclusive (#217), NS/MX/TXT lookups (#194), and the once-per-run wordlist preparation (#182).

Where

  • docs/ARCHITECTURE.md:15, 87, 93, 118, 138, 154-164, 172, 209-215, 250, 317
  • docs/DEVELOPER_GUIDE.md:151, 368, 377 and the project tree
  • Code: internal/scan/runner.go:495, 691-693, 746-767, 773-786, 934-951, 1041-1043, internal/scan/dispatcher.go:189, internal/scan/autorate.go:51-60, internal/dns/resolver.go:275, 298, 371-391, 490, 506, internal/dns/takeover.go:142-147, main_session.go:377, 584

Details

  • Job hand-off (:156, :210-215, :250): the doc describes one job per channel send, with each worker signalling completion per job. The code sends chunks over buffered channels:
    jobs := make(chan []job, handoffPerWorker*workers)
    completed := make(chan []completion, handoffPerWorker*workers)
    maxChunk = 8, and workers report per chunk. A resume can therefore repeat up to one chunk per worker.
  • Notices / guard (:154, :160): NoticeRate is missing from the list. With AutoRate on, the reliability guard is skipped until six back-offs or the 5 q/s floor. -auto-rate is not mentioned anywhere in the doc.
  • Retry pass (:164, data-flow step 11): the second retryPending pass after wg.Wait() and Stats.Inconclusive are not described.
  • Record types (:138, :317): NS, MX and TXT are looked up too. HintsTakeover accepts CNAME or NS (dangling-ns). SARIF needs CNAME or NS, not only CNAME.
  • Wordlist (:15, :118, :87; DEVELOPER_GUIDE :151): the CLI no longer "calls Build per target". It runs wordlist.Prepare once, then Prepared.For(target) per target. Prepare/For/ReadLinesFrom are missing from the function lists.
  • File lists (:47-94, DEVELOPER_GUIDE tree): add main_dryrun.go, internal/scan/autorate.go, internal/dns/scope.go, internal/output/log.go, internal/cliargs/, and Permutations in the pkg exports.
  • Names: dns.FingerprintWildcard / dns.CheckWildcard / dns.ResolveTypes are methods on Lookup. CSV columns at :172 leave out takeover_candidate and change. DEVELOPER_GUIDE :368 shows -type A,AAAA,CNAME only.

Impact

Contributors reading the architecture doc get a wrong model of the dispatcher and rate control, the areas most likely to be touched next.

Acceptance criteria

  • ARCHITECTURE describes chunked hand-off, AutoRate, the retry pass and all six record types
  • Every file and function named in both docs exists under that name

Getting started


Filed by repo-audit/docs-audit at 1fcd5bc. Severity: medium. Effort: M. audit-key: documentation|docs/ARCHITECTURE.md|engine-drift-v0.10

Activity

  1. added
    documentation
    help wanted
    severity: medium
    on Nov 12, 2026
  2. TMHSDigital commented on Nov 12, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in 45bfade. ARCHITECTURE.md now covers:

    • the chunked, buffered hand-off (maxChunk 8, handoffPerWorker 4) and per-chunk completion reports
    • the -auto-rate controller and NoticeRate
    • the -retry-inconclusive pass
    • NS/MX/TXT lookups and dangling-ns, with SARIF needing CNAME or NS
    • wordlist Prepare/For
    • the CSV columns

    The file lists in ARCHITECTURE and DEVELOPER_GUIDE are updated, and Lookup methods are named as methods.

    Verified against internal/scan/runner.go, dispatcher.go, autorate.go, internal/dns/resolver.go, internal/wordlist/reader.go and internal/output/writer.go. Every path named in the file lists exists.

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

    documentationhelp wantedseverity: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions