Skip to content

Python: .NET/Python: Validate CrewAI task identifiers - #14551

Merged
SergeyMenshykh merged 2 commits into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-didactic-spoon
Oct 6, 2026
Merged

SergeyMenshykh merged 2 commits into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-didactic-spoon

Conversation

@SergeyMenshykh

@SergeyMenshykh SergeyMenshykh commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Motivation and Context

Align CrewAI task identifier handling across the .NET and Python clients and fail early for unsupported identifier formats.

Description

  • Validate CrewAI status task identifiers consistently in both implementations.
  • Add focused unit coverage for accepted and rejected identifier formats.
  • Preserve valid identifiers unchanged in outgoing status requests.

Contribution Checklist

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@SergeyMenshykh
SergeyMenshykh requested review from a team as code owners October 6, 2026 09:13
Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:13
@SergeyMenshykh SergeyMenshykh self-assigned this Oct 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.

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 Medium severity · 1 Low severity

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 .NET and Python status 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.

Comment thread python/semantic_kernel/core_plugins/crew_ai/crew_ai_enterprise_client.py Outdated
Comment thread python/semantic_kernel/core_plugins/crew_ai/crew_ai_enterprise_client.py Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@semantic-kernel-automation semantic-kernel-automation Bot added .NET Issue or Pull requests regarding .NET code python Pull requests for the Python Semantic Kernel labels Oct 6, 2026
@github-actions github-actions Bot changed the title .NET/Python: Validate CrewAI task identifiers .Net/Python: Validate CrewAI task identifiers Oct 6, 2026
@github-actions github-actions Bot changed the title .Net/Python: Validate CrewAI task identifiers Python: .NET/Python: Validate CrewAI task identifiers Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
core_plugins/crew_ai
   crew_ai_enterprise_client.py331166%47, 50–51, 71, 77, 80–82, 105–106, 110
TOTAL29110548081% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
4307 22 💤 0 ❌ 0 🔥 2m 11s ⏱️

@semantic-kernel-automation semantic-kernel-automation Bot left a comment

Copy link
Copy Markdown

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

@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Oct 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 6, 2026
@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Oct 6, 2026
Merged via the queue into microsoft:main with commit 1413593 Oct 6, 2026
37 checks passed
@SergeyMenshykh
SergeyMenshykh deleted the sergeymenshykh-didactic-spoon branch October 6, 2026 11:54
Boz (bozza-man) pushed a commit to Bruteforce-Group/semantic-kernel that referenced this pull request Oct 6, 2026
### 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 😄

This branch was previously deployed

2 inactive deployments
github-app-auth — 359be6ac Deployed Oct 6, 2026 by SergeyMenshykh via add_label #29271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Issue or Pull requests regarding .NET code python Pull requests for the Python Semantic Kernel

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants