fix(cli): resolve float64 marshal failures for audit/supernode query commands#115
Merged
mateeullahmalik merged 3 commits intomasterfrom Apr 15, 2026
Merged
Conversation
a-ok123
previously approved these changes
Apr 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses Cosmos SDK AutoCLI JSON rendering failures (unknown type float64) for specific query responses containing float fields by skipping the affected AutoCLI-generated query commands and routing them through custom Cobra query commands that use the gRPC query client plus clientCtx.PrintProto.
Changes:
- Enable AutoCLI “custom command enhancement” and skip float-bearing RPCs in AutoCLI query options for
auditandsupernode. - Add custom CLI query command trees for the skipped RPCs, printing protobuf responses via
clientCtx.PrintProto. - Wire the modules to expose custom query roots, and add regression tests asserting the skipped RPCs and presence of custom commands.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| x/supernode/v1/module/module.go | Exposes module custom query root and indicates module has a custom query command. |
| x/supernode/v1/module/autocli.go | Enables enhanced custom command behavior; skips GetMetrics in AutoCLI. |
| x/supernode/v1/module/autocli_test.go | Tests that GetMetrics is skipped and custom enhancement is enabled. |
| x/supernode/v1/client/cli/query.go | Adds supernode custom query root and registers get-metrics. |
| x/supernode/v1/client/cli/query_test.go | Asserts custom query root contains get-metrics. |
| x/supernode/v1/client/cli/query_get_metrics.go | Implements custom get-metrics query using gRPC client + PrintProto. |
| x/audit/v1/module/module.go | Exposes module custom query root and indicates module has a custom query command. |
| x/audit/v1/module/autocli.go | Enables enhanced custom command behavior; skips float-bearing audit report RPCs in AutoCLI. |
| x/audit/v1/module/autocli_test.go | Tests that the targeted audit RPCs are skipped and enhancement is enabled. |
| x/audit/v1/client/cli/query.go | Adds audit custom query root and registers the custom report queries. |
| x/audit/v1/client/cli/query_test.go | Asserts custom query root contains the three report commands. |
| x/audit/v1/client/cli/query_reports.go | Implements custom audit report queries using gRPC client + PrintProto (with pagination/flags). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
j-rafique
approved these changes
Apr 15, 2026
akobrin1
added a commit
that referenced
this pull request
Apr 24, 2026
Integrates two master commits into the evm feature branch: - 7ca770a Everlight (#113): new v1.12.0 upgrade handler, supernode storage-full / storage-recovered / reward-distribution events, reward attribute keys. Coexists with evm's v1.20.0 upgrade (both registered). - 1de7dda fix(cli) (#115): float64 marshal fix for audit/supernode CLI. Conflicts resolved: - upgrades registry / tests: both v1.12.0 (Everlight) and v1.20.0 (EVM) handlers registered side-by-side. - supernode event type list + reward attribute keys: union of both sides. - Makefile / Makefile.devnet / gitignore / CI workflows: union of both sides' additions; determinism.yml keeps evm's 500ulume fees for the EVM feemarket minimum and drops the now-unused submit_evidence_tx helper. - release.yml: kept evm's shared build.yml refactor. - go.mod / tests/systemtests/go.mod: reconciled via go mod tidy (Go 1.26.2, cosmos-sdk v0.53.6, gjson v1.18.0, grpc v1.80.0). - devnet/default-config/devnet-genesis.json: kept master's additional audit params (min_cpu/mem/disk_free_percent, sc_challengers_per_epoch). - devnet/scripts/configure.sh: kept master's deterministic config.json / validators.json rename on copy. - docs/static/openapi.yml: kept master's spec (will be regenerated by make openrpc). - audit_test_helpers_test.go: kept master's more robust timeout floor. - Everlight distribution/eligibility tests: renamed lcfg.{Account,Validator}AddressPrefix to their evm-branch Bech32-prefixed equivalents (Bech32AccountAddressPrefix / Bech32ValidatorAddressPrefix). - Unused-linter errors on master's storage-full helpers (markStorageFull / recoverFromStorageFull / lastNonDegradedState) suppressed with //nolint:unused pending the follow-up audit enforcement wiring. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Fix CLI query rendering failures (
unknown type float64) for float-bearing responses in audit and supernode modules.This PR applies a surgical CLI-layer fix: skip affected AutoCLI query handlers and route those commands through custom query commands that use gRPC query client +
clientCtx.PrintProto.Root cause
AutoCLI query output path marshals via aminojson and fails on responses containing float fields (
float64) for specific commands.Scope
Supernode module
q supernode get-metricsAudit module
q audit epoch-reportq audit epoch-reports-by-reporterq audit host-reportsImplementation details
x/supernode/v1/module/autocli.gox/audit/v1/module/autocli.gox/supernode/v1/client/cli/query.gox/supernode/v1/client/cli/query_get_metrics.gox/audit/v1/client/cli/query.gox/audit/v1/client/cli/query_reports.gox/supernode/v1/module/module.gox/audit/v1/module/module.goRegression tests
Added tests to prevent reintroduction:
x/supernode/v1/module/autocli_test.gox/supernode/v1/client/cli/query_test.gox/audit/v1/module/autocli_test.gox/audit/v1/client/cli/query_test.goValidation performed
Local stack bring-up
lumera-e2e-runner) on this branch.Reproduced before fix (on prior state)
q supernode get-metricsq audit epoch-reportq audit epoch-reports-by-reporterq audit host-reportsall failed with:
cannot marshal response ... unknown type float64Verified after fix
Executed full CLI pass on this branch (local devnet):
All supernode query commands
All audit query commands
All tx subcommands smoke-checked (
--generate-only)Baseline non-target module checks (no regression)
All successful.
Risk / blast radius