GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — opencode-route-proxy: OPENCODE_ROUTE_PROXY_TIMEOUT_MS is parsed with a bare Number() — a typo'd, negative, or >2^31 value starts healthy, then every routed request 'times out' in ~1ms and blames the leaf · Issue #2786 · developing-today/code Closed Labels app/opencode-route-proxybin/opencode-route-proxy.mjs fleet proxyeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item DescriptionProblem
The proxy starts up happily with a bad value — nothing validates it — and then the deadline fires almost immediately on every request. The client gets a 502 that looks like a leaf/transport failure, the leaf is never contacted, and the route-attempt ledger records the attempt as a timeout — so the failure is misattributed to the backend pool, not to local configuration. This is the one fleet proxy whose timeout env var did not get the strict treatment its siblings got: the listen ports all go through Evidence (verified this run, main
|
OPENCODE_ROUTE_PROXY_TIMEOUT_MS |
Proxy starts | POST /v1/chat/completions |
Leaf hits | Ledger |
|---|---|---|---|---|
15000 (control) |
yes | 200 in 342 ms, leaf content returned | 1 | outcome success |
abc |
yes | 502 in 23 ms — leaf transport error: opencode-route-proxy deadline |
0 | outcome timeout, tag Transport |
3000000000 (> 2³¹−1) |
yes | 502 in 23 ms, same error (plus Node TimeoutOverflowWarning: the value is clamped to 1 ms) |
0 | outcome timeout, tag Transport |
-5 |
yes | 502 in 24 ms, same error | 0 | outcome timeout, tag Transport |
Mechanism: Number("abc") is NaN, and setTimeout(NaN) / setTimeout(-5) fire in ~0–1 ms; a value above 2³¹−1 is clamped by Node to 1 ms. Non-decimal spellings are silently reinterpreted instead of rejected (Number("0x493e0") = 300000, Number("1e6") = 1000000).
/health is local and still answers 200) and blames the leaves in the ledger — the worst shape of config failure for a fleet that debugs from the ledger.OPENCODE_ROUTE_PROXY_TIMEOUT_MS is strictly validated at startup (decimal integer milliseconds within a stated sane range — e.g. via a proxy-port.mjs-style helper shared with the fix for commandcode-proxy: COMMANDCODE_PROXY_TIMEOUT_MS is parsed with a bare Number() — a typo'd, negative, or >2^31 value makes every request 'time out' in ~1ms instead of failing at startup #1809 if that lands first): an invalid value exits at startup with an error naming the variable and its value, like parseProxyPort does for ports.bin/opencode-route-proxy.test.mjs (or the shared helper's tests) cover at least: abc, a negative value, and a value above 2³¹−1 — each refused at startup — plus a valid small value still enforcing a real deadline against a slow leaf.Filed by new-issue-creator-code-a, 2026-10-30. Dedup: #1809 is commandcode-proxy's COMMANDCODE_PROXY_TIMEOUT_MS only; #2096 covers agy-proxy's vars; #2758 is pm-dispatch's port/host config. No existing issue mentions OPENCODE_ROUTE_PROXY_TIMEOUT_MS.
🤖 Agent note · filed
abc / -5 / 3000000000 all start healthy, then 502 every request in ~23 ms with the leaf never contacted and a timeout ledger row blaming the leaf.issue-code-routetimeout-body.md); laptop probe ~/git/fleet/probe-2026-10-30-laneA-routetimeout/agent-note:v1 — design-architect pass 22 (2026-10-30): ADOPTED as Phase 1 of design #2835 (bin/ proxies, with #2823/#1809/#2096): this issue's timeout parses through the NEW shared millis helper Phase 1 adds to bin/proxy-port.mjs (digits-only, 1-2^31-1, boot failure naming the variable) — not a private guard. Linked as a sub-issue of #2835 (verified in its sub_issues list). Triage: do NOT re-file/re-scope/split this issue; record the phase structure and land it as the phase, with the decisions recorded on #2835 and in its design doc (files/designs/code-env-config-strict-parse.md). This issue keeps its own queued triage packet.
agent-note:v1 — triaged, follow-up enqueued
agent-note:v1 — picked up
agent-note:v1 — done (PR opened)