Skip to content

Update Copilot SDK to 1.0.15-preview.1 and require typed drafts - #219

Merged
SIkebe merged 7 commits into
mainfrom
sikebe-copilot-sdk-preview-audit
Sep 24, 2026
Merged

SIkebe merged 7 commits into
mainfrom
sikebe-copilot-sdk-preview-audit

Conversation

@SIkebe

@SIkebe SIkebe commented Sep 23, 2026

Copy link
Copy Markdown
Owner

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 diagnostic GHCP001) 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 default gpt-5.6-luna model 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 PackAsTool fix (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's Session.StructuredOutput.cs and StructuredOutputE2ETests.cs.

Related Issues

N/A - no issue to close.

Scope

  • App UI / workflow
  • Core services / data model
  • Copilot SDK / agent behavior
  • Preview / WebView2
  • Documentation / release readiness
  • Tests / tooling
  • Other:

Validation

  • dotnet build RepoSyncRadar.sln -warnaserror (zero warnings/errors)
  • dotnet test RepoSyncRadar.sln --timeout 10m -- --filter-not-trait Category=Manual (1,374 passed)
  • Focused tests: AdoptionSessionTests and CopilotSessionFactoryTests passed; a live synthetic typed-schema request on gpt-5.6-luna returned all three required fields.
  • N/A - no UI/WebView changes; no manual smoke or screenshots required.

Risk And Rollback

  • User impact: sharing drafts now require schema-capable selected and fallback models. Existing drafts remain intact; failed generation does not overwrite them.
  • Operational risk: the typed SDK API is experimental, model/provider schema restrictions vary, and a timeout cancels waiting rather than in-flight agent work. Failed structured sends are not retried automatically to avoid duplicate model work or billing.
  • Rollback plan: revert this PR to restore the previous SDK and draft parser, or restore the legacy generation path in a separate compatibility change if support for schema-incompatible models becomes necessary.

Release Notes

  • User-facing change
  • Internal-only change
  • No release note needed

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.

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 AI balanced review requested due to automatic review settings September 23, 2026 12:44
Copilot stopped reviewing on behalf of SIkebe due to an error September 23, 2026 12:44

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.

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

Review effort: Lite
Findings: 3 Medium severity · 1 Low severity

Open (4)
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.SDK package 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.

Comment thread src/RepoSyncRadar.App/Copilot/SdkCopilotSession.cs Outdated
Comment thread src/RepoSyncRadar.App/Copilot/SdkCopilotSession.cs Outdated
Comment thread src/RepoSyncRadar.App/Copilot/SdkCopilotSession.cs
Comment thread src/RepoSyncRadar.App/Copilot/ICopilotSession.cs
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ce70d02b-05ec-4114-a0a8-4d7c177a4261
Copilot AI review requested due to automatic review settings September 23, 2026 12:50

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.

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)

@SIkebe
SIkebe merged commit c85c3b2 into main Sep 24, 2026
10 checks passed
@SIkebe
SIkebe deleted the sikebe-copilot-sdk-preview-audit branch September 24, 2026 03:05
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