GenerateFreshName used a global ticker variable but never incremented it inside the loop.
This caused an infinite loop if the first generated name (_0) was already in the used set.
Remove global ticker variable.
Use loop variable i directly to generate candidate names.
Benefits
Fixes infinite loop bug when generated name collides with used set.
Removes unnecessary global state.
Simpler and more predictable behavior.
Checklist
Code follows conventional commit format.
Branch follows naming convention (<type>/<description>). Always use underscores.
Tests pass (if applicable).
Documentation updated (if applicable).
## Description
`GenerateFreshName` used a global `ticker` variable but never incremented it inside the loop.
This caused an infinite loop if the first generated name (`_0`) was already in the used set.
- Remove global `ticker` variable.
- Use loop variable `i` directly to generate candidate names.
## Benefits
- Fixes infinite loop bug when generated name collides with used set.
- Removes unnecessary global state.
- Simpler and more predictable behavior.
## Checklist
- [x] Code follows conventional commit format.
- [x] Branch follows naming convention (`<type>/<description>`). Always use underscores.
- [x] Tests pass (if applicable).
- [x] Documentation updated (if applicable).
The function used a global `ticker` variable but never incremented it
inside the loop, causing an infinite loop if the first generated name
was already in the used set.
This fix removes the global state and uses the loop variable `i`
directly, which is cleaner and avoids the bug.
mvhutz
merged commit f2c8d9f7d2 into main2026-01-18 20:58:24 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
GenerateFreshNameused a globaltickervariable but never incremented it inside the loop.This caused an infinite loop if the first generated name (
_0) was already in the used set.tickervariable.idirectly to generate candidate names.Benefits
Checklist
<type>/<description>). Always use underscores.