refactor(web): extract model-assignment helpers into web_server_model_assignment (web_server.py god-file slice R1-C9) - #79123
Open
andrexibiza wants to merge 1 commit into
Conversation
…_assignment (web_server.py god-file slice R1-C9) Signed-off-by: andrexibiza <84248988+andrexibiza@users.noreply.github.com>
This was referenced Aug 5, 2026
Contributor
Author
|
🔒 This shard is part of the web_server.py KILL LOCK — the permanent record of the 17,700-line whole, the mess it caused (#58576 event-loop stalls, #60800 cold-start stalls, #53972 token persistence, #71778 analytics), every shard in the wave, and every open fixer PR still fighting the surface (#50188 #71802 #54034 #76764 #71150 #67365 #65434 #65424 #78411 #75845 #68022 #62654 #76757 #68251 #51070 #73605 #73849 #73393 #71752 #77808 #46956 #74297 #77853). Lock: posted on #78628 · Indexed by the Kill All Gods meta-issue #78647. |
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.
Summary
Web_server.py god-file slice R1-C9: extract the model-assignment helpers from
hermes_cli/web_server.pyintohermes_cli/web_server_model_assignment.py(pure module, no app coupling). Part of the repo-wide large-file decomposition (tracker #78647).What changed and why
_normalize_main_model_assignment+_apply_main_model_assignmentbyte-verbatim (window 1423–1593) intohermes_cli/web_server_model_assignment.pyweb_server.pyre-exports both names (seam identity:web_server.X is web_server_model_assignment.X)web_server.load_config→web_server_model_assignment.load_config(function globals now live in the new module);test_moa_set_models_preserves_extra_keys.pycorrectly keeps patchingweb_server.load_config(direct call in web_server's own namespace)Why this matters to users
web_server.py(17,700 lines at this slice's base) is one of the repo's 20 god files. Extracting cohesive clusters one PR at a time makes the dashboard surface auditable, testable, and safe to evolve — the large-file decomposition is the prerequisite for every subsequent fix on this surface.Testing
pytest tests/hermes_cli/test_web_server_model_assignment_seam.py tests/hermes_cli/test_web_server_model_assignment_aggressive.py tests/hermes_cli/test_normalize_main_model_assignment.py→ 40 passedis-identity,__module__check)Coordination / interlock
Part of #78647
Part of #78628