Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Completion callbacks now run synchronously during native-backed teardown, while tests cover only wrapper/subscription reentrancy, leaving node/context shutdown reentrancy needing human review and ROS runtime validation.
No open issues 🎉
What changed in this PR
Aligns RxJS observable subscriptions with rclnodejs’s node-owned entity lifecycle, so observable completion and destroyed state follow the underlying ROS 2 subscription.
Changes:
- Adds a subscription subclass that completes its observable during entity finalization.
- Shares subscription creation logic while preserving node registration and delegating wrapper destruction to the node.
- Adds lifecycle regression tests and documents teardown, retry, and unsubscribe behavior.
| File | Description |
|---|---|
types/observable_subscription.d.ts |
Documents ownership, destroyed state, and completion semantics. |
types/node.d.ts |
Documents observable completion on subscription or node destruction. |
test/test-observable-subscription.js |
Adds registration, teardown, finalization, and destruction-retry coverage. |
lib/subscription.js |
Allows the subscription factory to instantiate subclasses. |
lib/observable_subscription.js |
Moves observable ownership into the subscription entity and delegates wrapper lifecycle operations. |
lib/node.js |
Extracts shared creation logic and registers observable subscription entities. |
Review effort: Balanced
Reject creation and dispatch during teardown, preserve cleanup retries, and cover generic finalizer reentrancy independently of observable subscriptions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the node's owning context live while forcing real native startup failure through an uninitialized context. Verify failed starts preserve stopped state and can recover without weakening teardown guards. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.