Skip to content

FIX: replace previous multi-aware instance when host is empty (#54) - #55

Merged
pawel-kow merged 2 commits into
masterfrom
fix/issue-54-multi-replace-empty-host
Sep 25, 2026
Merged

pawel-kow merged 2 commits into
masterfrom
fix/issue-54-multi-replace-empty-host

Conversation

@pawel-kow

Copy link
Copy Markdown
Member

Fixes #54

Problem

In process_records with multi_aware=True and multi_instance=False, records from a previous instance of the same template are marked _replace. The guard used a truthiness check on host. When a template was applied at the apex with host="", the check failed, so the previous instance was never replaced.

The A-record variant didn't show the bug, because the A conflict rule deletes the old record anyway. TXT with txtConflictMatchingMode: None relies entirely on _replace, so the old record survived.

Changes

  • Tests: the multi-aware tests in process_records_tests.yaml now use host: "" in the input and in _dc. multi_reapply_txt_without_multi_instance failed before the fix.
  • Fix: in DomainConnectImpl.py, host and ... becomes host is not None and ..., so an empty host is compared against _dc.host.

All 370 tests pass.

Out of scope

_dc.host stores the raw host value, so an instance applied with "@" doesn't match one applied with "". That relates to #53 and #43.

🤖 Generated with Claude Code

pawel-kow and others added 2 commits September 25, 2026 21:09
Switch multi-aware process_records tests to host "" (apex). This exposes
that previous instances are not replaced when host is empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #54

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pawel-kow
pawel-kow merged commit 6a52c26 into master Sep 25, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-aware re-apply does not replace previous instance when host is empty (apex)

1 participant