Skip to content

refactor: tlim_int_refactor - #5003

Merged
TomOnTime merged 2 commits into
mainfrom
tlim_int_refactor
Oct 14, 2026
Merged

TomOnTime merged 2 commits into
mainfrom
tlim_int_refactor

Conversation

@TomOnTime

Copy link
Copy Markdown
Collaborator

Replace 566 record constructors across 18 standard DNS types with tr() calls containing zone-format RDATA. Convert 11 TTL wrappers to the existing withTTL() option, update the corresponding commented fixture steps, and remove 16 unused helpers.

Leave TXT, LOC, HTTPS/SVCB, OPENPGPKEY, provider-specific helpers, and two Unicode CNAME targets for follow-up. The equivalence check found that the old CNAME constructor converts Unicode targets to punycode while tr() currently preserves Unicode, so those two cases retain the old helper.

Validation:

  • go test ./... passes.
  • A temporary test used reflect.DeepEqual to compare the original and refactored makeTests() results, including all group filters, test expectations, record fields/RDATA, metadata, and unmanaged settings. All 16 combinations passed: four domain names (ordinary, nested, punycode, Unicode), two site settings, and option flags enabled/disabled.
  • The temporary baseline and comparison test were removed before committing.

@TomOnTime
TomOnTime merged commit b7e74b8 into main Oct 14, 2026
7 checks passed
@TomOnTime
TomOnTime deleted the tlim_int_refactor branch October 14, 2026 21:01
TomOnTime added a commit that referenced this pull request Oct 15, 2026
## Summary

Convert the remaining integration record fixtures with representable
zone-format data to `tr()`. This covers TXT quoting and chunk
boundaries, HTTPS/SVCB parameters, LOC, OPENPGPKEY, provider pseudo
types, and record metadata. Remove the constructors made unused by these
conversions and enable the existing `withMeta` option.

Keep four fixtures on typed constructors where `tr()` currently changes
the behavior under test: Unicode CNAME target normalization, a relative
ALIAS target, Cloudflare single-redirect expression escaping, and empty
MIKROTIK_NXDOMAIN RDATA. Each retained helper has a comment explaining
the parser difference. Unicode CNAME normalization will be addressed in
a separate production-code PR.

## Validation

- Compared complete `makeTests()` fixture structures with an independent
copy of the pre-change constructors across 16 combinations of domain,
site, and Cloudflare feature flags; all matched.
- `go test ./...` passed before rebasing onto the merged #5003 branch;
`go test ./integrationTest` passed after rebasing onto current `main`.
- `git diff --check origin/main...HEAD` passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant