Skip to content

fix: janitor-wave-1#21

Draft
Kronprinz03 wants to merge 1 commit intomainfrom
janitor-wave-1
Draft

fix: janitor-wave-1#21
Kronprinz03 wants to merge 1 commit intomainfrom
janitor-wave-1

Conversation

@Kronprinz03
Copy link
Contributor

Changes

  • only allow arrays for status in getInstancesByBusinessKey
  • using getInstance instead of manual find operation
  • removing unused functions

Copy link
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

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

The PR makes clean, focused simplifications — narrowing the status parameter to always be an array, delegating to getInstance() internally, and removing the clear() method. The one substantive concern is the removal of clear(): as a singleton exported at module level, localWorkflowStore has no remaining way to reset its state between test runs, risking cross-test contamination. Please address that before merging.

PR Bot Information

Version: 1.18 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Correlation ID: 0cdd6a40-1c98-11f1-9d5f-4c4b4f9e8be3
  • Event Trigger: issue_comment.created
  • LLM: anthropic--claude-4.6-sonnet

clear(): void {
this.instances = [];
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Removing clear() breaks test isolation for LocalWorkflowStore

The clear() method was the only way to reset the singleton localWorkflowStore between test runs. Since localWorkflowStore is a module-level singleton, tests that share the same process will accumulate instances across test cases. Without clear(), there is no mechanism to reset state, which can cause cross-test contamination and flaky test results.

Consider retaining the clear() method, or provide an alternative reset mechanism (e.g., a reset() alias) to support test isolation.

Suggested change
}
clear(): void {
this.instances = [];
}
}

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

@hyperspace-insights hyperspace-insights bot deleted a comment from Kronprinz03 Mar 10, 2026
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.

1 participant