mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-21 07:02:25 +02:00
_needs_replay already gates on isinstance(spec, DeltaChannel), so the assert/isinstance checks inside the replay branch were unreachable. Replace with cast(DeltaChannel, spec) for zero-cost type narrowing that survives -O and avoids any runtime check. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>