fix(langgraph): wire node stream on_next handlers to registered executors #10795
Merged
hurui200320
merged 2 commits from 2026-04-22 07:53:54 +00:00
bugfix/m3-node-stream-on-next-noop into master
2 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
58fa90b1b5 |
Merge branch 'master' into bugfix/m3-node-stream-on-next-noop
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 3m48s
CI / lint (pull_request) Successful in 3m53s
CI / quality (pull_request) Successful in 4m18s
CI / security (pull_request) Successful in 4m35s
CI / typecheck (pull_request) Successful in 4m38s
CI / integration_tests (pull_request) Successful in 6m48s
CI / e2e_tests (pull_request) Successful in 7m16s
CI / unit_tests (pull_request) Successful in 8m49s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 15m26s
CI / benchmark-regression (push) Waiting to run
CI / benchmark-publish (push) Waiting to run
CI / status-check (pull_request) Successful in 2s
CI / push-validation (push) Successful in 22s
CI / helm (push) Successful in 29s
CI / build (push) Successful in 3m52s
CI / lint (push) Successful in 3m57s
CI / quality (push) Successful in 4m21s
CI / typecheck (push) Successful in 4m29s
CI / security (push) Successful in 4m46s
CI / e2e_tests (push) Successful in 7m22s
CI / integration_tests (push) Successful in 7m28s
CI / unit_tests (push) Successful in 8m38s
CI / docker (push) Successful in 1m36s
CI / coverage (push) Successful in 15m44s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 37m45s
|
||
|
|
0d267934a7 |
fix(langgraph): wire node stream on_next handlers to registered executors
CI / push-validation (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 39s
CI / lint (pull_request) Successful in 3m55s
CI / build (pull_request) Successful in 3m50s
CI / typecheck (pull_request) Successful in 4m33s
CI / quality (pull_request) Successful in 4m58s
CI / security (pull_request) Successful in 5m18s
CI / e2e_tests (pull_request) Successful in 8m59s
CI / integration_tests (pull_request) Successful in 10m48s
CI / unit_tests (pull_request) Successful in 11m51s
CI / docker (pull_request) Successful in 1m55s
CI / coverage (pull_request) Successful in 16m37s
CI / status-check (pull_request) Successful in 3s
Replace the no-op on_next handlers in _setup_node_stream_subscriptions with factory-created callbacks that look up and invoke the per-node sync_executor registered by _register_node_executor. The previous code silently discarded every message delivered to node streams. Key changes: - Wire on_next to executor via _make_on_next_handler factory method - Store executors in _node_executors dict (not setattr on stream_router) - Shared ThreadPoolExecutor with proper lifecycle (start/stop/restart) - Prefer run_coroutine_threadsafe when scheduler loop is running; fall back to thread pool with deadlock prevention - Thread-safe StateManager: Lock on all mutation methods, deep-copy emission inside lock for immutable subscriber snapshots - replace_state() and reset() deep-copy input to prevent external mutation bypassing the lock (review cycle 5 M1 fix) - Best-effort cancellation documented on timed-out futures (cycle 5 M2) - CancelledError catch in thread pool path with "graph stopping" message - is_running guard on both sync_executor and execute() entry point - Checkpoint filenames include update_count to prevent collisions - _save_checkpoint docstring warns against calling while _lock is held - on_next handler distinguishes TimeoutError (warning) from other exceptions (exception log) for clearer diagnostics - TODO comment for deferred downstream propagation to successor nodes - __del__ safety net for executor pool cleanup - File I/O outside lock for checkpoint save/load - Bounded execution_history via collections.deque(maxlen=1000) See PR !10795 for the full change log across 5 review cycles. ISSUES CLOSED: #6511 |