Skip to content

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

Closed

Description

@scttfrdmn

The problem

The codebase carries the name Betty throughout — 35 files under emulator/betty*.go, 93 occurrences in Go source, the Betty CFN resource types heading repeated ~40 times in docs/services.md, and 8 lines of README.md. It refers to another, unrelated project. Nothing in substrate's own model needs the name: the code behind it is CloudFormation template deployment, cost/quota validation of a recorded run, and a time-travel debug session — all of which describe themselves.

The cost is real if unglamorous. A reader grepping for CloudFormation deployment does not find betty_cfn.go; a new contributor has no way to learn what "Betty" designates; and docs/services.md advertises a Betty CFN resource types section per service, so the name is on the public documentation of every one of 65 plugins.

What is externally facing, and what is not

Measured rather than assumed. Only two exported identifiers contain the name:

  • emulator.BettyClient (emulator/betty.go:80)
  • emulator.NewBettyClient (emulator/betty.go:91)

Intent, DeployResult, DeployedResource, ValidationReport, DebugSession, StackDeployer and every method on them are already neutrally named. So the deprecation surface is two symbols, and everything else — file names, unexported identifiers, comments, docs headings — can be renamed outright with no consumer impact.

Plan

Now, no deprecation needed (internal only):

  1. Rename the 35 emulator/betty*.go files to 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, betty_cfn_* → cfn_*. The betty_cfn_vNN_plugins.go files are named for the release that added them rather than their contents; renaming them to cfn_resources_<service-group>.go is a judgement call to settle in review, and could be deferred to keep this diff reviewable.
  2. Drop the name from comments and from the Betty CFN resource types heading in docs/services.md (generated — the change belongs in cmd/gen-service-reference/main.go, and make docs-reference-check gates it). Proposed replacement: CloudFormation resource types.
  3. Update README.md, docs/fidelity.md, examples/README.md, and rename examples/betty_workflow/ → examples/validation_workflow/.
  4. Rename the area: betty GitHub label — it is part of the same naming and is on this issue. gh label edit "area: betty" --name "area: cloudformation" preserves it on every issue already carrying it, where deleting and recreating would not.
  5. Leave .github/ISSUE_TEMPLATE/feature_request.yml:44 alone: "v0.6.0 — Betty integration" is a historical release label, and rewriting history in a dropdown makes past issues unmatchable.

Deprecation schedule for the two exported symbols:

Release Action
next minor Add Client / NewClient as the real implementation. BettyClient becomes a type alias (type BettyClient = Client) and NewBettyClient a one-line wrapper, both marked // Deprecated: use Client / NewClient. BettyClient will be removed in v1.0.0. A type alias rather than a distinct type, so a consumer holding a *BettyClient and a *Client interchangeably keeps compiling.
every release until removal The aliases stay, tested, so go vet/staticcheck flags a consumer's use without breaking their build.
v1.0.0 Remove both, noted in the CHANGELOG under Removed.

Two exported symbols behind aliases is a cheap deprecation, and v1.0.0 is the only place a Go module can remove exported API without breaking the import path — so tying removal to it rather than to a date is what the module system asks for.

Acceptance criteria

  • grep -ril betty over *.go, docs/, examples/ and README.md returns only the deprecation aliases and their doc comments (CHANGELOG.md and the issue-template release label are exempt — both are historical records).
  • emulator.Client / emulator.NewClient exist and are what the docs and examples use.
  • BettyClient and NewBettyClient still compile, still work, are marked // Deprecated: naming the replacement and the removal release, and are covered by a test asserting the alias resolves to the same type.
  • docs/services.md says CloudFormation resource types, generated by cmd/gen-service-reference — make docs-reference-check clean.
  • Full verification suite clean: gofmt -l ., go build ./..., go vet ./..., golangci-lint run ./... → 0 issues, make test, make docs-reference-check docs-versions, npm --prefix docs run build, test/e2e.
  • The area: betty label is renamed in place, so existing issues keep it.
  • The rename is pure: no behaviour change in the same PR, so the diff is reviewable as a rename and a bisect over it cannot land on a mixed commit.

Notes

Best done as its own PR with no other change riding along, and worth doing before v1.0.0 regardless of this issue, since that is when the aliases can be removed. #371 (managing flat-package growth) touches the same files and should be sequenced after this, not merged with it — a rename and a repackaging in one diff is unreviewable.

Activity

  1. added
    type: chore
    area: cloudformation
    on Aug 3, 2026
  2. added this to the v0.90.0 milestone on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cloudformationtype: chore

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions