Skip to content

Fix active .NET and Python CI failures - #2093

Merged
SteveSandersonMS merged 4 commits into
mainfrom
stevesa/ci-fixes
Jul 27, 2026
Merged

Fix active .NET and Python CI failures#2093
SteveSandersonMS merged 4 commits into
mainfrom
stevesa/ci-fixes

Conversation

@SteveSandersonMS

Copy link
Copy Markdown
Contributor

Summary

  • Select the correct platform-specific Copilot CLI package in .NET E2E tests instead of relying on directory enumeration order.
  • Distinguish glibc and musl Linux packages using the runtime identifier.
  • Pin Ruff 0.16.0 and format Python README code samples with that version.

Root causes

  • Linux .NET jobs could select copilot-linuxmusl-x64 on glibc runners because both optional packages are installed and directory order is unspecified.
  • Python CI resolves Ruff 0.16.0 without a tracked lockfile, while the README was formatted for an older Ruff release.

Validation

  • uv run ruff format --check .
  • uv run ruff check
  • dotnet build test/GitHub.Copilot.SDK.Test.csproj --no-restore
  • Two targeted .NET E2E tests with GITHUB_ACTIONS=true (2 passed)

Select the platform-specific Copilot CLI package deterministically in .NET E2E tests, and pin/format with Ruff 0.16.0 to match CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 08458e95-8971-4192-b070-aac26b87ad70
Copilot AI review requested due to automatic review settings July 27, 2026 15:34
@SteveSandersonMS
SteveSandersonMS requested a review from a team as a code owner July 27, 2026 15:34

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.

Pull request overview

Fixes CI instability in .NET E2E CLI resolution and Python formatting.

Changes:

  • Selects the platform-, libc-, and architecture-specific Copilot CLI package.
  • Pins Ruff 0.16.0 and reformats Python README examples.
Show a summary per file
File Description
dotnet/test/Harness/E2ETestContext.cs Resolves the correct platform-specific CLI package.
python/pyproject.toml Pins the Ruff version used by CI.
python/README.md Applies Ruff 0.16.0 formatting to examples.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actions

This comment has been minimized.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 08458e95-8971-4192-b070-aac26b87ad70
Copilot AI review requested due to automatic review settings July 27, 2026 16:12
@github-actions

This comment has been minimized.

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.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Medium

Comment thread dotnet/test/Harness/E2ETestContext.cs Outdated
Comment thread dotnet/test/E2E/SessionE2ETests.cs Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 08458e95-8971-4192-b070-aac26b87ad70
Copilot AI review requested due to automatic review settings July 27, 2026 16:35

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.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread dotnet/test/E2E/SessionE2ETests.cs Outdated
@github-actions

This comment has been minimized.

@github-actions github-actions Bot 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.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by SDK Consistency Review Agent for #2093 · 38.9 AIC · ⌖ 5.5 AIC · ⊞ 5.2K

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 08458e95-8971-4192-b070-aac26b87ad70
Copilot AI review requested due to automatic review settings July 27, 2026 17:20

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.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review

This PR makes two main changes:

  1. Fixes the .NET E2E test harness CLI discovery to use a platform-specific package prefix (copilot-linux*, copilot-linuxmusl*, copilot-darwin*, copilot-win32*) instead of the broad copilot-* glob.
  2. Fixes a flaky .NET abort-recovery E2E test.

The abort-recovery test fix looks consistent with how other SDKs handle similar scenarios. ✅

Potential Consistency Gap: CLI Platform Package Discovery

The .NET harness fix (using platform-specific glob) addresses a real problem: when multiple platform packages are installed under @github/, a broad copilot-* glob could match the wrong one (e.g., picking copilot-linux-x64 on a macOS runner).

The Go E2E harness has the same broad-glob pattern that was just fixed in .NET:

// go/internal/e2e/testharness/context.go, line 37
matches, _ := filepath.Glob(filepath.Join(base, "copilot-*", "index.js"))

And similarly in go/client_test.go (line 843).

For completeness, it may be worth applying the same platform-aware narrowing to the Go harness — though this is a non-blocking suggestion since the test might work fine in practice if only one platform package is ever installed in CI.

Summary

Area Status
.NET harness CLI discovery ✅ Fixed in this PR
.NET abort-recovery test ✅ Fixed in this PR
Go harness CLI discovery ⚠️ Still uses broad copilot-* glob (same as pre-fix .NET)
Python harness CLI discovery N/A – uses COPILOT_CLI_PATH env var directly
Node/Java/Rust Not affected

Overall this is a focused, well-scoped fix. The Go harness gap is worth tracking but not a blocker.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by SDK Consistency Review Agent for #2093 · 40.9 AIC · ⌖ 5.31 AIC · ⊞ 5.2K ·

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