Skip to content

fix: build error and failing test#270

Merged
PureWeen merged 1 commit intomainfrom
fix/test-failures-build-error
Mar 3, 2026
Merged

fix: build error and failing test#270
PureWeen merged 1 commit intomainfrom
fix/test-failures-build-error

Conversation

@PureWeen
Copy link
Copy Markdown
Owner

@PureWeen PureWeen commented Mar 3, 2026

Summary

Fixes two issues preventing the test suite from passing:

1. Build error in CopilotService.cs (CS0126)

CreateSessionAsync returns Task<AgentSessionInfo> but had a bare return; on the early-exit path (when a session is closed during SDK creation). Changed to return info;.

2. Failing test: AvailableModes_OnNonDesktop_IsRemoteOnly

PlatformHelper.AvailableModes was updated to include Demo mode on non-desktop in DEBUG builds, but the test still asserted Assert.Single(). Updated the test to expect [Remote, Demo] in DEBUG and [Remote] in Release.

Verification

All 1700 tests pass after these changes (run twice to confirm no flakiness).

- CopilotService.cs: Fix CS0126 build error — bare `return;` in
  CreateSessionAsync which returns Task<AgentSessionInfo>. Changed to
  `return info;` for the early-exit path when a session is closed
  during SDK creation.

- PlatformHelperTests.cs: Update AvailableModes_OnNonDesktop test to
  account for Demo mode being available in DEBUG builds. The
  PlatformHelper was updated to include Demo on non-desktop in DEBUG
  but the test was not updated to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen PureWeen merged commit 3ead5ec into main Mar 3, 2026
@PureWeen PureWeen deleted the fix/test-failures-build-error branch March 3, 2026 17:19
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.

1 participant