Skip to content

feat(autocli): replace pulsar types with Go-native structs (Phase 1 of pulsar removal)#26511

Open
aljo242 wants to merge 8 commits into
mainfrom
feat/autocli-go-native-types
Open

feat(autocli): replace pulsar types with Go-native structs (Phase 1 of pulsar removal)#26511
aljo242 wants to merge 8 commits into
mainfrom
feat/autocli-go-native-types

Conversation

@aljo242

@aljo242 aljo242 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Phases 1–3 of the pulsar (cosmossdk.io/api) removal project, rebased on main after #26456 merged.

Phase 1 — Go-native AutoCLI types (core/autocli)

Introduces five Go-native structs in a new cosmossdk.io/core/autocli package that mirror the autocliv1 proto messages 1:1. All 33 module autocli.go files now import cosmossdk.io/core/autocli instead of cosmossdk.io/api/cosmos/autocli/v1. Only runtime/services/autocli.go still imports autocliv1 at the gRPC boundary — it converts Go-native options to proto via toProtoModuleOptions().

35 → 2 files importing cosmossdk.io/api/cosmos/autocli/v1

Phase 2 — Go-native SignMode type (x/tx/signing)

Defines signing.SignMode as a standalone int32 type in x/tx/signing with identical values to the proto enum, avoiding a circular import (x/tx/signing → types/tx/signing → codec/types → x/tx/signing). All SignModeHandler implementations and the HandlerMap use the local type. The x/auth/signing conversion functions become plain integer casts.

16 → 2 files importing cosmossdk.io/api/cosmos/tx/signing/v1beta1
(remaining 2: adapter.go + testutil/util.go — deferred to Phase 4, use pulsar ModeInfo_Single)

Phase 3 — Reflection gRPC stubs + msg/v1 extensions

  • New runtime/services/reflection package hand-writes the cosmos.reflection.v1.ReflectionService gRPC stub without the pulsar dependency. 4 → 0 files importing cosmossdk.io/api/cosmos/reflection/v1.
  • types/msgservice/extensions_v2.go adds *protoimpl.ExtensionInfo instances (E_ServiceV2, E_SignerV2) compatible with the protov2 API. Used by configurator.go, validate.go, autocli.go, builder.go. 6 → 2 files importing cosmossdk.io/api/cosmos/msg/v1 (remaining 2: in x/tx/signing — cycle-blocked, Phase 4).

Rebase note

Rebased on main after #26456 (remove SIGN_MODE_TEXTUAL) merged, which deleted x/tx/signing/textual/. This automatically removed 3 more signingv1beta1 and 2 txv1beta1 import sites.

Deferred to Phase 4 (pulsar Tx type replacement)

x/auth/tx/adapter.go, x/tx/decode/decode.go, x/tx/signing/direct/direct.go, x/tx/signing/directaux/direct_aux.go — use txv1beta1.SignDoc, txv1beta1.Tx, txv1beta1.SignDocDirectAux for protov2 marshaling via protoreflect. Replacing these requires substituting the gogoproto Tx types throughout the signing path.

Issue: N/A

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔒 WARNING: unsigned commits detected

This pull request contains 1 commit(s) without a verified signature.

How to fix:

  1. Set up commit signing (GPG or SSH).
  2. Amend/rebase so every commit in this PR is verified-signed.
  3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.

Docs: https://docs.github.com/authentication/managing-commit-signature-verification

Unsigned commits:

  • 34838ab — feat(autocli): replace pulsar types with Go-native structs (Phase 1)

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@aljo242 your pull request is missing a changelog!

