JS SDK: a non-finite cacheTtlMs keeps a cached answer past the key-less track() record

Abierto
#1,540 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, typescript
Área
api

Línea de trabajo

Start in sdk/js/src/client.ts, where the constructor accepts cacheTtlMs, then in attribution.ts, where a non-finite lifetime maps to 0 and falls to the 24-hour floor. Reproduce with cacheTtlMs: Infinity: answer a flag, advance time past 25 hours, and check whether a key-less track() is still tagged. Done when the constructor rejects non-finite or negative values, or the record lifetime becomes unbounded to match, and the docs say which.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug post-launch

The JS SDK accepts a cacheTtlMs that is not a finite number, and then a cached flag answer outlives the record that tags a key-less track(), the case #1423 fixed for finite lifetimes.

What happens

Measured on main (d48e06c8) and on #1539:

  • The constructor accepts any cacheTtlMs (sdk/js/src/client.ts), including Infinity and NaN.
  • A cache entry with either value never expires: in a probe, both were still live after a simulated year.
  • The key-less track() record falls back to 24 hours, because attribution.ts maps a non-finite lifetime to 0 and then takes the 24-hour floor.
  • With cacheTtlMs: Infinity, a flag answered at T0 is read from the cache at T0 + 25 h with no request, and a key-less track() then goes to /tracking/track untagged. With a finite 48-hour lifetime the same steps are tagged, as #1501 intended.

Expected

One of: the constructor refuses a non-finite or negative cacheTtlMs; or the record's lifetime is unbounded when the cache's is. The docs then say which.

Priority

LOW: it needs a cache-forever setting. After launch; the 0.3.0 docs say the guarantee holds for a finite cacheTtlMs.

Lenguaje dominante
Python
Estrellas
0
Forks
4
Merge medio
5 h 36 min
PR fusionados (30 d)
509

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Controlvar/controlvar

Todos los issues de Controlvar/controlvar

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.