Skip to content

fix: adapt to copilot-sdk/go v0.2.2 breaking change - #1453

Merged
k1LoW merged 1 commit into
mainfrom
fix/copilot-sdk-v0.2.2-compat
Apr 13, 2026
Merged

k1LoW merged 1 commit into
mainfrom
fix/copilot-sdk-v0.2.2-compat

Conversation

@k1LoW

@k1LoW k1LoW commented Apr 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Fix build failure caused by copilot-sdk/go v0.2.2 breaking change where SessionEvent.Data changed from a concrete Data struct to a SessionEventData interface
  • Use type assertion (*copilot.AssistantMessageData) to access the assistant response content
  • Bump copilot-sdk/go from v0.2.0 to v0.2.2

Fixes CI failure: https://github.com/k1LoW/runn/actions/runs/24268124563/job/70867423992

copilot-sdk v0.2.2 changed SessionEvent.Data from a concrete struct
to a SessionEventData interface. Access the assistant response content
via type assertion (*copilot.AssistantMessageData) instead of direct
field access.
@k1LoW k1LoW self-assigned this Apr 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

BenchmarkManyRunbooks-4

main (-) #1453 (f975758) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,832,951,901 ns/op 4,097,813,100 ns/op 264,861,199 ns/op
Bytes allocated per iteration 1,391,007,104 B/op 1,391,207,712 B/op 200,608 B/op
Allocs per iteration 19,360,628 allocs/op 19,360,028 allocs/op -600 allocs/op
Metadata
main (-) #1453 (f975758)
goos linux linux
goarch amd64 amd64
pkg github.com/k1LoW/runn github.com/k1LoW/runn
cpu AMD EPYC 7763 64-Core Processor AMD EPYC 7763 64-Core Processor

BenchmarkOpenAPI3-4

main (-) #1453 (f975758) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 1,482,497,889 ns/op 1,452,203,327 ns/op -30,294,562 ns/op
Bytes allocated per iteration 818,345,600 B/op 817,923,216 B/op -422,384 B/op
Allocs per iteration 11,350,208 allocs/op 11,350,317 allocs/op 109 allocs/op
Metadata
main (-) #1453 (f975758)
goos linux linux
goarch amd64 amd64
pkg github.com/k1LoW/runn github.com/k1LoW/runn
cpu AMD EPYC 7763 64-Core Processor AMD EPYC 7763 64-Core Processor

BenchmarkSingleRunbook-4

main (-) #1453 (f975758) +/-
Number of iterations 22 22 0
Nanoseconds per iteration 48,615,185 ns/op 48,400,940 ns/op -214,245 ns/op
Bytes allocated per iteration 23,084,028 B/op 23,077,060 B/op -6,968 B/op
Allocs per iteration 186,973 allocs/op 186,970 allocs/op -3 allocs/op
Metadata
main (-) #1453 (f975758)
goos linux linux
goarch amd64 amd64
pkg github.com/k1LoW/runn github.com/k1LoW/runn
cpu AMD EPYC 7763 64-Core Processor AMD EPYC 7763 64-Core Processor

Reported by octocov

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Copilot agent integration to build against github.com/github/copilot-sdk/go v0.2.2 after a breaking API change where SessionEvent.Data became an interface, requiring type assertions to access assistant message content.

Changes:

  • Bump github.com/github/copilot-sdk/go from v0.2.0 to v0.2.2.
  • Update Copilot agent response extraction to type-assert event.Data to *copilot.AssistantMessageData.
  • Update module checksums accordingly.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
agent_copilot.go Adapts response parsing to the new SessionEvent.Data interface by type asserting assistant message data.
go.mod Updates the direct dependency version to copilot-sdk/go v0.2.2.
go.sum Adds checksums for copilot-sdk/go v0.2.2.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown
Contributor

Code Metrics Report

main (1fd050c) #1453 (f975758) +/-
Coverage 59.8% 59.8% -0.1%
Code to Test Ratio 1:0.8 1:0.8 -0.1
Test Execution Time 7m33s 8m22s +49s
Details
  |                     | main (1fd050c) | #1453 (f975758) |  +/-  |
  |---------------------|----------------|-----------------|-------|
- | Coverage            |          59.8% |           59.8% | -0.1% |
  |   Files             |             85 |              85 |     0 |
  |   Lines             |           9831 |            9832 |    +1 |
- |   Covered           |           5886 |            5885 |    -1 |
- | Code to Test Ratio  |          1:0.8 |           1:0.8 |  -0.1 |
  |   Code              |          18451 |           18453 |    +2 |
  |   Test              |          15351 |           15351 |     0 |
- | Test Execution Time |          7m33s |           8m22s |  +49s |

Code coverage of files in pull request scope (55.3% → 54.5%)

Files Coverage +/- Status
agent_copilot.go 31.8% -0.5% modified
internal/expr/expr.go 65.2% -0.8% affected

Reported by octocov

@k1LoW
k1LoW merged commit 9bee5f8 into main Apr 13, 2026
13 checks passed
@k1LoW
k1LoW deleted the fix/copilot-sdk-v0.2.2-compat branch April 13, 2026 01:05
@github-actions github-actions Bot mentioned this pull request Apr 13, 2026
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

⌂ 换网址