Skip to content

fix(FI-649): change SignalsDialogue.ID from int64 to string - #1184

Merged
SSharma-10 merged 1 commit into
digitalocean:mainfrom
sauravk-digitalocean:sauravkumar/fi-649-dialogue-id-string
Oct 23, 2026
Merged

SSharma-10 merged 1 commit into
digitalocean:mainfrom
sauravk-digitalocean:sauravkumar/fi-649-dialogue-id-string

Conversation

@sauravk-digitalocean

Copy link
Copy Markdown
Contributor

Summary

The signals-api now returns dialogue id as a string-encoded UInt64 to avoid:

  • Signed overflow: ClickHouse UInt64 values > 2^63−1 appeared as negative integers when serialised via Go int64.
  • JavaScript precision loss: integer values > 2^53 lose precision in JSON.parse.

Changes

File Change
signals.go SignalsDialogue.ID: int64 → string
signals_test.go Updated TestSignals_ListSessionDialogues mock JSON to return string id

Related

Testing

All existing tests pass (go test ./...).

The signals-api now returns dialogue id as a string-encoded UInt64 to
avoid signed-overflow (values > 2^63-1 appeared negative) and JavaScript
precision loss (values > 2^53).

Changes:
- SignalsDialogue.ID: int64 -> string
- Updated TestSignals_ListSessionDialogues mock to return string id

Fixes: FI-649

@aupadhyay-shark aupadhyay-shark 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.

LGTM

@SSharma-10
SSharma-10 merged commit 9e6b401 into digitalocean:main Oct 23, 2026
8 checks passed
sauravk-digitalocean added a commit to sauravk-digitalocean/doctl that referenced this pull request Oct 23, 2026
Upgrade godo to v1.232.0 which changes SignalsDialogue.ID from int64
to string. The signals-api now returns dialogue id as a string-encoded
UInt64 to avoid signed-overflow (values > 2^63-1 appeared negative) and
JavaScript precision loss (values > 2^53).

Changes:
- go.mod: godo v1.230.0 -> v1.232.0 (via make upgrade_godo)
- displayers/signals_session.go: use dl.ID directly (already string),
  remove unused strconv import
- commands/signals_export_test.go: ID: 1 -> ID: "1"
- do/signals_test.go: update mock JSON and assertion for string id

Depends on: digitalocean/godo#1184
Fixes: FI-649
SSharma-10 pushed a commit to digitalocean/doctl that referenced this pull request Oct 23, 2026
Upgrade godo to v1.232.0 which changes SignalsDialogue.ID from int64
to string. The signals-api now returns dialogue id as a string-encoded
UInt64 to avoid signed-overflow (values > 2^63-1 appeared negative) and
JavaScript precision loss (values > 2^53).

Changes:
- go.mod: godo v1.230.0 -> v1.232.0 (via make upgrade_godo)
- displayers/signals_session.go: use dl.ID directly (already string),
  remove unused strconv import
- commands/signals_export_test.go: ID: 1 -> ID: "1"
- do/signals_test.go: update mock JSON and assertion for string id

Depends on: digitalocean/godo#1184
Fixes: FI-649
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.

3 participants

⌂ 换网址