refactor(aux): extract aux streaming cluster into agent/aux_streaming.py (R5 C-B) - #80043
Open
andrexibiza wants to merge 1 commit into
Open
refactor(aux): extract aux streaming cluster into agent/aux_streaming.py (R5 C-B)#80043andrexibiza wants to merge 1 commit into
andrexibiza wants to merge 1 commit into
Conversation
…R5 C-B) Move the progress-hooked chat.completions streaming machinery out of the agent/auxiliary_client.py godfile (window 8221-8558) into a dedicated agent/aux_streaming.py module: _AUX_STREAM_CEILING_* constants, _aux_stream_total_ceiling, _client_streams_internally, _is_streaming_rejected_error, _provider_requires_stream, _create_with_progress, _aggregate_chat_stream, _ChatStreamAccumulator, _aggregate_chat_stream_async and _acreate_with_stream. The godfile keeps an identity re-export block so every moved name resolves is-identical through agent.auxiliary_client (callers, the compression pipeline, and tests keep importing from the godfile unchanged). Godfile-owned dependencies (logger, wire-adapter client classes, error predicates, _aux_progress_active/_notify_aux_progress) are imported lazily inside the moved functions to keep the module import-order independent. Adds tests/test_aux_streaming_seam.py asserting real identity for all 11 re-exported names plus accumulator/stream-aggregation smoke coverage. Epic NousResearch#78647, target NousResearch#78635. Zero behavior change. Signed-off-by: Andrex Ibiza, MBA <84248988+andrexibiza@users.noreply.github.com>
This was referenced Aug 6, 2026
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.
refactor(aux): extract aux streaming cluster into agent/aux_streaming.py (R5 C-B)
Slice
agent/auxiliary_client.py(9,976 lines @ pin) — large-file decomposition tracker [COMPLETE] Large-file decomposition: 20/20 done #78647, target Shard agent/auxiliary_client.py (god-file decomposition) #78635_acreate_with_streamend @8558; code-only 8236–8558)agent/aux_streaming.py— streaming cluster (_ChatStreamAccumulator-adjacent machinery,_acreate_with_stream+ siblings)b7c02fb3c28dfe8cb2f231eab2aac04ee64f6d5b9e7575523eb1f8bd41b58e49· code-only32939194cf97e72a2b883bb89a7a6e4c918348eeca2344e7b9e03c30a31928d1— both verified byte-identical after sanctioned seams (difflib 0)Seam identity
Every moved name re-exports through
agent.auxiliary_clientwith realis-identity (11/11 both import orders)._RELAY_AUX_CALL_CONTEXTcorrectly stays in the godfile (absent from the moved module)._is_streaming_rejected_errordefined + re-exported but uncalled — identical to base status quo, preserved intentionally.Double-blind review (2 reviewers, never 1)
Tests
tests/test_aux_streaming_seam.py+tests/agent/test_aux_progress_streaming.py(the analysis watch item): 25/25 fresh isolated run (independent receipt)test_auxiliary_explicit_cancellationalso green through the seamZero collateral
git show --stat: godfile diff = import + re-export + window deletion only. ruff clean,git diff --checkclean, LF-only, DCO-signed.Interlock
Part of #78647
Part of #78635
Kill lock posted on #78635. Collision discipline: no #78378 (R3 fallback), #62260/#74320/#56367 (R1 C5), #79862 (R4-C1 vision) territory touched.