Skip to content

Conversation

@aonnikov
Copy link
Member

No description provided.

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
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 introduces a clone depth limit mechanism to prevent potential stack overflow or performance issues from deeply nested object cloning. The changes modify the clone function to accept a depth parameter and stop cloning when the depth limit is reached.

  • Added depth parameter to the clone function with a default value of 5
  • Updated the Hierarchy class to explicitly pass a depth limit of 5 when cloning
  • Added comprehensive test coverage for the new depth limiting functionality

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/core/src/clone.ts Added depth parameter and depth checking logic to prevent infinite recursion
packages/core/src/hierarchy.ts Updated clone call to explicitly pass depth limit of 5
packages/core/src/tests/clone.test.ts Added comprehensive test suite covering clone functionality and depth limiting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@haiodo haiodo left a comment

Choose a reason for hiding this comment

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

Please support old behaviour

@huly-github-staging
Copy link

Connected to Huly®: UBERF-13269

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
haiodo
haiodo previously approved these changes Aug 25, 2025
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
@haiodo haiodo merged commit 40a72af into develop Aug 25, 2025
25 of 26 checks passed
@haiodo haiodo deleted the fix-clone branch August 25, 2025 11:23
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.

3 participants