Skip to content

Conversation

@leavesster
Copy link
Contributor

No description provided.

@leavesster leavesster requested a review from Copilot August 4, 2025 09:25
@leavesster leavesster enabled auto-merge (squash) August 4, 2025 09:25
Copy link
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 fixes an issue where the HandleDef dataclass was modifying the original raw dictionary passed to it, instead of working with a copy. The fix ensures that json_schema dictionaries are deep copied to prevent unintended side effects on the original data.

  • Adds deep copying of json_schema dictionary values in the __init__ method
  • Includes a test case to verify that the original dictionary remains unmodified after HandleDef initialization

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
oocana/oocana/handle.py Adds copy.deepcopy() calls to prevent modification of original json_schema dictionaries
oocana/tests/test_handle.py Adds test case to verify that json_schema conversion works and original dict is preserved

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@leavesster leavesster merged commit 61ba0bb into main Aug 4, 2025
5 checks passed
@leavesster leavesster deleted the output-def branch August 4, 2025 09:29
@oomol-bot oomol-bot mentioned this pull request Aug 4, 2025
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