You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Validate LOOPX_EFFECT_RUNTIME_IDLE_MS before starting the managed runtime #4106
The value is passed directly to setTimeout(). A non-numeric value becomes NaN and is effectively scheduled as an immediate timeout; zero and negative values have the same practical failure mode. The managed server can therefore close while the Python client is still waiting for readiness.
Reproduction with LOOPX_EFFECT_RUNTIME_IDLE_MS=not-a-number through effect_runtime_result("runtime.ping", ...) currently surfaces the misleading outer error:
runtime_exited_before_ready: TypeScript Effect runtime exited before becoming ready
The actual configuration error is lost.
Expected behavior
The server should validate this environment value before publishing runtime information or listening. Invalid values should fail fast with a stable, actionable configuration diagnostic; they must never silently become an immediate shutdown timer.
Proposed scope
Parse the setting as a finite base-10 integer with documented lower and upper bounds.
Keep the existing default when the variable is unset.
Reject non-numeric, zero, negative, fractional, and unsafe/overflowing values before server startup.
Propagate a stable error code/message through the managed-runtime startup path.
Ensure a rejected startup leaves no usable/stale runtime-info file behind.
Acceptance criteria
Tests cover unset, valid short timeout, non-numeric, zero, negative, fractional, and excessively large values.
Invalid configuration produces the dedicated diagnostic rather than runtime_exited_before_ready.
A valid short timeout still allows at least one request and then shuts the idle server down normally.
Tests exercise the real managed Python-to-TypeScript startup boundary, not only the parser helper.
Non-goals
Redesigning runtime ownership or converging services behind loopxd.
Changing the normal idle lifecycle when the configured value is valid.
Activity