Repository navigation
fix(cli): preserve integer precision in jq output - #3991
Merged
lyingbug merged 1 commit intoOct 7, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
auth status --jq '.data.tenant_id'changes tenant ID 9007199254740993 to 9007199254740992. The SDK decodes the field correctly as uint64, but the shared jq emitter unmarshals JSON into float64 before evaluating the expression. Decode jq input with UseNumber so gojq can preserve integer precision across projection and evaluation.Type of Change
Related Issue
No linked issue. Reproduced locally on the current target branch.
Testing
A regression calls the production auth-status path with the real SDK against an HTTP server returning a uint64 tenant ID. The target branch emits the wrong integer; the fix returns the exact original ID. Existing auth and format module tests also pass.
Go 1.26.8 on macOS arm64: CLI
go test -race -count=1 -coverprofile=../jq-coverage.out -json ./...passes 1185 tests/subtests in 19.757s.golangci-lint run --new-from-rev=origin/main ./...(official v2.12.2),go vet ./...,go build ./..., skill-wire vocabulary and secret-token checks, andgit diff --check origin/main...HEADall pass with exit 0.Windows/Linux runtime and unrelated backend/frontend checks were not run. The client module is unchanged.
Checklist
git diff --check origin/main...HEADpassesImplemented with assistance from gpt-6.1-sol; the final diff was reviewed locally.