[Bug]: Integers outside the Long range from the LLM become Double and lose precision
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 55/100
Línea de trabajo
The conversion lives in JsonElement.toPrimitive() in the agent module's domain/JsonExtensions.kt, which tries toLongOrNull() then toDoubleOrNull(). Start there and reproduce with a number above Long.MAX_VALUE sent for a String parameter. Done when the literal digits reach the app function unchanged and existing number conversions still pass their tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Steps to Reproduce
- Have the model send an integer above
Long.MAX_VALUE(e.g. an ID such as12345678901234567890)
for aStringor string-array parameter.
Expected
The value reaches the app function exactly as the digits the model sent ("12345678901234567890").
Observed
"1.2345678901234567E19".
Root cause
JsonElement.toPrimitive() (agent/.../domain/JsonExtensions.kt) tries toLongOrNull() and then
toDoubleOrNull(), so big integers become Double. The raw JSON content is then lost before
type-aware conversion.
Suggested fix
Keep the raw JSON content for numbers that don't fit Long, for example as a String or BigDecimal. Or
convert with the parameter's metadata, so string parameters receive the literal digits.
Found during review of the #62 fix.
- Lenguaje dominante
- Kotlin
- Estrellas
- 222
- Forks
- 54
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 26
Preparar el entorno
- Sin Dockerfile ni 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 android/appfunctions
-
[Bug]: Fractional numbers are silently truncated for int/long parameters in the testing agentAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
android/appfunctions#84 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
android/appfunctions#82 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
android/appfunctions#81 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
android/appfunctions#66 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
android/appfunctions#62 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de android/appfunctions
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
MetrolistGroup/Metrolist#5426 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
🐛 Type:Bug 📥 State:Awaiting Assignment 🚨 Priority: P0 - Critical
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
micronizationlab/glafira-ai-hub#785 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
sorsama/deepseek-harness-mobile#154 ·
Los mantenedores suelen responder en 1 día
-
0. Needs triage enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día