Skip to content

Python: .net, python: [BREAKING] Require minimum compatible copilot cli version - #10156

Merged
westey (westey-m) merged 2 commits into
microsoft:mainfrom
westey-m:copilot-cli-min-version
Nov 9, 2026
Merged

westey (westey-m) merged 2 commits into
microsoft:mainfrom
westey-m:copilot-cli-min-version

Conversation

@westey-m

Copy link
Copy Markdown
Collaborator

Motivation & Context

Require minimum compatible copilot cli version

Description & Review Guide

Require minimum compatible copilot cli version

Related Issue

Fixes #

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details:

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 17:00
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python .NET Usage: [Issues, PRs], Target: .Net labels Nov 6, 2026
@github-actions github-actions Bot changed the title .net, python: [BREAKING] Require minimum compatible copilot cli version .NET: .net, python: [BREAKING] Require minimum compatible copilot cli version Nov 6, 2026
@github-actions github-actions Bot changed the title .NET: .net, python: [BREAKING] Require minimum compatible copilot cli version Python: .net, python: [BREAKING] Require minimum compatible copilot cli version Nov 6, 2026

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.

🟡 Changes recommended

Startup cancellation can leak the owned Python CLI client, and .NET tests lack agent/client-boundary coverage for version rejection, status failures, retries, caching, and cancellation propagation.

2 open issues
What changed in this PR

Adds a minimum GitHub Copilot CLI requirement of 1.0.85 to the Python and .NET integrations, rejecting older or unreadable versions before agent execution.

Changes:

  • Adds runtime version checks during Python startup and the first .NET run.
  • Adds version-validation tests and Python startup cleanup tests.
  • Documents the minimum version and failure behavior.
File Description
python/​packages/​github_copilot/​tests/​test_github_copilot_agent.py Tests version acceptance, rejection, status failures, and owned-client cleanup.
python/​packages/​github_copilot/​README.md Documents the CLI requirement and affected configuration options.
python/​packages/​github_copilot/​agent_framework_github_copilot/​_agent.py Validates the CLI version during startup.
dotnet/​tests/​Microsoft.Agents.AI.GitHub.Copilot.UnitTests/​CopilotCliVersionGuardTests.cs Tests version validation and error construction.
dotnet/​src/​Microsoft.Agents.AI.GitHub.Copilot/​GitHubCopilotAgent.cs Checks the CLI version before execution and caches successful validation.
dotnet/​src/​Microsoft.Agents.AI.GitHub.Copilot/​CopilotCliVersionGuard.cs Adds version parsing and minimum-version enforcement.

Review effort: Balanced

@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.

MAF Automated Review — Iteration 1

Result: Findings reported
Scope: full PR (1 commit(s)): 10a7d5910176
Model: gpt-5.6-sol

Overview

The PR consistently validates the connected CLI before session creation, fails closed on unreadable versions, preserves cancellation in .NET, and adds useful boundary tests in both implementations. Python also attempts to roll back an owned client after rejection. Two lifecycle gaps remain: concurrent Python starts can let one failed check stop a client another start has accepted, and .NET does not roll back an owned client when its new validation fails.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
2 verified findings remained after source verification (2 medium) across 2 files. Details are attached to the affected lines below.

Affected areas: dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs, python/packages/github_copilot/agent_framework_github_copilot/_agent.py

@westey-m
westey (westey-m) added this pull request to the merge queue Nov 9, 2026
Merged via the queue into microsoft:main with commit 79db842 Nov 9, 2026
66 of 69 checks passed
@westey-m
westey (westey-m) deleted the copilot-cli-min-version branch November 9, 2026 10:48

This branch was previously deployed

1 inactive deployment
github-app-auth — d206d945 Deployed Nov 6, 2026 by westey-m via add_label #27320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants