Skip to content

fix(cli): use canonical environment names in hud init - #615

Open
solvemproblr wants to merge 1 commit into
mainfrom
asa/fix-sdk-env-sync-display
Open

fix(cli): use canonical environment names in hud init#615
solvemproblr wants to merge 1 commit into
mainfrom
asa/fix-sdk-env-sync-display

Conversation

@solvemproblr

@solvemproblr solvemproblr commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Issue

hud init my-env generated Environment(name="my_env") while the package and deployed registry used my-env. The mismatch caused tasks to reference a registry name that did not exist.

Solution

Use the SDK's canonical environment-name normalization when generating env.py, so both names remain my-env.

Tests

  • uv run --extra dev pytest -q hud/cli/tests/test_init.py
  • Ruff format and lint
  • ty check hud/cli/init.py

Note

Low Risk
Only affects newly generated local scaffolds from hud init; no auth, sync, or runtime behavior changes in this diff.

Overview
hud init no longer derives environment names with a local underscore slugifier. Local blank scaffolds now call shared normalize_environment_name on the target directory name, so generated env.py uses the same hyphenated, registry-style spelling (e.g. my-cool-env instead of my_cool_env).

The inline _python_name helper was removed in favor of that shared utility. test_init expectations were updated to match the hyphenated Environment(name=...) in the scaffold output.

Reviewed by Cursor Bugbot for commit 1e975a1. Bugbot is set up for automated code reviews on this repo. Configure here.

@solvemproblr
solvemproblr force-pushed the asa/fix-sdk-env-sync-display branch from 6eda135 to 0826f33 Compare August 25, 2026 12:34
@solvemproblr
solvemproblr marked this pull request as ready for review August 25, 2026 12:35
@solvemproblr
solvemproblr force-pushed the asa/fix-sdk-env-sync-display branch from 0826f33 to 1e975a1 Compare August 25, 2026 13:03
@solvemproblr solvemproblr changed the title fix(cli): align environment names and remote summaries fix(cli): use canonical environment names in hud init Aug 25, 2026
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.

1 participant