Skip to content

fix(iot-client): point the UEAZ ATOP fallback at a host that exists - #31

Merged
sedawwk merged 1 commit into
masterfrom
fix/ueaz-atop-host
Aug 31, 2026
Merged

fix(iot-client): point the UEAZ ATOP fallback at a host that exists#31
sedawwk merged 1 commit into
masterfrom
fix/ueaz-atop-host

Conversation

@heshaoqiong-tuya

Copy link
Copy Markdown
Collaborator

IOT_UEAZ_HOST shipped as a1-ueaz.tuyaeu.com, which is NXDOMAIN — US-East lives under tuyaus.com, not tuyaeu.com. The name has never resolved, so the whole US-East ATOP fallback path was dead: whenever IoT-DNS answered POST /v2/url_config without an httpsUrl, iot_region_to_host(UEAZ, PROD) handed back a name no resolver can answer and the device had nowhere to go. The sibling constants show what the intent was — IOT_AZ_HOST is a1.tuyaus.com and IOT_UEAZ_PRE_HOST is a1-ueaz.wgine.com; only the prod UE entry drifted into the EU domain, and it has been wrong since the initial commit.

Probed 2026-08-31: a1-ueaz.tuyaeu.com NXDOMAIN, a1-ueaz.tuyaus.com resolves to 35.212.96.105. a1-ueaz.wgine.com resolves too, but to 100.64.3.152 — RFC 6598 shared address space, reachable only from inside Tuya, which is right for the PRE constant and wrong for PROD.

Nothing asserts the constant's value: dns_test.c's PROD mapping test compares iot_region_to_host() against IOT_UEAZ_HOST itself, so it passes either way. That is deliberate — the test guards against a region falling through to the China default, not against a typo in the host — and a test pinning the literal would just restate the header. The failure is only visible against real DNS, which is why AGENTS.md carries the measured facts; its UEAZ note is updated here to say the name was repointed rather than that the path is still dead.

Verified: full ctest suite 15/15 on a clean worktree carrying only this commit.

IOT_UEAZ_HOST shipped as a1-ueaz.tuyaeu.com, which is NXDOMAIN — US-East lives
under tuyaus.com, not tuyaeu.com. The name has never resolved, so the whole
US-East ATOP fallback path was dead: whenever IoT-DNS answered POST
/v2/url_config without an httpsUrl, iot_region_to_host(UEAZ, PROD) handed back
a name no resolver can answer and the device had nowhere to go. The sibling
constants show what the intent was — IOT_AZ_HOST is a1.tuyaus.com and
IOT_UEAZ_PRE_HOST is a1-ueaz.wgine.com; only the prod UE entry drifted into the
EU domain, and it has been wrong since the initial commit.

Probed 2026-08-31: a1-ueaz.tuyaeu.com NXDOMAIN, a1-ueaz.tuyaus.com resolves to
35.212.96.105. a1-ueaz.wgine.com resolves too, but to 100.64.3.152 — RFC 6598
shared address space, reachable only from inside Tuya, which is right for the
PRE constant and wrong for PROD.

Nothing asserts the constant's value: dns_test.c's PROD mapping test compares
iot_region_to_host() against IOT_UEAZ_HOST itself, so it passes either way. That
is deliberate — the test guards against a region falling through to the China
default, not against a typo in the host — and a test pinning the literal would
just restate the header. The failure is only visible against real DNS, which is
why AGENTS.md carries the measured facts; its UEAZ note is updated here to say
the name was repointed rather than that the path is still dead.

Verified: full ctest suite 15/15 on a clean worktree carrying only this commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sedawwk
sedawwk merged commit 3556669 into master Aug 31, 2026
4 checks passed
heshaoqiong-tuya added a commit that referenced this pull request Sep 2, 2026
The Unreleased entry said (#32), the number the fix was expected to get. It
merged as #31 (squash commit 3556669) and #32 does not exist yet, so the one
link from the one-line entry back to its reasoning pointed at nothing.

Also adds the trailing newline AGENTS.md was missing. Whitespace only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

2 participants