Skip to content

refactor(cloudmock-dns): rename domainConfig.Autotend → Primary#50

Merged
Viridian-Inc merged 1 commit into
mainfrom
chore/finish-brand-leak-cleanup
May 2, 2026
Merged

refactor(cloudmock-dns): rename domainConfig.Autotend → Primary#50
Viridian-Inc merged 1 commit into
mainfrom
chore/finish-brand-leak-cleanup

Conversation

@Viridian-Inc
Copy link
Copy Markdown
Owner

Summary

Last remaining brand-leak in non-test Go. `tools/cloudmock-dns/main.go` owned a `domainConfig` struct field named `Autotend` (with default value `cloudmock.app`), and `parsePulumiConfig` read the primary domain from a YAML key called `autotend`.

  • `domainConfig.Autotend` → `Primary`. All call sites updated.
  • `parsePulumiConfig` accepts `primary` as canonical, falls back to `autotend` for backwards compat with existing autotend-infra Pulumi configs.
  • Three new test cases pin the legacy alias, the precedence when both keys are set, and the renamed canonical case.

Closes #49.

Out of scope

The remaining `autotend` mentions in non-test Go (a parser example comment in `pkg/iac/pulumi.go` and the alias-justification comment in `pkg/gateway/proxy.go`) are accurate descriptive context — left as-is.

Test plan

  • `go build ./...`
  • `go test ./tools/cloudmock-dns/...` — green, including the three new cases
  • `go vet ./tools/cloudmock-dns/...`

🤖 Generated with Claude Code

Last remaining brand-leak in non-test Go: tools/cloudmock-dns owned the
helper that reads domain config from a Pulumi YAML, with the field name
"Autotend" even when the value defaulted to cloudmock.app. Rename to
Primary to match the rest of the codebase post-#36/#38/#42/#46.

- domainConfig.Autotend → Primary; all call sites updated.
- parsePulumiConfig accepts "primary" as the canonical YAML key, falls
  back to "autotend" for backwards compat with existing autotend-infra
  Pulumi configs that still pass that key.
- sortedDomains pair key updated from "cloudmock" (which was duplicated
  for both rows) to "primary" for the primary entry.
- Three new test cases:
  - TestParsePulumiConfig_LegacyAutotendKey — verifies the alias works.
  - TestParsePulumiConfig_PrimaryWinsOverLegacy — verifies precedence
    when both are set.
  - Existing TestParsePulumiConfig updated to use the new "primary" key.

The remaining "autotend" mentions in non-test Go (a parser example
comment in pkg/iac and the alias-justification comment in
pkg/gateway/proxy.go) are accurate descriptive context for historical
input shapes / importers — left as-is.

Closes #49

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Viridian-Inc Viridian-Inc merged commit 576f495 into main May 2, 2026
2 checks passed
@Viridian-Inc Viridian-Inc deleted the chore/finish-brand-leak-cleanup branch May 2, 2026 15:40
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.

cloudmock-dns: rename domainConfig.Autotend → Primary, accept primary YAML key

1 participant