Seen live: POST /api/v1/apps with owner: cheffryjames, name: www, agent: mason answered slug_taken (the slug www was held by trevato/www), but the repository cheffryjames/www had already been created and scaffolded and was left behind — no app, no issue, a stray repo the caller then hit name_taken on.
newApp should check the slug before it creates anything, and if a later step refuses, take the repository back so a refused request leaves nothing behind. Pin it with a test: a slug already in use → slug_taken and no repository exists afterwards.
Seen live:
POST /api/v1/appswithowner: cheffryjames, name: www, agent: masonansweredslug_taken(the slugwwwwas held bytrevato/www), but the repositorycheffryjames/wwwhad already been created and scaffolded and was left behind — no app, no issue, a stray repo the caller then hitname_takenon.newAppshould check the slug before it creates anything, and if a later step refuses, take the repository back so a refused request leaves nothing behind. Pin it with a test: a slug already in use →slug_takenand no repository exists afterwards.