-
Notifications
You must be signed in to change notification settings - Fork 2
Upstream sync: Port 39 new commits from copilot-sdk (2026-03-24) #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0a28670
Initial plan
Copilot e5ed692
Port upstream changes: forward compat, no-result permission, skipPerm…
Copilot ca278a8
Update tests, docs, CHANGELOG, and .lastmerge for upstream sync
Copilot 75c7ee1
Fix for pull request finding 'Missing catch of NumberFormatException'
edburns 6593665
Avoid ambiguity in comparison.
edburns dcfa9d4
Fix for pull request finding 'Equals on incomparable types'
edburns 2edf741
Initial plan
Copilot 720cc87
Fix compilation errors: PermissionRequestResultKind valueOf/name to c…
Copilot a912420
Fix compilation errors: PermissionRequestResultKind is a class, not a…
Copilot abf63cd
Merge branch 'copilot/sync-upstream-39-new-commits' into copilot/fix-…
edburns 3da4948
Merge pull request #21 from github/copilot/fix-github-actions-workflo…
edburns 727e767
Introduce MessageAttachment sealed interface for type-safe attachments
Copilot 14b6672
Add 'Missing Override annotation'
edburns 1324222
On branch copilot-pr-20 Fix "2. **`SessionRequestBuilder.extractTrans…
edburns 2d85705
On branch copilot-pr-20 Address "5. **`NO_RESULT` permission handlin…
edburns 698da99
Fix Spotless line-ending violation in ExtractedTransforms.java
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,5 @@ blog-copilotsdk/ | |
| .claude/worktrees | ||
| smoke-test | ||
| *job-logs.txt | ||
| temporary-prompts/ | ||
| changebundle.txt* | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 062b61c8aa63b9b5d45fa1d7b01723e6660ffa83 | ||
| 40887393a9e687dacc141a645799441b0313ff15 |
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
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
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
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
30 changes: 30 additions & 0 deletions
30
src/main/java/com/github/copilot/sdk/ExtractedTransforms.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| package com.github.copilot.sdk; | ||
|
|
||
| import java.util.Map; | ||
| import java.util.concurrent.CompletableFuture; | ||
| import java.util.function.Function; | ||
|
|
||
| import com.github.copilot.sdk.json.SystemMessageConfig; | ||
|
|
||
| /** | ||
| * Result of extracting transform callbacks from a {@link SystemMessageConfig}. | ||
| * <p> | ||
| * Holds a wire-safe copy of the system message config (with transform callbacks | ||
| * replaced by {@code action="transform"}) alongside the extracted callbacks | ||
| * that must be registered with the session. | ||
| * | ||
| * @param wireSystemMessage | ||
| * the system message config safe for JSON serialization; may be | ||
| * {@code null} when the input config was {@code null} | ||
| * @param transformCallbacks | ||
| * transform callbacks keyed by section identifier; {@code null} when | ||
| * no transforms were present | ||
| * @see SessionRequestBuilder#extractTransformCallbacks(SystemMessageConfig) | ||
| */ | ||
| record ExtractedTransforms(SystemMessageConfig wireSystemMessage, | ||
| Map<String, Function<String, CompletableFuture<String>>> transformCallbacks) { | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handleSystemMessageTransform() writes to
resultfrom async completion handlers (synchronized) but also writes toresultin theelsebranch without synchronization. If any transform callback completes on another thread while iteration is still running, this can cause concurrent modification of the non-thread-safe LinkedHashMap (and nondeterministic output). Consider synchronizing all writes toresult(including the else branch) or using a concurrent map / collecting results after all futures complete.