@tdd_issue @tdd_issue_10398
Feature: TDD Issue #10398 — LangGraph._setup_node_stream_subscriptions stores and disposes RxPy Disposables
  As a CleverAgents developer
  I want LangGraph to store the Disposable returned by observable.subscribe()
  So that stop() can dispose all subscriptions and prevent resource leaks

  Background:
    Given the LangGraph module is available

  Scenario: LangGraph initialises an empty subscriptions list
    When I construct a LangGraph with default configuration
    Then the graph should have an empty _subscriptions list

  Scenario: _setup_node_stream_subscriptions stores Disposables
    Given a LangGraph instance with one worker node
    When I inspect the subscriptions after construction
    Then the _subscriptions list should contain at least one entry per node

  Scenario: stop() disposes all stored subscriptions
    Given a LangGraph instance with tracked disposable subscriptions
    When I call stop() on the graph
    Then every tracked disposable should have been disposed
    And the _subscriptions list should be empty after stop

  Scenario: stop() clears subscriptions even when dispose raises
    Given a LangGraph instance with a subscription that raises on dispose
    When I call stop() on the graph with a failing disposable
    Then stop() should complete without raising an exception
    And the _subscriptions list should be empty after the failing stop