@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Phase 1 of the pulsar removal project: introduces five Go-native structs in cosmossdk.io/core/autocli that mirror the autocliv1 proto types 1:1, then mechanically replaces autocliv1 imports across 35+ module autocli.go files. The only remaining pulsar usage is in runtime/services/autocli.go, which converts to proto types at the gRPC boundary via a new toProtoModuleOptions() helper.

  • New core/autocli/options.go: defines ModuleOptions, ServiceCommandDescriptor, RpcCommandOptions, FlagOptions, and PositionalArgDescriptor as plain Go structs with complete field parity to the pulsar-generated equivalents.
  • runtime/services/autocli.go: adds a clean proto-conversion layer that is the sole remaining pulsar touch-point.
  • Three files have compile-breaking typos: flag/builder.go, msg.go, and query.go each contain autoclicore.autoclicore.* double-qualified identifiers that will not compile.

Confidence Score: 1/5

Not safe to merge: three files contain invalid Go type expressions that prevent the entire client/v2 autocli package from compiling.

Three files — flag/builder.go, msg.go, and query.go — each use the double-qualified form autoclicore.autoclicore.FlagOptions / autoclicore.autoclicore.RpcCommandOptions, which is not valid Go syntax. These map declarations sit on the hot path of every query and message command generation call. The package will not build at all until these are fixed.

client/v2/autocli/flag/builder.go, client/v2/autocli/msg.go, and client/v2/autocli/query.go all need the double-qualified package selector corrected before the PR can build.

Important Files Changed

Filename Overview
core/autocli/options.go New file introducing five Go-native structs that mirror the pulsar autocliv1 proto types 1:1; struct definitions are clean and well-documented with no issues.
client/v2/autocli/flag/builder.go Contains autoclicore.autoclicore.FlagOptions — a double-qualified package selector that is invalid Go syntax and will prevent compilation.
client/v2/autocli/msg.go Contains autoclicore.autoclicore.RpcCommandOptions — same double-qualified typo causing a compile error in AddMsgServiceCommands.
client/v2/autocli/query.go Contains autoclicore.autoclicore.RpcCommandOptions — same double-qualified typo causing a compile error in AddQueryServiceCommands.
runtime/services/autocli.go Adds toProtoModuleOptions conversion layer; logic is complete and nil-checks FlagOptions entries, but PositionalArgs elements lack the same nil guard.
runtime/autocli.go Drops the autocliv1 import and replaces descriptor-derived service name with a hardcoded string literal, losing compile-time validation for the service name.
client/v2/autocli/interface.go Cleanly updates HasAutoCLIConfig.AutoCLIOptions() return type; no issues.
client/v2/autocli/common.go Straightforward type substitution across enhanceQuery, enhanceMsg, enhanceCustomCmd, and buildMethodCommandCommon; no logic changes.
x/bank/autocli.go Mechanical import swap from autocliv1 to autocli core types; no behavioural change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Module autocli.go files\n(35+ modules)"] -->|"AutoCLIOptions() *autocli.ModuleOptions"| B["cosmossdk.io/core/autocli\nGo-native structs"]
    B --> C["runtime/services/autocli.go\nExtractAutoCLIOptions()"]
    C --> D["toProtoModuleOptions()\nConversion layer"]
    D -->|"*autocliv1.ModuleOptions"| E["AppOptions gRPC endpoint\n(autocliv1 boundary)"]
    F["client/v2/autocli"] -->|"reads *autocli.ModuleOptions"| B
    F --> G["AddQueryServiceCommands()\nAddMsgServiceCommands()"]
    style D fill:#f9f,stroke:#333
    style E fill:#ffa,stroke:#333
Loading

Reviews (1): Last reviewed commit: "feat(autocli): replace pulsar types with..." | Re-trigger Greptile

Comment thread client/v2/autocli/flag/builder.go Outdated

// define all other fields as flags
flagOptsByFlagName := map[string]*autocliv1.FlagOptions{}
flagOptsByFlagName := map[string]*autoclicore.autoclicore.FlagOptions{}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 The map value type uses a double-qualified autoclicore.autoclicore.FlagOptions which is not valid Go and will not compile. The alias autoclicore already refers to the package; the type reference should be autoclicore.FlagOptions.

Suggested change
flagOptsByFlagName := map[string]*autoclicore.autoclicore.FlagOptions{}
flagOptsByFlagName := map[string]*autoclicore.FlagOptions{}

Comment thread client/v2/autocli/msg.go Outdated
methods := service.Methods()

rpcOptMap := map[protoreflect.Name]*autocliv1.RpcCommandOptions{}
rpcOptMap := map[protoreflect.Name]*autoclicore.autoclicore.RpcCommandOptions{}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Same double-package-qualifier typo: autoclicore.autoclicore.RpcCommandOptions is not a valid Go type and will fail to compile. Should be autoclicore.RpcCommandOptions.

Suggested change
rpcOptMap := map[protoreflect.Name]*autoclicore.autoclicore.RpcCommandOptions{}
rpcOptMap := map[protoreflect.Name]*autoclicore.RpcCommandOptions{}

Comment thread client/v2/autocli/query.go Outdated
methods := service.Methods()

rpcOptMap := map[protoreflect.Name]*autocliv1.RpcCommandOptions{}
rpcOptMap := map[protoreflect.Name]*autoclicore.autoclicore.RpcCommandOptions{}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Same double-package-qualifier typo in query.go: autoclicore.autoclicore.RpcCommandOptions is not valid Go and will cause a compile failure. Should be autoclicore.RpcCommandOptions.

Suggested change
rpcOptMap := map[protoreflect.Name]*autoclicore.autoclicore.RpcCommandOptions{}
rpcOptMap := map[protoreflect.Name]*autoclicore.RpcCommandOptions{}

Comment thread runtime/services/autocli.go Outdated
Comment on lines +142 to +147
RpcMethod: o.RpcMethod,
Use: o.Use,
Long: o.Long,
Short: o.Short,
Example: o.Example,
Alias: o.Alias,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing nil guard for PositionalArgDescriptor slice elements

toProtoRpcOpts iterates o.PositionalArgs and dereferences each element directly, but FlagOptions entries in the same function have an explicit if f == nil { continue } guard. If a nil pointer is ever stored in the PositionalArgs slice, this will panic at runtime. Consider adding the same guard for consistency and safety.

Comment thread runtime/autocli.go
Service: autocliv1.Query_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
// cosmos.autocli.v1.Query
Service: "cosmos.autocli.v1.Query",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Hardcoded service name string loses compile-time safety

The original code used autocliv1.Query_ServiceDesc.ServiceName, which is guaranteed by the proto-generated descriptor to match the actual service name. Replacing it with the raw string "cosmos.autocli.v1.Query" means a typo here won't be caught at compile time — it will silently produce a CLI sub-command that fails at runtime when the gRPC registry lookup finds nothing.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔒 WARNING: unsigned commits detected

This pull request contains 2 commit(s) without a verified signature.

How to fix:

  1. Set up commit signing (GPG or SSH).
  2. Amend/rebase so every commit in this PR is verified-signed.
  3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.

Docs: https://docs.github.com/authentication/managing-commit-signature-verification

Unsigned commits:

  • 34838ab — feat(autocli): replace pulsar types with Go-native structs (Phase 1)
  • b387a17 — feat(x/tx): replace signingv1beta1.SignMode with Go-native type (Phase 2)

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔒 WARNING: unsigned commits detected

This pull request contains 3 commit(s) without a verified signature.

How to fix:

  1. Set up commit signing (GPG or SSH).
  2. Amend/rebase so every commit in this PR is verified-signed.
  3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.

Docs: https://docs.github.com/authentication/managing-commit-signature-verification

Unsigned commits:

  • 34838ab — feat(autocli): replace pulsar types with Go-native structs (Phase 1)
  • b387a17 — feat(x/tx): replace signingv1beta1.SignMode with Go-native type (Phase 2)
  • 8d89f30 — feat: remove cosmos/reflection/v1 and cosmos/msg/v1 pulsar imports (Phase 3)

