Update Copilot SDK to 1.0.15-preview.1 and require typed drafts - #219
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce70d02b-05ec-4114-a0a8-4d7c177a4261
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce70d02b-05ec-4114-a0a8-4d7c177a4261
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce70d02b-05ec-4114-a0a8-4d7c177a4261
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce70d02b-05ec-4114-a0a8-4d7c177a4261
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce70d02b-05ec-4114-a0a8-4d7c177a4261
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce70d02b-05ec-4114-a0a8-4d7c177a4261
Copilot stopped reviewing on behalf of
SIkebe due to an error
September 23, 2026 12:44
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
Review effort: Lite
Findings: 3
Open (4)
New validation behavior is introduced here (throwing when required structured fields are missing).… · New TheStructuredDraftrecord uses non-nullablestringproperties, but the method explicitly… · New TheStructuredDraftrecord uses non-nullablestringproperties, but the method explicitly… · New The new API requires a non-nullableTimeSpan timeout, while the existingSendAsyncuses… · New
What changed in this PR
This PR migrates adoption draft generation to Copilot SDK typed structured output, updates related dependencies/metadata, and adjusts tests/docs to match the new behavior.
Changes:
- Switch adoption draft generation from JSON parsing/repair to SDK typed structured output (
SendStructuredDraftAsync). - Update
GitHub.Copilot.SDKpackage version and corresponding third-party notices/tests. - Bump bundled Copilot CLI release metadata and document the new structured-output requirement.
| File | Description |
|---|---|
| tests/RepoSyncRadar.App.Tests/Copilot/AdoptionSessionTests.cs | Updates tests to exercise typed structured draft flow and failure behavior (no persistence on structured failure). |
| tests/RepoSyncRadar.App.Tests/Components/ThirdPartyNoticesPanelTests.cs | Aligns expected Copilot SDK version shown in notices UI. |
| src/RepoSyncRadar.App/Settings/ThirdPartyNotices.cs | Updates third-party notice entry for Copilot SDK version. |
| src/RepoSyncRadar.App/Copilot/SdkCopilotSession.cs | Adds SendStructuredDraftAsync using SDK typed structured output and maps it into DraftBundle. |
| src/RepoSyncRadar.App/Copilot/ICopilotSession.cs | Extends session interface with typed structured draft API. |
| src/RepoSyncRadar.App/Copilot/AdoptionSession.cs | Replaces legacy JSON parsing/repair flow with typed structured output call. |
| scripts/CopilotCliRelease.props | Updates Copilot CLI release version and checksums. |
| docs/USAGE.md | Documents that adoption drafts require models supporting structured output and errors aren’t repaired/resaved. |
| Directory.Packages.props | Bumps GitHub.Copilot.SDK dependency version. |
| .github/skills/copilot-sdk-dotnet-audit/SKILL.md | Adds guidance on validating required fields and handling structured-output failures. |
| .github/copilot-instructions.md | Updates repo guidance to reflect structured output requirement and error handling changes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce70d02b-05ec-4114-a0a8-4d7c177a4261
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The SDK metadata is consistent, structured-output failures are safely handled, and the changed behavior has focused coverage.
Review effort: Balanced
Findings: None
Resolved since last review (4)
TheStructuredDraftrecord uses non-nullablestringproperties, but the method explicitly… TheStructuredDraftrecord uses non-nullablestringproperties, but the method explicitly… New validation behavior is introduced here (throwing when required structured fields are missing).… The new API requires a non-nullableTimeSpan timeout, while the existingSendAsyncuses…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Upgrade the embedded Copilot SDK from 1.0.13 to 1.0.15-preview.1 so adoption drafts can use provider-native structured output instead of hand-parsing and repairing model prose. The selected (including automatically substituted) model must support JSON Schema; an unsupported schema or invalid typed response now fails visibly without saving or silently resending a turn.
The SDK update also refreshes the bundled Copilot CLI from 1.0.83 to 1.0.89-0. Release ZIP SHA-256 values for Windows x64 and arm64 come from the official CLI release assets, not npm tarballs. The SDK package metadata identifies source commit
cb6fc666cc45175adb11fa9e5021b96d7d37d298; its generated props pin CLI 1.0.89-0. The changes are split into chronological release commits, followed by separate structured-output adoption and legacy-code-removal commits.The public experimental
SendAndWaitAsync<T>API (GitHub.Copilot.SDK diagnosticGHCP001) supplies a per-turn strict JSON Schema and deserializes the resulting message. The app still checks all required fields before persisting and appends known official docs URLs. A live, synthetic, non-sensitive schema probe succeeded against the app's defaultgpt-5.6-lunamodel and bundled CLI; no prompt, response, or token was recorded. Unlike the probe, future selected/fallback models are assumed to support schemas and surface an explicit error if they do not. This removes the legacy JSON-extraction, repair, and plain-text recovery path, yielding 11 changed files and a net 301-line reduction.SDK changes absorbed without app source changes include reduced .NET inbound-event allocations (SDK #2733) and bounded HTTP response chunk coalescing (SDK #2734); these benefit session event handling and intercepted tool/inference streaming. The Node-only factory checkpoint API, Rust-only changes, .NET
PackAsToolfix (this app is not a .NET tool), managed-settings cache refresh UI, and host MCP OAuth metadata were not adopted because the app has no corresponding workflow. Auto Fast tier is not selected because the app currently uses an explicit default model. SDK structured-output contracts and tests are in SDK #2590 and the package'sSession.StructuredOutput.csandStructuredOutputE2ETests.cs.Related Issues
N/A - no issue to close.
Scope
Validation
dotnet build RepoSyncRadar.sln -warnaserror(zero warnings/errors)dotnet test RepoSyncRadar.sln --timeout 10m -- --filter-not-trait Category=Manual(1,374 passed)AdoptionSessionTestsandCopilotSessionFactoryTestspassed; a live synthetic typed-schema request ongpt-5.6-lunareturned all three required fields.Risk And Rollback
Release Notes
Release note draft: Sharing drafts now use the Copilot SDK's typed structured output. Select a model that supports JSON Schema; generation errors are shown without replacing existing drafts.