Skip to content

fix: Explicit returns mixed with implicit (fall through) returns#376

Merged
Roopan-Microsoft merged 1 commit intodevfrom
psl-codeql-fixcodmod
Mar 24, 2026
Merged

fix: Explicit returns mixed with implicit (fall through) returns#376
Roopan-Microsoft merged 1 commit intodevfrom
psl-codeql-fixcodmod

Conversation

@Priyanka-Microsoft
Copy link
Copy Markdown
Collaborator

Purpose

  • ...
    This pull request makes a minor update to the select_agent function in comms_manager.py to ensure that None is explicitly returned when no matching case is found. This improves code clarity and makes the function's behavior more predictable.

  • Explicitly return None in select_agent when no matching case is found in comms_manager.py.

Does this introduce a breaking change?

  • Yes
  • [x ] No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to clarify the behavior of the SQL agents’ SelectionStrategy.select_agent by explicitly returning None when no selection case matches.

Changes:

  • Added an explicit return None at the end of the select_agent match block in comms_manager.py.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/backend/sql_agents/helpers/comms_manager.py
@Priyanka-Microsoft Priyanka-Microsoft changed the title fix: CodeQL Fixes fix: Explicit returns mixed with implicit (fall through) returns Mar 23, 2026
@Roopan-Microsoft Roopan-Microsoft merged commit e47b91c into dev Mar 24, 2026
11 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

🎉 This PR is included in version 1.6.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants