Skip to content

Fix reattach reliability issues - #447

Open
nlivie wants to merge 2 commits into
mainfrom
gngangomtiem/fix-reattach
Open

nlivie wants to merge 2 commits into
mainfrom
gngangomtiem/fix-reattach

Conversation

@nlivie

@nlivie nlivie commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

This PR fixes Reattach/Retarget failures caused by account switching, hidden environment pickers, concurrent sync operations, deleted remote agents, unawaited Pull operations, and incomplete rollback handling. It also prevents duplicate notifications and false success messages.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Picker rejection handling, refresh account selection, and premature sync-guard release leave unresolved correctness issues.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
What changed in this PR

Improves Reattach/Retarget reliability across the VS Code extension and language server.

Changes:

  • Refactors account/environment selection, rollback handling, and command outcomes.
  • Adds remote-agent existence checks and awaited Refresh operations.
  • Adds regression tests and updates notification handling.
File Description
src/​vscode-extensions/​microsoft-powerplatformlang-extension/​client/​src/​types.ts Adds remote-check protocol fields.
src/​vscode-extensions/​microsoft-powerplatformlang-extension/​client/​src/​tests/​host/​reattachAgent.test.ts Tests reattach flows and failure handling.
src/​vscode-extensions/​microsoft-powerplatformlang-extension/​client/​src/​sync/​workspaceSynchronizer.ts Adds Pull error-notification suppression.
src/​vscode-extensions/​microsoft-powerplatformlang-extension/​client/​src/​services/​logger.ts Categorizes reattach warnings.
src/​vscode-extensions/​microsoft-powerplatformlang-extension/​client/​src/​constants.ts Defines reattach warning telemetry.
src/​vscode-extensions/​microsoft-powerplatformlang-extension/​client/​src/​commands/​reattachAgent.ts Refactors selection, refresh, rollback, and outcomes.
src/​LanguageServers/​PowerPlatformLS/​UnitTests/​PowerPlatformLS.UnitTests/​Impl.PullAgent/​Methods/​ReattachAgentHandlerTests.cs Tests non-mutating remote existence checks.
src/​LanguageServers/​PowerPlatformLS/​Impl.PullAgent/​ReattachAgentResponse.cs Adds remote existence result.
src/​LanguageServers/​PowerPlatformLS/​Impl.PullAgent/​ReattachAgentRequest.cs Adds remote-check request option.
src/​LanguageServers/​PowerPlatformLS/​Impl.PullAgent/​ReattachAgentHandler.cs Checks whether the connected remote agent exists.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 01:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Account-binding races, incorrect endpoint-resolution identity, and notification-held sync locks remain unresolved.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)
Resolved since last review (3)

workspaceUri: string,
accountInfo: AccountInfo
): void => {
const connection = readConnectionFile(workspaceUri);
});
}
);
await logCommandOutcome(outcome);
Comment on lines +271 to +272
if (!requestSyncInfo.agentManagementEndpoint) {
await tryRepairAgentManagementEndpoint(requestSyncInfo, workspaceUri);
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