Commit ee5b271
fix: skip provider sessions during SDK reconnect (#569)
## Summary
- skip provider and other virtual sessions when recreating the shared
Copilot SDK client after a JSON-RPC disconnect
- avoid invalid `session.resume` calls against synthetic provider
session IDs like `provider:papilot:leader`
- add a regression guard covering the sibling reconnect path
## Why
When the Copilot CLI transport dropped, PolyPilot tried to re-resume
Papilot provider sessions using their persistence-only IDs. Those are
not real CLI session IDs, so reconnect recovery could cascade into more
errors and leave provider chats looking broken.
## Testing
- /opt/homebrew/bin/dotnet test PolyPilot.Tests/PolyPilot.Tests.csproj
--no-restore --filter "ConnectionRecoveryTests"
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>1 parent 3523b45 commit ee5b271
2 files changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
267 | 292 | | |
268 | 293 | | |
269 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3640 | 3640 | | |
3641 | 3641 | | |
3642 | 3642 | | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
3643 | 3652 | | |
3644 | 3653 | | |
3645 | 3654 | | |
| |||
0 commit comments