Repository navigation
Python: .NET/Python: Validate CrewAI task identifiers - #14551
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
This PR aligns CrewAI task identifier handling across the .NET and Python clients by validating status task IDs consistently and adding unit tests that ensure valid IDs are preserved and invalid ones fail early.
Changes:
- Added task identifier validation to
.NETandPythonstatus retrieval methods. - Added unit tests in both languages for accepted and rejected task identifier formats.
- Ensured outgoing status request paths preserve valid identifiers unchanged.
| File | Description |
|---|---|
| python/semantic_kernel/core_plugins/crew_ai/crew_ai_enterprise_client.py | Adds task ID format validation before issuing status requests. |
| python/tests/unit/core_plugins/test_crew_ai_enterprise_client.py | Adds unit tests for preserving valid status task IDs and rejecting invalid ones without sending requests. |
| dotnet/src/Plugins/Plugins.AI/CrewAI/Client/CrewAIEnterpriseClient.cs | Validates taskId for null/whitespace and allowed characters before creating/sending the request. |
| dotnet/src/Plugins/Plugins.AI.UnitTests/CrewAI/CrewAIEnterpriseClientTests.cs | Adds unit tests for valid/invalid task IDs and verifies auth/request are skipped for invalid IDs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (2 commit(s)): 0615af898b18, 359be6ac0414
Model: gpt-5.6-sol
Overview
The PR applies the same whole-string ASCII allowlist in both clients before credentials are requested or HTTP paths are constructed. Focused tests cover accepted UUID-style identifiers, exact path preservation, and rejection of separators, control characters, Unicode, and non-string Python inputs without network activity. No publishable Critical, High, or Medium defect was established.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
### Motivation and Context Prepares the Semantic Kernel Python package for the `1.45.0` release after microsoft#14551 and microsoft#14552 merged. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Updates `semantic_kernel.__version__` from `1.44.1` to `1.45.0`. Validated the publishable package with `uv build --no-sources`; it produced: - `semantic_kernel-1.45.0.tar.gz` - `semantic_kernel-1.45.0-py3-none-any.whl` <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄


Motivation and Context
Align CrewAI task identifier handling across the .NET and Python clients and fail early for unsupported identifier formats.
Description
Contribution Checklist