Skip to content

fix(indexer): unsigned selector and sequence number in client response models - #1419

Open
tt-cll wants to merge 2 commits into
mainfrom
tt/indexer-selector-types
Open

fix(indexer): unsigned selector and sequence number in client response models#1419
tt-cll wants to merge 2 commits into
mainfrom
tt/indexer-selector-types

Conversation

@tt-cll

@tt-cll tt-cll commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Description

Testing

Checklist

  • Breaking changes documented in changelog (see changelog directory)
  • Cross link related PRs (in this or other repositories)

Stack created with GitHub Stacks CLIGive Feedback 💬

@tt-cll
tt-cll requested a review from a team as a code owner September 5, 2026 19:03
Copilot AI lite review requested due to automatic review settings September 9, 2026 11:20
@tt-cll
tt-cll force-pushed the tt/indexer-selector-types branch from 5b32559 to 8351a71 Compare September 9, 2026 11:20

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.

🟢 Approval recommended

The changes align generated client response models with the correct unsigned ranges, and remaining feedback is limited to minor consistency/documentation improvements.

Pull request overview

Updates the indexer’s generated OpenAPI Go client models so chain selectors and message sequence numbers use unsigned types that can represent the full value range produced by CCIP/protocol types.

Changes:

  • Change Message.{Source,Dest}ChainSelector in the generated client model from int64 to protocol.ChainSelector.
  • Change Message.SequenceNumber in the generated client model from int64 to an unsigned integer type.
  • Extend the OpenAPI overlay to apply these type overrides to response schemas (not just query parameters).
File summaries
File Description
indexer/pkg/client/internal/client.go Adjusts generated response model field types for chain selectors and sequence number.
indexer/overlay.yaml Adds overlay rules to force correct Go types/imports for response schema properties.
Review details

Files not reviewed (1)

  • indexer/pkg/client/internal/client.go: Generated file

Suppressed comments (1)

indexer/overlay.yaml:66

  • The overlay sets sequence_number to uint64, but the codebase already defines protocol.SequenceNumber (a uint64-based domain type). Using the domain type keeps generated response models consistent with protocol.Message and the selector overrides above.
  - target: "$.components.schemas.Message.properties.sequence_number"
    update:
      x-go-type: uint64
  • Files reviewed: 1/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

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

Comment thread indexer/overlay.yaml Outdated
Comment on lines +48 to +51
# Response models. Selectors are uint64 and a third of the values in chain-selectors exceed
# maxInt64, so the generated int64 cannot represent them at all; sequence numbers are
# non-negative (minimum: 0), which int64 does not carry. The parameter actions above only
# cover the query string; these cover the components.schemas the responses are built from.
Comment thread indexer/pkg/client/internal/client.go Outdated
ReceiverLength int32 `json:"receiver_length"`
Sender string `json:"sender"`
SenderLength int32 `json:"sender_length"`
SequenceNumber uint64 `json:"sequence_number"`
@tt-cll
tt-cll force-pushed the tt/indexer-selector-types branch 2 times, most recently from 208739d to 389f8cf Compare September 9, 2026 16:20
@tt-cll
tt-cll force-pushed the tt/indexer-selector-types branch from 389f8cf to ebed5c9 Compare September 9, 2026 19:36
@tt-cll
tt-cll force-pushed the tt/indexer-selector-types branch from ebed5c9 to 54d9375 Compare September 9, 2026 23:10
@tt-cll
tt-cll force-pushed the tt/indexer-selector-types branch from 54d9375 to 45b6ffe Compare September 10, 2026 14:40
@tt-cll
tt-cll force-pushed the tt/indexer-selector-types branch from 45b6ffe to 669b2ea Compare September 10, 2026 18:12
@tt-cll
tt-cll force-pushed the tt/indexer-selector-types branch from 669b2ea to ca32cea Compare September 10, 2026 19:28
@makramkd

Copy link
Copy Markdown
Collaborator

Is this a breaking change? Any idea who is using this OpenAPI Go client?

carte7000
carte7000 previously approved these changes Sep 11, 2026
Base automatically changed from tt/policy-checker-mockery to main September 11, 2026 12:53
@github-actions

Copy link
Copy Markdown

Code coverage report:

Package main tt/indexer-selector-types Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 50.82% 50.85% +0.03%
github.com/smartcontractkit/chainlink-ccv/bootstrap 72.00% 72.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 58.12% 58.12% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 35.65% 35.65% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 48.50% 48.50% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 42.80% 42.80% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 35.54% 35.59% +0.05%
github.com/smartcontractkit/chainlink-ccv/integration 61.39% 61.39% +0.00%
github.com/smartcontractkit/chainlink-ccv/internal 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/migration 78.70% 78.70% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 67.04% 67.04% +0.00%
github.com/smartcontractkit/chainlink-ccv/tools 43.61% 43.61% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 36.97% 36.97% +0.00%
Total 51.20% 51.20% +0.00%

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.

4 participants