RockteMQ-AI commented on issue #4760:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/4760#issuecomment-5760164957

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The reported issue is valid. The root cause is well-identified: 
`encoding/json` decodes all JSON numbers into `float64` when unmarshalling into 
`any`, which silently loses precision for int64 values above 2^53. This affects 
RocketMQ offsets and timestamps that are contractually int64.
   
   **Root Cause:** `internal/studio/client.go` decodes response payload into 
`out any` without using `json.Decoder.UseNumber()`, causing precision loss for 
large integers. `types.DecodeMutationOutput` re-encodes the already-corrupted 
value.
   
   **Impact:** Any Studio API response containing int64 fields (message 
offsets, timestamps) beyond `Number.MAX_SAFE_INTEGER` will be silently 
corrupted in all output formats (table, json, yaml).
   
   **Severity:** Medium — currently unlikely to trigger in production (offsets 
rarely exceed 2^53 today), but the JSON contract is int64 and silent corruption 
is unacceptable.
   
   **Fix:** PR #4759 is referenced by the author. The fix should use 
`json.Number` or `UseNumber()` in the decoder to preserve integer precision 
through the round trip.
   
   ---
   *Automated evaluation by github-manager*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to