Skip to content

Require Stellar enum presence in proto responses - #2376

Open
Krish-vemula wants to merge 1 commit into
mainfrom
fix/stellar-enum-presence-validation
Open

Require Stellar enum presence in proto responses#2376
Krish-vemula wants to merge 1 commit into
mainfrom
fix/stellar-enum-presence-validation

Conversation

@Krish-vemula

Copy link
Copy Markdown
Contributor

Summary

  • make Stellar event_type and tx_status proto fields optional
  • reject omitted enum fields on inbound conversion
  • keep checked enum conversion for unknown values

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common

⚠️ Breaking Changes (2)

pkg/chains/stellar.EventInfo (1)
  • EventType — Type changed:
  - EventType
  + *EventType
)
pkg/chains/stellar.SubmitTransactionResponse (1)
  • TxStatus — Type changed:
  - TxStatus
  + *TxStatus
)

📄 View full apidiff report

@Krish-vemula
Krish-vemula marked this pull request as ready for review September 10, 2026 16:26
@Krish-vemula
Krish-vemula requested a review from a team as a code owner September 10, 2026 16:26
Copilot AI lite review requested due to automatic review settings September 10, 2026 16:26

Copilot AI left a comment

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.

🔵 Needs a closer look

It changes proto wire/API semantics and introduces stricter validation that may break older clients that previously omitted these enum fields.

Pull request overview

This PR updates the Stellar gRPC/proto surface so event_type (in EventInfo) and tx_status (in SubmitTransactionResponse) have explicit presence semantics, and tightens proto→domain conversions to reject responses that omit these enums.

Changes:

  • Mark EventInfo.event_type and SubmitTransactionResponse.tx_status as optional in stellar.proto (and regenerate Go bindings accordingly).
  • Update outbound domain→proto conversions to always set these enum pointers.
  • Update inbound proto→domain conversions to error when the enum fields are omitted, while still rejecting unknown/unsupported enum numeric values; add tests for the new “missing enum” cases.
File summaries
File Description
pkg/chains/stellar/stellar.proto Makes event_type and tx_status optional to enable presence detection.
pkg/chains/stellar/stellar.pb.go Regenerated Go protobufs reflecting optional enum presence (pointer fields + presence-aware getters).
pkg/chains/stellar/proto_helpers.go Enforces required presence on proto→domain conversion; ensures domain→proto sets enum pointers.
pkg/chains/stellar/proto_helpers_test.go Adds/updates tests for missing enum presence and pointer-based enum fields.
Review details

Files not reviewed (1)

  • pkg/chains/stellar/stellar.pb.go: Generated file
  • Files reviewed: 3/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants