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
design-code-proxy: DESIGN_CODE_PROXY_BACKEND_TIMEOUT_MS has no upper bound — a value over 2^31-1 is silently truncated to ~24.8 days, defeating the #2097 silent-backend timeout (house parseProxyMillis bypassed) #4225
bin/design-code-proxy.mjs parses DESIGN_CODE_PROXY_BACKEND_TIMEOUT_MS with a hand-rolled Number() guard that checks only Number.isFinite(raw) && raw > 0 — no upper bound and no integer-spelling check. Values above 2^31−1 are silently truncated by Node's timer layer to 2147483647 ms (~24.8 days), so a too-large value defeats the #2097 backend-inactivity timeout instead of extending it modestly; non-decimal spellings (0x10 → 16 ms, 1e5) are also admitted. The house helper for exactly this — parseProxyMillis in the sibling bin/proxy-port.mjs, which this file already imports parseProxyPort from — refuses anything outside integer 1..2147483647 at startup, naming the variable.
bin/proxy-port.mjs:50-70 (md5 b833b6038a74d5a34b78306c70702f0f): MAX_TIMEOUT_MS = 2147483647 and parseProxyMillis/parseProxyMillisValue refuse non-integer or out-of-range values with a startup error naming the env var. design-code-proxy.mjs:4 already imports from this module (ports only).
Laptop probe (Node v24.21.0): an HTTP request to a silent local server with req.setTimeout(2147483648, cb):
(node) TimeoutOverflowWarning: 2147483648 does not fit into a 32-bit signed integer.
Timer duration was truncated to 2147483647.
no timeout callback within 3000ms
So DESIGN_CODE_PROXY_BACKEND_TIMEOUT_MS=2147483648 (or any larger finite value, e.g. a typo'd extra zero) does not produce an error and does not produce the requested timeout — it produces a ~24.8-day inactivity timeout, i.e. a silent backend holds the client request and a pooled keep-alive socket effectively forever, which is exactly the hang #2097 added this timeout to prevent. Conversely 0x10 is admitted as a 16 ms timeout, which would kill every slow-but-alive backend call.
Why it matters
The timeout is a hang-protection mechanism; a configuration path that silently converts it to ~25 days (or to 16 ms) removes the protection while the process starts healthy and logs nothing. Sibling proxies' env numbers are being moved onto the strict helper family (#2835 design; per-file instances filed for other proxies), and this one was missed because it has a partial guard — finite-and-positive looks validated at a glance.
Acceptance criteria
DESIGN_CODE_PROXY_BACKEND_TIMEOUT_MS is parsed through parseProxyMillis (or an equivalent strict check): decimal integer, 1..2147483647, startup error naming the variable and value otherwise.
Unset/empty keeps the 60_000 ms default.
Tests in bin/design-code-proxy.test.mjs cover: 2147483648 refuses to start (or is refused by the parse), 0x10 / 1e5 refused, a valid value (e.g. 5000) honoured.
Activity
dezren39 commentedon Nov 2, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 2, 2026
agent-note:v1
event: picked_up
task: 6114 (repo-health-code-pilot, repo-worker-code; openchamber-scheduled-lane 7b47536b)
state: claimed; triaging #4225 on fresh origin/main before any work.
26 remaining items
dezren39 commentedon Nov 3, 2026
🤖 Agent note · parked
node --test bin/design-code-proxy.test.mjson the laptop: 19 pass, 0 fail.queue/8758-4225-design-code-timeout-parseMerge pull request #5155 from developing-today/queue/8758-4225-design…
dezren39 commentedon Nov 3, 2026
agent-note:v1
state: done (task 8758)