aljo242 added 3 commits June 8, 2026 12:23
Introduces five Go-native structs in cosmossdk.io/core/autocli that
mirror the autocliv1 proto messages 1:1:

  ModuleOptions, ServiceCommandDescriptor, RpcCommandOptions,
  FlagOptions, PositionalArgDescriptor

All 33 module autocli.go files now import cosmossdk.io/core/autocli
instead of cosmossdk.io/api/cosmos/autocli/v1. The autocli engine in
client/v2 also uses these types internally. The only remaining usage
of the pulsar autocliv1 package is runtime/services/autocli.go, which
implements the cosmos.autocli.v1.Query gRPC endpoint — it converts
Go-native options to proto at that boundary via toProtoModuleOptions.

This is Phase 1 of the pulsar removal project. After this:
- 35 → 2 files import cosmossdk.io/api/cosmos/autocli/v1
- cosmossdk.io/api is no longer needed by any module autocli.go file
- The gRPC endpoint boundary conversion is explicit and localized

Phase 2 (x/tx SignMode), Phase 3 (reflection/msg/amino protos), and
Phase 4 (delete ./api) are separate follow-up PRs.

Issue: N/A
…e 2)

Defines signing.SignMode as a standalone int32 type in x/tx/signing with
identical values to the proto enum so that x/tx no longer needs to import
cosmossdk.io/api/cosmos/tx/signing/v1beta1 for its public interface.

A type alias was attempted first but is blocked by an import cycle:
  x/tx/signing → types/tx/signing → codec/types → x/tx/signing
The standalone type avoids this entirely; conversion to/from the
gogoproto types/tx/signing.SignMode is a plain integer cast.

Changes:
- x/tx/signing: new sign_mode.go defines SignMode + constants + String()
- x/tx/signing/{handler_map,sign_mode_handler,aminojson,direct,directaux}:
  drop signingv1beta1 import, use local SignMode
- x/auth/signing/verify.go: conversion functions simplified to casts
- client/cmd.go, client/v2/autocli/keyring, crypto/keyring/autocli.go:
  import x/tx/signing instead of cosmossdk.io/api

Deferred to Phase 3 (pulsar Tx type replacement):
- x/auth/tx/adapter.go: bridges gogoproto↔pulsar Tx; still needs
  signingv1beta1.SignMode for the ModeInfo_Single.Mode field
- x/tx/signing/textual/tx.go and testutil/util.go: build pulsar
  ModeInfo_Single structs; same dependency

After Phase 1+2: cosmossdk.io/api/cosmos/autocli/v1 down to 2 files,
cosmossdk.io/api/cosmos/tx/signing/v1beta1 down to ~3 files.

Issue: N/A
…hase 3)

cosmos/reflection/v1 (4 files → 0):
- New runtime/services/reflection package hand-writes the gRPC stub for
  cosmos.reflection.v1.ReflectionService without the pulsar dependency.
  Provides ServiceServer interface, UnimplementedServiceServer,
  RegisterReflectionServiceServer, and the grpc.ServiceDesc.
- runtime/services/reflection.go, runtime/services.go, runtime/autocli.go,
  simapp/app.go updated to use the new package.

cosmos/msg/v1 (6 files → 2):
- types/msgservice/extensions_v2.go adds *protoimpl.ExtensionInfo instances
  (E_ServiceV2, E_SignerV2) that are compatible with the protov2 API
  (google.golang.org/protobuf/proto.HasExtension / GetExtension).
  The gogoproto msg.pb.go E_Service/*ExtensionDesc does NOT satisfy
  protoreflect.ExtensionType so it cannot be used with the protov2 API.
- types/module/configurator.go, types/msgservice/validate.go,
  runtime/services/autocli.go, client/v2/autocli/flag/builder.go
  updated to use E_ServiceV2 / E_SignerV2.
- x/tx/signing/context.go and x/tx/signing/textual/tx.go deferred —
  importing types/msgservice from x/tx/signing creates a cycle
  (x/tx/signing → types/msgservice → x/tx/signing). Will address in
  Phase 4 with the pulsar Tx type removal.

Also: add replace cosmossdk.io/client/v2 directives to modules that need
the local version after Phase 2's SignMode interface change.

Issue: N/A
@aljo242 aljo242 force-pushed the feat/autocli-go-native-types branch from 8d89f30 to 3f062e7 Compare June 8, 2026 16:27
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔒 WARNING: unsigned commits detected

This pull request contains 3 commit(s) without a verified signature.

How to fix:

  1. Set up commit signing (GPG or SSH).
  2. Amend/rebase so every commit in this PR is verified-signed.
  3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.

Docs: https://docs.github.com/authentication/managing-commit-signature-verification

Unsigned commits:

  • 0db6e9b — feat(autocli): replace pulsar types with Go-native structs (Phase 1)
  • 223a682 — feat(x/tx): replace signingv1beta1.SignMode with Go-native type (Phase 2)
  • 3f062e7 — feat: remove cosmos/reflection/v1 and cosmos/msg/v1 pulsar imports (Phase 3)

…hase 4a)

Replaces cosmossdk.io/api/cosmos/tx/v1beta1.SignDoc with the gogoproto-
generated github.com/cosmos/cosmos-sdk/types/tx.SignDoc in the
SIGN_MODE_DIRECT handler. SignDoc has only scalar fields (bytes, string,
uint64) so gogoproto.Marshal produces the same deterministic bytes as
proto.MarshalOptions{Deterministic:true}.Marshal.

Remaining txv1beta1 usage is architecturally blocked by the decode
pipeline:
- decode/decode.go: needs ProtoReflect().Descriptor() for
  RejectUnknownFieldsStrict
- tx_data.go / directaux: TxData.Body.Messages is []*anypb.Any;
  anyutil.Unpack requires *anypb.Any specifically
- adapter.go / testutil / aux_builder: build TxData or SignerInfo that
  depend on the above types

Also removes the now-unused txsigning import from client/cmd.go (the
SIGN_MODE_TEXTUAL check it guarded was removed by #26456).

Issue: N/A
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔒 WARNING: unsigned commits detected

This pull request contains 4 commit(s) without a verified signature.

How to fix:

  1. Set up commit signing (GPG or SSH).
  2. Amend/rebase so every commit in this PR is verified-signed.
  3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.

Docs: https://docs.github.com/authentication/managing-commit-signature-verification

Unsigned commits:

  • 0db6e9b — feat(autocli): replace pulsar types with Go-native structs (Phase 1)
  • 223a682 — feat(x/tx): replace signingv1beta1.SignMode with Go-native type (Phase 2)
  • 3f062e7 — feat: remove cosmos/reflection/v1 and cosmos/msg/v1 pulsar imports (Phase 3)
  • fc859f5 — feat(x/tx): remove txv1beta1.SignDoc from SIGN_MODE_DIRECT handler (Phase 4a)

…signing path (Phase 4)

Replaces all pulsar Tx types in the signing pipeline with Go-native structs
and gogoproto types, eliminating import cycles while retaining correctness.

core/tx_data.go changes:
- TxData.Body: *txv1beta1.TxBody → *TxBodyData (new Go-native struct)
- TxData.AuthInfo: *txv1beta1.AuthInfo → *TxAuthInfoData (new Go-native struct)
- RawMsg{TypeUrl, Value} replaces *anypb.Any in Messages slices
- TxFeeData/TxCoinData replace pulsar coin types
- Avoids import cycles: any type in x/tx/signing that imports types/tx would
  create the cycle x/tx/signing→types/tx→codec/types→x/tx/signing

x/tx/decode:
- Replaces ProtoReflect().Descriptor() with protoregistry.GlobalTypes lookup
  (gogoproto's init() populates protoregistry.GlobalTypes via proto.RegisterType)
- Uses gogoproto.Unmarshal for TxRaw/TxBody/AuthInfo → *txtypes.TxRaw/TxBody/AuthInfo
- DecodedTx.Tx: *v1beta1.Tx → *txtypes.Tx; DecodedTx.TxRaw: *v1beta1.TxRaw → *txtypes.TxRaw
- Converts gogoproto Any to *anypb.Any inline for anyutil.Unpack

x/tx/signing:
- unknown_fields.go: moved from x/tx/decode to break the decode→aminojson→decode cycle
  x/tx/decode now delegates to signing.RejectUnknownFields/RejectUnknownFieldsStrict
- sign_mode.go: standalone SignMode type (Phase 2, already present)

x/tx/signing/directaux:
- Uses txtypes.SignDocDirectAux + gogoproto.Marshal (no pulsar needed for scalar-only message)
- getFirstSigner converts RawMsg → *anypb.Any for anyutil.Unpack inline

x/tx/signing/aminojson:
- Gets TxBody descriptor via protoregistry.GlobalTypes instead of body.ProtoReflect()
- Converts []RawMsg → []*anypb.Any for AminoSignDoc.Msgs inline
- Converts []TxCoinData → []*basev1beta1.Coin for AminoSignFee.Amount
  (basev1beta1 kept for aminojsonpb.AminoSignFee — internal proto type)

x/auth/tx/adapter.go:
- GetSigningTxData no longer converts gogoproto→pulsar; builds TxBodyData/TxAuthInfoData
  directly from the wrapper's gogoproto types

Tests updated across:
- x/tx/signing/aminojson, directaux, direct, testutil
- x/auth/migrations/legacytx, x/authz

Deferred (cycle-blocked or larger refactor):
- client/tx/aux_builder.go: body *txv1beta1.TxBody internal state (can be fixed
  since client/tx→types/tx creates no cycle; larger setter-method refactor)
- x/tx/signing/context.go: msgv1.E_Signer (x/tx/signing→types/msgservice cycle)

Result: cosmos/tx/v1beta1: 9→1 production file; cosmos/tx/signing/v1beta1: 16→0 ✅

Issue: N/A
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔒 WARNING: unsigned commits detected

This pull request contains 5 commit(s) without a verified signature.

How to fix:

  1. Set up commit signing (GPG or SSH).
  2. Amend/rebase so every commit in this PR is verified-signed.
  3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.

Docs: https://docs.github.com/authentication/managing-commit-signature-verification

Unsigned commits:

  • 0db6e9b — feat(autocli): replace pulsar types with Go-native structs (Phase 1)
  • 223a682 — feat(x/tx): replace signingv1beta1.SignMode with Go-native type (Phase 2)
  • 3f062e7 — feat: remove cosmos/reflection/v1 and cosmos/msg/v1 pulsar imports (Phase 3)
  • fc859f5 — feat(x/tx): remove txv1beta1.SignDoc from SIGN_MODE_DIRECT handler (Phase 4a)
  • 0e25dfa — feat: eliminate cosmos/tx/v1beta1 and cosmos/tx/signing/v1beta1 from signing path (Phase 4)

…mports

x/tx/signing/msg_extensions.go:
- Defines E_Service and E_Signer as *protoimpl.ExtensionInfo directly in
  the signing package, avoiding import of cosmossdk.io/api/cosmos/msg/v1.
  The cycle x/tx/signing→types/msgservice→x/tx/signing was the blocker;
  defining them in-package avoids it entirely.

x/tx/signing/context.go:
- Replaces msgv1.E_Service and msgv1.E_Signer with the locally-defined
  equivalents from msg_extensions.go.

client/tx/aux_builder.go:
- Replaces body *txv1beta1.TxBody with body *txtypes.TxBody (gogoproto).
  All setters updated: Messages uses []*gogotypes.Any, TimeoutTimestamp
  uses *time.Time (native gogoproto field type vs *timestamppb.Timestamp).
  GetSignBytes converts to TxBodyData inline when needed.

Result after all phases:
  cosmos/tx/v1beta1:         0 production files ✅
  cosmos/tx/signing/v1beta1: 0 production files ✅
  cosmos/msg/v1:             0 production files ✅
  cosmos/reflection/v1:      0 production files ✅
  cosmos/autocli/v1:         2 production files (gRPC boundary — Phase 5)

Issue: N/A
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔒 WARNING: unsigned commits detected

This pull request contains 6 commit(s) without a verified signature.

How to fix:

  1. Set up commit signing (GPG or SSH).
  2. Amend/rebase so every commit in this PR is verified-signed.
  3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.

Docs: https://docs.github.com/authentication/managing-commit-signature-verification

Unsigned commits:

  • 0db6e9b — feat(autocli): replace pulsar types with Go-native structs (Phase 1)
  • 223a682 — feat(x/tx): replace signingv1beta1.SignMode with Go-native type (Phase 2)
  • 3f062e7 — feat: remove cosmos/reflection/v1 and cosmos/msg/v1 pulsar imports (Phase 3)
  • fc859f5 — feat(x/tx): remove txv1beta1.SignDoc from SIGN_MODE_DIRECT handler (Phase 4a)
  • 0e25dfa — feat: eliminate cosmos/tx/v1beta1 and cosmos/tx/signing/v1beta1 from signing path (Phase 4)
  • f82edb8 — feat: eliminate last cosmos/msg/v1 and cosmos/tx/v1beta1 production imports

…ializable

core/autocli/options.go:
- Adds gogoproto proto tags and proto.Message interface to all 5 types:
  ModuleOptions, ServiceCommandDescriptor, RpcCommandOptions,
  FlagOptions, PositionalArgDescriptor.
- Adds proto.RegisterType init() calls matching cosmos.autocli.v1.* names.
- Types are now directly serializable via gogoproto.Marshal with the same
  wire format as the pulsar-generated autocliv1 types.

runtime/services/autocli_grpc.go (new):
- Hand-written gRPC stub for cosmos.autocli.v1.Query without importing
  cosmossdk.io/api/cosmos/autocli/v1 (pulsar).
- AppOptionsRequest (empty), AppOptionsResponse (map[string]*autocli.ModuleOptions),
  AutoCLIQueryServer interface, UnimplementedAutoCLIQueryServer,
  RegisterAutoCLIQueryServer, service descriptor and handler.

runtime/services/autocli.go:
- AutoCLIQueryService now uses AppOptionsResponse directly (no toProtoModuleOptions
  conversion needed — autocli.ModuleOptions is proto-serializable).
- Drops autocliv1 import; uses cosmosmsg.E_ServiceV2 for the service check.

runtime/services.go:
- Replaces autocliv1.RegisterQueryServer with services.RegisterAutoCLIQueryServer.

Result: cosmos/autocli/v1: 0 production files ✅
All major pulsar packages now at 0 production files except cosmos/base/v1beta1.

Issue: N/A
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔒 WARNING: unsigned commits detected

This pull request contains 7 commit(s) without a verified signature.

How to fix:

  1. Set up commit signing (GPG or SSH).
  2. Amend/rebase so every commit in this PR is verified-signed.
  3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.

Docs: https://docs.github.com/authentication/managing-commit-signature-verification

Unsigned commits:

  • 0db6e9b — feat(autocli): replace pulsar types with Go-native structs (Phase 1)
  • 223a682 — feat(x/tx): replace signingv1beta1.SignMode with Go-native type (Phase 2)
  • 3f062e7 — feat: remove cosmos/reflection/v1 and cosmos/msg/v1 pulsar imports (Phase 3)
  • fc859f5 — feat(x/tx): remove txv1beta1.SignDoc from SIGN_MODE_DIRECT handler (Phase 4a)
  • 0e25dfa — feat: eliminate cosmos/tx/v1beta1 and cosmos/tx/signing/v1beta1 from signing path (Phase 4)
  • f82edb8 — feat: eliminate last cosmos/msg/v1 and cosmos/tx/v1beta1 production imports
  • e20b884 — feat: eliminate cosmos/autocli/v1 — make core/autocli types proto-serializable

core/coins/format.go:
- Replaces *basev1beta1.Coin and *bankv1beta1.Metadata with local Go
  structs: Coin, DecCoin, DenomUnit, Metadata. All have json tags
  matching the proto JSON format (denom_units, display, etc.).
- ParseDecCoin added alongside ParseCoin.
- JSON compatibility preserved; existing testdata files work unchanged.

client/v2/internal/coins/format.go:
- ParseCoin and ParseDecCoin now return *coinscore.Coin / *coinscore.DecCoin
  from cosmossdk.io/core/coins, eliminating basev1beta1 import.

client/v2/autocli/flag/coin.go and dec_coin.go:
- coinValue and decCoinValue now hold *coinscore.Coin / *coinscore.DecCoin.
- Get() uses dynamicpb.NewMessage from protoregistry.GlobalTypes to build
  the protoreflect.Value for cosmos.base.v1beta1.Coin / DecCoin without
  importing the pulsar type.

x/tx/signing/aminojson/internal/aminojsonpb/fee.go (new):
- NewAminoSignFee helper hides basev1beta1.Coin construction inside the
  internal aminojsonpb package, so aminojson.go no longer imports basev1beta1.

x/bank/autocli.go:
- bankv1beta1.Query_ServiceDesc.ServiceName → "cosmos.bank.v1beta1.Query"
- bankv1beta1.Msg_ServiceDesc.ServiceName → "cosmos.bank.v1beta1.Msg"

client/grpc/cmtservice/autocli.go:
- cmtv1beta1.Service_ServiceDesc.ServiceName → "cosmos.base.tendermint.v1beta1.Service"

client/grpc/node/autocli.go:
- nodev1beta1.Service_ServiceDesc.ServiceName → "cosmos.base.node.v1beta1.Service"

server/mock/tx.go:
- GetMsgsV2: uses dynamicpb.NewMessage("cosmos.bank.v1beta1.MsgSend") to
  build the test message without importing bankv1beta1.

Remaining cosmossdk.io/api imports in production code (deferred):
- cosmos/app/v1alpha1 + cosmos/*/module/v1 (depinject) — eliminated by #26493
- aminojson/encoder.go + options.go + aminojsonpb/fee.go — amino extension registration
- tests/integration/rapidgen — dual-type equivalence testing (remove with depinject)
- Various gRPC client query/pagination types and e2e test files

