refactor(gateway): extract auto-continue helpers from run.py (slice 8 of #54962) - #77706
Open
andrexibiza wants to merge 2 commits into
Open
refactor(gateway): extract auto-continue helpers from run.py (slice 8 of #54962)#77706andrexibiza wants to merge 2 commits into
andrexibiza wants to merge 2 commits into
Conversation
… of NousResearch#54962) Signed-off-by: andrexibiza <84248988+andrexibiza@users.noreply.github.com>
This was referenced Aug 4, 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.
Related #54962 #55138
What / Why
Slice 8 of the
gateway/run.pygod-file extraction campaign (#54962): a puremove of the auto-continue noise / history-media cluster out of the
26,823-line messaging gateway module into a focused new module,
gateway/auto_continue_helpers.py.Moved verbatim (zero behavior change, no refactor, docstrings/comments kept):
_last_transcript_timestamp_is_auto_continue_noise_strip_auto_continue_noise_collect_auto_append_media_tags_collect_history_media_paths(with nested_add_text_media_paths)_AUTO_CONTINUE_NOTE_PREFIX,_AUTO_CONTINUE_FALLBACK_PREFIX,_AUTO_APPEND_MEDIA_TOOL_NAMES,_JSON_MEDIA_TOOL_PATH_FIELDS,_TOOL_MEDIA_REgateway/run.pynow re-exports the five functions via a top-of-filemodule-attribute import, so every existing
gateway.run.<name>reference(tests,
gateway/platforms/base.py) stays green without edits.How to test
Expected:
import gateway.runsucceeds (no circular import), all five namesresolve as
gateway.run.<name>attributes, and the five referencing testsuites pass. On this machine: 65 passed; the 2 failures in those files
(
test_streamed_explicit_media_resend_is_delivered,test_quoted_spaced_home_path_is_collected_in_delivery_form) arepre-existing Windows path-normalization environment failures — verified by
stash-proving the identical 2 failures against pristine
main.Platforms tested
import gateway.run+ targeted pytest suites green,scripts/check-windows-footguns.pyclean on both files,git diff --checkclean.Shrink
gateway/run.py: 26,823 → 26,597 lines (−234 moved, +8 import lines; net −226)Part of #54962
Part of #55138
Part of #78207
Part of #78647