[Bug]: Integers outside the Long range from the LLM become Double and lose precision
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Kotlin
- Star
- 222
- Fork
- 54
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 26
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của android/appfunctions
-
[Bug]: Fractional numbers are silently truncated for int/long parameters in the testing agentĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
android/appfunctions#84 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
android/appfunctions#82 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
android/appfunctions#81 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
android/appfunctions#66 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
android/appfunctions#62 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của android/appfunctions
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
MetrolistGroup/Metrolist#5426 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 Type:Bug 📥 State:Awaiting Assignment 🚨 Priority: P0 - Critical
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
micronizationlab/glafira-ai-hub#785 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
sorsama/deepseek-harness-mobile#154 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
0. Needs triage enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày