Skip to content

Conversation

@matthiasgeihs
Copy link
Contributor

@matthiasgeihs matthiasgeihs commented Oct 10, 2025

Explanation

Currently calling ShieldController.start repeatedly will create several event subscriptions.
This PR proposes to make start and stop idempotent, so that calling start won't have an effect if the controller is already started, and the same for stop, respectively.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Make ShieldController.start/stop idempotent; update tests and changelog.

  • Controller:
    • Make start()/stop() idempotent in src/ShieldController.ts by adding #started flag and guarding subscribe/unsubscribe.
  • Tests:
    • Update ShieldController.test.ts to use setupCoverageResultReceived and add a test ensuring repeated start()/stop() calls are tolerated.
  • Changelog:
    • Add Unreleased note: "Make start and stop idempotent" in CHANGELOG.md.

Written by Cursor Bugbot for commit 457c056. This will update automatically on new commits. Configure here.

@matthiasgeihs matthiasgeihs marked this pull request as ready for review October 10, 2025 15:42
@matthiasgeihs matthiasgeihs requested review from a team as code owners October 10, 2025 15:42
cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@lwin-kyaw lwin-kyaw left a comment

Choose a reason for hiding this comment

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

LGTM!

@matthiasgeihs matthiasgeihs enabled auto-merge (squash) October 10, 2025 16:03
@matthiasgeihs matthiasgeihs merged commit 1baf335 into main Oct 10, 2025
243 checks passed
@matthiasgeihs matthiasgeihs deleted the mg/shield/make-start-idempotent branch October 10, 2025 16:10
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