Repository navigation
Python: .net, python: [BREAKING] Require minimum compatible copilot cli version - #10156
Conversation
There was a problem hiding this comment.
🟡 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
There was a problem hiding this comment.
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

Motivation & Context
Require minimum compatible copilot cli version
Description & Review Guide
Require minimum compatible copilot cli version
Related Issue
Fixes #
AI Assistance
AI assistance details:
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.