fix(api): widen slugify suffix from 4 to 8 chars or add retry loop
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
Línea de trabajo
Start by reading the slug generation in packages/api/src/routes/admin/events/index.ts and packages/api/src/routes/eventsSubmit.ts, then check whether shared slug.ts from #2002 exists. Run the relevant unit tests and add coverage for 10,000 slugs from the same name; done means duplicate-free generation and no generic unique-constraint failure path.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Event slug generation uses Math.random().toString(36).slice(2, 6) — a 4-character base36 suffix. Birthday-paradox math gives a collision rate around 1-in-1.6M per name, surfacing as a generic 500 from the unique-constraint insert. Low but non-zero.
Requirements
- Widen the suffix to 8 characters (~1-in-2.8B collision per name) OR add a
try/retryloop that regenerates on unique-constraint conflict - Files affected:
packages/api/src/routes/admin/events/index.ts,packages/api/src/routes/eventsSubmit.ts - If a shared
slug.tshelper lands first (#2002), apply the fix once there - Unit test: 10,000 random slugifies of the same name produce zero duplicates
Context
Flagged in the Plan 2 review. Forms (Plan 4) will also need slug generation — fix once and reuse.
- Lenguaje dominante
- HTML
- Estrellas
- 33
- Forks
- 107
- Merge medio
- 14 h 6 min
- PR fusionados (30 d)
- 19
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de USRSE/usrse.github.io
-
update community awardsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
USRSE/usrse.github.io#2117 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 63/100
USRSE/usrse.github.io#2115 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Broken URLs on the websiteAbiertobroken-links
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
USRSE/usrse.github.io#2099 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
USRSE/usrse.github.io#2085 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
USRSE/usrse.github.io#2001 ·
Los mantenedores suelen responder en 1 día
Todos los issues de USRSE/usrse.github.io
Issues similares
-
Calc 1.1: inconsistent duplicate facts with equal `decimals` don't stop the calculation checkAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
rubenarslan/formr#63 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
StreamPipe input stream: readWithTimeout(n, 0) blocks forever instead of returning immediatelyAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
qoretechnologies/qore#8159 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día