Skip to content

Conversation

@fraxken
Copy link
Member

@fraxken fraxken commented Jul 18, 2025

No description provided.

@fraxken fraxken requested review from clemgbld and Copilot July 18, 2025 16:46
@changeset-bot
Copy link

changeset-bot bot commented Jul 18, 2025

🦋 Changeset detected

Latest commit: e6feab6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nodesecure/js-x-ray Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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 with probe context management in the ProbeRunner class by implementing proper deep cloning and context reset functionality. The changes ensure that probe contexts are isolated and properly restored after execution.

  • Implements deep cloning of probe contexts using structuredClone() to prevent mutation of original contexts
  • Adds context reset functionality to restore probe contexts to their original state after finalization
  • Updates type definitions to improve clarity between probe context and initialization context

Reviewed Changes

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

File Description
workspaces/js-x-ray/src/ProbeRunner.ts Implements deep cloning logic, adds symbol for original context storage, and updates context reset in finalize method
workspaces/js-x-ray/test/ProbeRunner.spec.ts Adds comprehensive test case to verify deep cloning and context reset behavior
.changeset/ninety-adults-shout.md Documents the fix in changeset for release notes

@fraxken fraxken force-pushed the proberunner-ctx-preserve branch from d51a3ca to fbc0b0e Compare July 18, 2025 16:57
…nner

Update workspaces/js-x-ray/test/ProbeRunner.spec.ts

Co-authored-by: Copilot <[email protected]>
@fraxken fraxken force-pushed the proberunner-ctx-preserve branch from fbc0b0e to e6feab6 Compare July 18, 2025 16:57
@fraxken fraxken merged commit 14cb982 into master Jul 18, 2025
6 checks passed
@fraxken fraxken deleted the proberunner-ctx-preserve branch July 18, 2025 17:00
@github-actions github-actions bot mentioned this pull request Jul 18, 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.

3 participants