Split make_server_env, eliminate all runtime sx_ref imports, fix auth-menu tests
make_server_env split into 7 focused setup functions: - setup_browser_stubs (22 DOM no-ops) - setup_scope_env (18 scope primitives from sx_scope.ml) - setup_evaluator_bridge (CEK eval-expr, trampoline, expand-macro, etc.) - setup_introspection (type predicates, component/lambda accessors) - setup_type_operations (string/env/dict/equality/parser helpers) - setup_html_tags (~100 HTML tag functions) - setup_io_env (query, action, helper IO bridge) Eliminate ALL runtime sx_ref.py imports: - sx/sxc/pages/helpers.py: 24 imports → _ocaml_helpers.py bridge - sx/sxc/pages/sx_router.py: remove SX_USE_REF fallback - shared/sx/query_registry.py: use register_components instead of eval Unify JIT compilation: pre-compile list derived from allowlist (no manual duplication), only compiler internals pre-compiled. Fix test_components auth-menu: ~auth-menu → ~shared:fragments/auth-menu Tests: 1114 OCaml, 29/29 components, 35/35 regression, 6/6 Playwright Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -173,10 +173,7 @@ async def eval_sx_url(raw_path: str) -> Any:
|
||||
return None
|
||||
else:
|
||||
# Python fallback
|
||||
if os.environ.get("SX_USE_REF") == "1":
|
||||
from shared.sx.ref.async_eval_ref import async_eval
|
||||
else:
|
||||
from shared.sx.async_eval import async_eval
|
||||
from shared.sx.async_eval import async_eval
|
||||
|
||||
try:
|
||||
page_ast = await async_eval(expr, env, ctx)
|
||||
|
||||
Reference in New Issue
Block a user