Skip to content

refactor: remove the Betty naming (#549) - #550

Merged
scttfrdmn merged 1 commit into
mainfrom
refactor/549-remove-betty-naming
Aug 3, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
refactor/549-remove-betty-naming

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Closes #549

Per the user's request: the name refers to an unrelated project, so remove it — internally outright, and behind a deprecation schedule where it is externally facing.

Why it mattered

Nobody reading this repository could learn what "Betty" designated, and it was not confined to internals: docs/services.md advertised a Betty CFN resource types section for every one of 65 plugins, so the name was in the public documentation of the whole service surface. A reader grepping for CloudFormation deployment did not find betty_cfn.go.

What was externally facing

Measured rather than assumed. Two exported identifiers carried the name: emulator.BettyClient and emulator.NewBettyClient. Intent, DeployResult, DeployedResource, ValidationReport, DebugSession, StackDeployer and every method were already neutrally named. So the deprecation surface is two symbols and everything else renames outright.

The deprecation

BettyClient is now a type alias for Client, not a defined type:

type BettyClient = Client

That distinction is the whole point. An alias means a consumer holding both a *BettyClient and a *Client, or passing one where the other is expected, keeps compiling for the entire deprecation window; a defined type would have made the rename a breaking change wearing a deprecation's clothes. Since both spellings compile in isolation, nothing but a test catches the difference — TestClient_DeprecatedBettyAliasesStillWork passes the deprecated type through a function declared to take the new one and back, so re-declaring it as type BettyClient Client stops the build. It also deploys through the deprecated constructor, so the old path is exercised rather than merely compiled.

Both are marked // Deprecated: naming the replacement and the removal release, so staticcheck flags a consumer's use without breaking their build. Removal is at v1.0.0 — the only point a Go module can drop an exported symbol without breaking the import path for every consumer, which is why removal is tied to that rather than to a date.

The renames

Before After
betty.go client.go
betty_cfn.go cfn_deployer.go
betty_report.go validation_report.go
betty_debug.go debug_session.go
betty_cfn_{delete,rollback,yaml,…}*.go cfn_*
betty_cfn_vNN_plugins.go cfn_resources_vNN.go
examples/betty_workflow/ examples/validation_workflow/

All 35 files moved with git mv, so git log --follow and git blame still reach each file's history — worth checking in the "Files changed" view, which shows them as renames rather than delete/add pairs.

On the vNN suffix, which the issue left open: it stays. Those files are named for the substrate release that added them, and several releases touched overlapping services — RDS appears in two files, EC2 in two — so renaming by service would mean merging file contents. That is a refactor, not a rename, and putting it in this diff would make the diff unreviewable. Instead each file now opens with a header naming the services it holds, which is what the file name could not:

// cfn_resources_v41.go holds the StackDeployer.deployResource helpers for
// EC2 (Elastic IPs and NAT gateways).
// The name records the substrate release that added them (v0.41.0) rather than the
// services, because several releases touched overlapping services; …

Also renamed: the generated-docs heading is now CloudFormation resource types (32 occurrences — hand-written outside the generator's markers, so docs/services.md is edited directly and make docs-reference-check stays clean), plus README.md, docs/fidelity.md, examples/README.md, emulator/doc.go's Quick Start, and every stale filename reference in a comment.

The area: betty GitHub label was renamed in place to area: cloudformation with gh label edit, which preserves it on the issues already carrying it — deleting and recreating would not.

Deliberately left alone

CHANGELOG.md and the "v0.6.0 — Betty integration" option in .github/ISSUE_TEMPLATE/feature_request.yml. Both are historical records; rewriting a release label in a dropdown would make past issues unmatchable. grep -ril betty over the repository now returns only those two and the deprecation aliases themselves.

This is a pure rename

No behaviour change rides along, so the diff reads as a rename and a bisect across it cannot land on a mixed commit. #371 (flat-package growth) touches the same files and should be sequenced after this, not merged with it.

Verification

gofmt -l ., go build ./..., go vet ./..., golangci-lint run ./... → 0 issues, make test (race), make docs-reference docs-reference-check docs-versions, npm --prefix docs run build, go vet -C test/e2e ./..., go test -C test/e2e ./.... The renamed example was also run end to end (go run examples/validation_workflow/main.go) and prints its validation report.

Compatibility

Nothing breaks for a consumer. emulator.BettyClient and emulator.NewBettyClient still compile and still work; they emit a deprecation notice and go at v1.0.0. Anyone parsing docs/services.md by its ### Betty CFN resource types heading needs the new text.

The name referred to an unrelated project and said nothing about what the
code does, so no reader could learn its meaning from this repository —
while it appeared in the public documentation of all 65 plugins, since
docs/services.md advertised a "Betty CFN resource types" section per
service.

Thirty-five emulator/betty*.go files are renamed for what they contain
(betty.go -> client.go, betty_cfn.go -> cfn_deployer.go, betty_report.go
-> validation_report.go, betty_debug.go -> debug_session.go), as is
examples/betty_workflow/. Every rename is a git mv, so --follow and blame
still reach each file's history.

Only two exported identifiers carried the name. BettyClient is now a type
alias for Client, not a defined type, so a consumer holding both
spellings keeps compiling; NewBettyClient is a one-line wrapper. Both are
marked Deprecated and go at v1.0.0, the only point a Go module can drop
an exported symbol without breaking the import path.

Pure rename: no behaviour change, so a bisect over it cannot land on a
mixed commit.

Closes #549
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 72ec801 into main Aug 3, 2026
16 checks passed
@scttfrdmn
scttfrdmn deleted the refactor/549-remove-betty-naming branch August 9, 2026 17:48
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.

refactor: remove the Betty naming, which refers to an unrelated project

1 participant