Issue: N/A
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔒 WARNING: unsigned commits detected

This pull request contains 8 commit(s) without a verified signature.

How to fix:

  1. Set up commit signing (GPG or SSH).
  2. Amend/rebase so every commit in this PR is verified-signed.
  3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.

Docs: https://docs.github.com/authentication/managing-commit-signature-verification

Unsigned commits:

  • 0db6e9b — feat(autocli): replace pulsar types with Go-native structs (Phase 1)
  • 223a682 — feat(x/tx): replace signingv1beta1.SignMode with Go-native type (Phase 2)
  • 3f062e7 — feat: remove cosmos/reflection/v1 and cosmos/msg/v1 pulsar imports (Phase 3)
  • fc859f5 — feat(x/tx): remove txv1beta1.SignDoc from SIGN_MODE_DIRECT handler (Phase 4a)
  • 0e25dfa — feat: eliminate cosmos/tx/v1beta1 and cosmos/tx/signing/v1beta1 from signing path (Phase 4)
  • f82edb8 — feat: eliminate last cosmos/msg/v1 and cosmos/tx/v1beta1 production imports
  • e20b884 — feat: eliminate cosmos/autocli/v1 — make core/autocli types proto-serializable
  • d49587b — feat: eliminate cosmos/base/v1beta1 and cosmos/bank/v1beta1 coin types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant