Skip to content

fix(go): tolerate numeric ping timestamps - #2198

Open
xianjianlf2 wants to merge 1 commit into
github:mainfrom
xianjianlf2:fix/go-ping-timestamp-compat
Open

fix(go): tolerate numeric ping timestamps#2198
xianjianlf2 wants to merge 1 commit into
github:mainfrom
xianjianlf2:fix/go-ping-timestamp-compat

Conversation

@xianjianlf2

Copy link
Copy Markdown

Fixes #1356.

Summary

  • add custom JSON unmarshalling for Go ping responses so both the public PingResponse and generated rpc.PingResult accept ISO-8601 timestamps, numeric epoch milliseconds, and stringified epoch milliseconds
  • cover both ping response shapes with unit tests

Root cause

The Go SDK models ping timestamps as time.Time, which accepts ISO-8601 strings but rejects older numeric epoch-millisecond payloads from some CLI builds. That can make startup fail during protocol verification before callers can issue any SDK requests.

Validation

  • go test . ./rpc
  • go test ./... was also run; non-E2E packages passed, but go/internal/e2e failed because this checkout does not have the Copilot CLI package installed under nodejs/node_modules/@github/copilot-*/index.js.

@xianjianlf2
xianjianlf2 marked this pull request as ready for review August 1, 2026 08:23
@xianjianlf2
xianjianlf2 requested a review from a team as a code owner August 1, 2026 08:23
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.

Client.Start fails when CLI returns ping timestamp as a JSON string (PingResponse.Timestamp int64)

1 participant