Root cause: pre-compiled compiler helper functions (compile-expr, compile-cond, etc.) produce bytecode that loops when processing deeply nested ASTs like tw-resolve-style. The test suite passes because _jit_compiling prevents compiled function execution during compilation — all functions run via CEK. The server pre-compiled helpers, so they ran as bytecode during compilation, triggering loops. Fix: - _jit_compiling guard on the "already compiled" hook branch prevents compiled functions from running during JIT compilation. Compilation always uses CEK (correct for all AST sizes). Normal execution uses bytecode (fast). - "compile" itself marked as jit_failed_sentinel — never JIT compiled. Runs via CEK, while its helpers use bytecode for normal (non-compile) execution. - Server hook uses call_closure (own VM per call) for IO suspension safety. MCP uses call_closure_reuse (fast, no IO needed). The underlying bytecode bug in the compiled helpers remains — fixing it requires diagnosing which specific helper loops and why. This is tracked as a separate issue. Server now starts in ~30s (pre-warm) and serves pages correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
145 KiB
145 KiB