bug: webapp rejects API_RATE_LIMIT_METRICS_BUCKET_SECONDS=15 although the schema says divisors of 60 are valid
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #4993 de @StackedByAdit — cerrado sin fusionar
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- backend
Línea de trabajo
Comienza en apps/webapp/app/env.server.ts:777-785 y confirma que .multipleOf(10) rechaza 15 mientras que refine permite divisores de 60; el primer paso es revisar el PR cerrado #4993 para ver por qué la corrección anterior no se fusionó. Se da por terminado cuando el análisis de "15" y "120" tiene éxito, "7" sigue fallando y la suite de env de Vitest del webapp se mantiene en verde.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Provide environment information
Not environment-specific: found in the webapp source at main @ c2b7a72180 and reproduced with the webapp's own Vitest suite (macOS arm64, pnpm).
Describe the bug
The webapp refuses to start with API_RATE_LIMIT_METRICS_BUCKET_SECONDS=15, although the schema's own rule says 15 is valid.
In apps/webapp/app/env.server.ts:777-785:
API_RATE_LIMIT_METRICS_BUCKET_SECONDS: z.coerce.number().int().positive()
.multipleOf(10)
.refine((seconds) => 60 % seconds === 0 || seconds % 60 === 0, {
message: "must divide or be a multiple of 60 so buckets align to minute boundaries",
})
The refine accepts any divisor or multiple of 60, which is the alignment the metrics aggregator needs. .multipleOf(10) runs first, though, and rejects the minute-aligned divisors 15 (and 1–6, 12). Environment parsing fails at startup with a Zod "multiple of 10" error.
Expected: 15 (and 120) parse, 7 is still rejected.
Reproduction repo
N/A (schema test against this repo, below)
To reproduce
- Set
API_RATE_LIMIT_METRICS_BUCKET_SECONDS=15and start the webapp. Env validation fails. - Or, as a test: parse
"15"with the schema entry above. It fails withNumber must be a multiple of 10.
Additional information
A fix is ready on the breken-ai/trigger.dev fork (breken/fix-rate-limit-metrics-bucket-validation):
- It drops the contradictory
.multipleOf(10)and moves the schema intoapp/utils/apiRateLimitMetricsBucketSecondsSchema.ts, so it can be tested. - The regression test asserts
15and120parse and7fails. It's red on main and green with the fix. - Env + new schema tests: 19 passed. oxfmt, oxlint and webapp typecheck are clean.
I'll open it as a draft PR with fixes #<this> once the account is vouched.
Prepared with AI assistance (Claude) from the breken-ai account.
- Lenguaje dominante
- TypeScript
- Estrellas
- 16.5k
- Forks
- 1.5k
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 17
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 triggerdotdev/trigger.dev
-
bug: retry.fetch ignores the caller's abort signal and retries aborted requestsQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
triggerdotdev/trigger.dev#5116 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug: Chat transport crashes on Safari < 17.4: AbortSignal.any is not a functionQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
triggerdotdev/trigger.dev#5098 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug: Side menu items lose their active state on detail pagesQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
triggerdotdev/trigger.dev#5088 ·
Los mantenedores suelen responder en 1 día
-
bug: RBAC loader logs "plugin found but failed to load" when @triggerdotdev/plugins is simply not installedQuizá libre de nuevo @itsfaryal la tomó hace 17 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
triggerdotdev/trigger.dev#5083 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
triggerdotdev/trigger.dev#5072 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de triggerdotdev/trigger.dev
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug platform-android
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Termix-SSH/Mobile#146 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
devswha/herdr-web-ui#3875 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día