Skip to content

fix: resolved the intermittent HR issue related to not passing the cross team check gate - #1172

Merged
Dhruvkumar-Microsoft merged 1 commit into
devfrom
psl-bug-hr
Oct 6, 2026
Merged

Dhruvkumar-Microsoft merged 1 commit into
devfrom
psl-bug-hr

Conversation

@Dhruvkumar-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request updates the create_RAI_agent utility to ensure that the original team object passed by the caller is not mutated. Instead, a copy is created and modified for use in the RAI agent, improving code safety and preventing unintended side effects. The tests are updated and expanded to verify this behavior.

Refactoring to prevent mutation of input team:

  • src/backend/common/utils/team_utils.py: Instead of modifying the input team object directly, the function now creates a copy using model_copy(update={...}) to set the RAI-specific fields. This prevents accidental changes to the caller's team object.
  • src/backend/common/utils/team_utils.py: The copied rai_team is now passed to the agent as team_config, ensuring the original team remains unchanged.

Test updates and new regression test:

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Coverage

Coverage Report •
FileStmtsMissCoverMissing
common/utils
   team_utils.py114992%135–136, 138–144
TOTAL383555285% 

Tests Skipped Failures Errors Time
841 0 💤 0 ❌ 0 🔥 7.724s ⏱️

@Dhruvkumar-Microsoft
Dhruvkumar-Microsoft merged commit ed58f52 into dev Oct 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants