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
Browse filesBrowse the repository at this point in the historyBrowse files
RealDiligent
committed
fix(selfhost): route the last two bare-Number() env knobs through parsePositiveIntEnv + preflight
LOOPOVER_SHUTDOWN_LOCK_RELEASE_AFTER_MS (src/server.ts) and OLLAMA_NUM_CTX
(src/selfhost/ai.ts) were the only self-host numeric knobs still read with a bare
Number(process.env.X ?? ""), the exact form #9157 replaced everywhere else. Both fail
the two ways that comment names: a unit-suffixed/separator value ("30s", "30_000")
NaN's and silently disables the opt-in with no signal, and a fractional value ("0.5")
is accepted — the shutdown deadline loses every race (bulk lock release fires on every
shutdown) and ollamaNumCtx floors 0.5 to 0.
Read both via parsePositiveIntEnv (server: { min: 0, fallback: 0 } to keep unset ⇒
wait-for-the-drain; ollama: { min: 1, fallback: 32_768 }), and add the paired
positiveInteger preflight entries so a malformed value hard-fails boot with a clear
message instead of only warning at use time. Defaults, the shutdown drain-first
ordering, and the ollama provider gate are unchanged.
Closes#10056
0 commit comments