You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI copies the CLI's source-merge, permutation and report logic #347
internal/tui/passes.go (#274) holds a compact copy of the CLI's passive-source merge, permutation-candidate and report code instead of sharing it, so a fix in one front end can miss the other. Separately, internal/cli/axfr.go keeps a "no name servers found" branch that cannot run.
internal/cli/axfr.go (the len(servers) == 0 branch)
Details
Several of today's fixes (#273 sources, #298 permutation report, #321 allocation) had to be made twice, once per front end. The axfr branch is unreachable because LookupNS returns an error for a NOERROR answer with no NS records (#303's test asserts the error text instead).
Suggested fix
Move the candidate bookkeeping (candidates, permutation candidates, the pass's report entry) into a shared internal package used by both front ends; drop the unreachable branch or map the not-found error to its wording.
Acceptance criteria
One implementation of source merging and permutation candidates
No unreachable branch in axfr.go
Getting started
How to run tests: make test (or go test ./...). Tests must stay hermetic: use -simulate, -simulate-zone or the local DNS test server, never a live domain.
Related docs: docs/DEVELOPER_GUIDE.md, docs/ARCHITECTURE.md
Filed by repo-audit/fix-issues at 637a950. Severity: low. Effort: M. audit-key: tech-debt|internal/tui/passes.go|duplication
The axfr part is done in a5373d6: the unreachable len(servers) == 0 wording is now used for a not-found NS lookup (no NS records, or NXDOMAIN), and other errors keep "name server lookup failed". Verified: TestE2EZoneTransferNSLookupFails expects the new wording for the no-NS case and has a new NXDOMAIN case; go test ./internal/cli ./pkg/... and golangci-lint v2.15.0 pass.
Still open: one shared implementation of source merging, permutation candidates and the pass's report entry for the CLI and the TUI (internal/tui/passes.go vs internal/cli/ct.go, permute.go, summary.go).
The shared-code part is done in 32bde28: the new internal/candidates package (candidate set, source labels, RelativeSeeds, Permutations) and report.Permutation (the pass's report entry and verdict) are used by both the CLI and the TUI, and both copies are gone. The TUI copy had drifted: its permutation step still built a wordlist-sized skip map, which this removes. Verified: the moved unit tests (TestSet, TestNoWordlistSizedMap, TestPermutationsRespectNameLength) and the CLI and TUI suites pass; go test -race ./... and golangci-lint v2.15.0 pass. Both acceptance criteria are now met.
Activity
AXFR: word a not-found NS lookup as "no name servers" (#347)
TMHSDigital commentedon Nov 15, 2026
The
axfrpart is done in a5373d6: the unreachablelen(servers) == 0wording is now used for a not-found NS lookup (no NS records, or NXDOMAIN), and other errors keep "name server lookup failed". Verified:TestE2EZoneTransferNSLookupFailsexpects the new wording for the no-NS case and has a new NXDOMAIN case;go test ./internal/cli ./pkg/...and golangci-lint v2.15.0 pass.Still open: one shared implementation of source merging, permutation candidates and the pass's report entry for the CLI and the TUI (
internal/tui/passes.govsinternal/cli/ct.go,permute.go,summary.go).TMHSDigital commentedon Nov 15, 2026
The shared-code part is done in 32bde28: the new
internal/candidatespackage (candidate set, source labels,RelativeSeeds,Permutations) andreport.Permutation(the pass's report entry and verdict) are used by both the CLI and the TUI, and both copies are gone. The TUI copy had drifted: its permutation step still built a wordlist-sized skip map, which this removes. Verified: the moved unit tests (TestSet,TestNoWordlistSizedMap,TestPermutationsRespectNameLength) and the CLI and TUI suites pass;go test -race ./...and golangci-lint v2.15.0 pass. Both acceptance criteria are now met.Share candidate and permutation code between CLI and TUI (TMHSDigital…