Turn-driver split slice 3 (epic #3804, wave 8). The streaming driver (_run_native_turn, server/chat.py) and the non-streaming driver (_chat_langgraph_impl's _native_turn) each carry their own copy of (a) the goal loop (kickoff injection, continuation, fresh-context continuations, hard cap, pause/handoff) and (b) the autonomous HITL auto-answer. The copies have drifted (#3872). Extract ONE implementation of each, used by both drivers.
Behaviour: identical to today on both drivers EXCEPT the #3872 fix — the non-streaming auto-answer resumes keyed by interrupt id like the streaming driver (flip the ODDITY characterization test for #3872 to the fixed behaviour; everything else in the characterization suites from #3869 must pass unchanged). Any OTHER divergence found between the two copies must be listed in the PR; keep each driver's current behaviour for those unless it is clearly the same bug class, and say which.
Fixes #3872. Part of #3804.
Turn-driver split slice 3 (epic #3804, wave 8). The streaming driver (
_run_native_turn, server/chat.py) and the non-streaming driver (_chat_langgraph_impl's_native_turn) each carry their own copy of (a) the goal loop (kickoff injection, continuation, fresh-context continuations, hard cap, pause/handoff) and (b) the autonomous HITL auto-answer. The copies have drifted (#3872). Extract ONE implementation of each, used by both drivers.Behaviour: identical to today on both drivers EXCEPT the #3872 fix — the non-streaming auto-answer resumes keyed by interrupt id like the streaming driver (flip the
ODDITYcharacterization test for #3872 to the fixed behaviour; everything else in the characterization suites from #3869 must pass unchanged). Any OTHER divergence found between the two copies must be listed in the PR; keep each driver's current behaviour for those unless it is clearly the same bug class, and say which.Fixes #3872. Part of #3804.