mirror of
https://github.com/Such-Software/adaptive-multi-protocol-gateway.git
synced 2026-10-17 15:41:41 +02:00
A live zone was unreadable for two reasons, and the second was hidden behind the first. The TTL arrives as a string. "300" failed isinstance(ttl, int), while the write path already coerced the same value with int(record.ttl): reading was stricter than writing, so we refused zones we were perfectly capable of writing. A bool is now excluded explicitly, because True is an int in Python and would have been read as a TTL of 1 and then rejected for being out of range rather than for being a bool. Records arrive as record_value1 and are written back as value1. The reader knew only the write spelling, the one it never receives, so every record on a real zone came back incomplete. Both are accepted, response spelling first. Either alone makes every Dynadot zone unreadable, which is why neither had been noticed: no Dynadot zone had ever been read successfully. This matters more than a parse error usually would. set_hosts replaces the whole zone with what the caller passes, so a value the reader drops is a record deleted from a live domain. The test is shaped from an actual response rather than from the documentation, and asserts that all six records survive with their values intact, including an MX preference and a record type as unusual as STEALTH.