refactor(web): extract schema/config rendering into web_schema (web_server.py god-file slice R1-C6) - #79126
refactor(web): extract schema/config rendering into web_schema (web_server.py god-file slice R1-C6)#79126andrexibiza wants to merge 2 commits into
Conversation
…erver.py god-file slice R1-C6) Signed-off-by: andrexibiza <84248988+andrexibiza@users.noreply.github.com>
Signed-off-by: Andrex Ibiza, MBA <84248988+andrexibiza@users.noreply.github.com>
|
🔒 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 was generated by AI during triage. The description says the PR restored
Checked against |
Summary
Web_server.py god-file slice R1-C6: extract the schema/config rendering from
hermes_cli/web_server.pyintohermes_cli/web_schema.py(pure module). Part of the repo-wide large-file decomposition (tracker #78647).What changed and why
_build_schema_from_config,_SCHEMA_OVERRIDES,CONFIG_SCHEMA, provider/timezone options, etc., window 824–1311) byte-verbatim intohermes_cli/web_schema.pyweb_server.pyre-exports all 12 (seam identity verifiedis-identical); the dynamic-merge test's monkeypatch targets repointed toweb_schema.*_normalize_memory_provider_namehelper (5-line pure function, byte-identical to its original lineage) that upstream had deleted, into web_server.py's memory-provider section —web_schema's lazy import of it resolvesWhy this matters to users
The dashboard's dynamic config form renders from
CONFIG_SCHEMA. Extracting the schema pipeline into a pure module makes it independently testable and import-isolation-safe (no fastapi/starlette/web_server at module level) while keeping the rendered form byte-identical.Testing
pytest tests/test_web_server_schema_seam.py tests/hermes_cli/test_desktop_repo_discovery_config.py→ 22 passedaf7cf89b…on the original extraction; re-verified against the rebased tree)Coordination / interlock
test_prefix (CI collection) — coordinated across all six sibling PRsPart of #78647
Part of #78628