safe_name collision: different environment names sanitize to same filename

Open Beginner friendly
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start with safe_name and save_request in git_api/cli.py, then trace where environment names are entered in the REPL. Check how existing collision warnings work and decide how name collisions should be reported when a name is created. Done when colliding sanitized names are rejected or warned about at creation time.

Written by the indexing model from the issue text.

Description

bug

The safe_name function in git_api/cli.py strips all non-alphanumeric characters (except dash and underscore) and replaces them with underscore. This means different environment names like 'prod east' and 'prod/east' both sanitize to 'prod_east'. While save_request detects this collision and warns the user, the REPL does not prevent the ambiguity at the point of command entry. A user can set base_url in an environment named 'prod east', then accidentally reference 'prod/east' in a later command, and the silently-colliding name makes debugging confusing. Expected: Either reject names that collide with existing environment names after sanitization, or warn at creation time.

Dominant language
Python
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.