GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 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 · Issue #1809 · developing-today/code

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

New issue
Copy link
New issue
Copy link
Closed
Closed
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
Copy link
Assignees
dezren39
Labels
app/commandcode-proxybin/commandcode-proxy.mjs fleet proxyeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

commandcode-proxy: COMMANDCODE_PROXY_TIMEOUT_MS is parsed with a bare Number() — a typo'd, negative, or >2³¹ value makes every request "time out" in ~1 ms instead of failing at startup

Evidence

bin/commandcode-proxy.mjs:60 (main e91098f1):

const TIMEOUT_MS = Number(process.env.COMMANDCODE_PROXY_TIMEOUT_MS || 240000);

No validation follows. TIMEOUT_MS drives every timeout in the proxy:

  • :567 — the ACP request() timer (ACP … timed out after ${timeoutMs}ms),
  • :675 / :682 — the ACP prompt timer, and the request timer derived as timeoutMs + 30000,
  • :945 — the spawn-fallback kill timer,
  • :1067 — the user-visible error text: `commandcode timed out after ${TIMEOUT_MS}ms`.

The sibling env values in the same bin/ family were hardened against exactly this failure class: ports go through the strict shared parser in bin/proxy-port.mjs (#483, #494 — "a bare parseInt is not a validator"), which fails at startup naming the variable and its value. The timeout never got the same treatment.

Probe (laptop, verbatim :60 expression + the same setTimeout use as :567/:675/:945)

Probe: ~/git/fleet/probe-2026-10-28-laneB-cctimeout/probe.mjs:

COMMANDCODE_PROXY_TIMEOUT_MS parsed TIMEOUT_MS timer fired after
abc NaN ~6 ms (TimeoutNaNWarning … set to 1)
240000junk NaN ~1 ms
-5000 -5000 ~2 ms (TimeoutNegativeWarning … set to 1)
9999999999999 9999999999999 ~2 ms (TimeoutOverflowWarning … does not fit into a 32-bit signed integer … set to 1)
300 (control) 300 ~306 ms

Why it matters

One typo in the service environment (a unit, a home-manager option, a hand edit) silently converts the proxy into a machine that fails every chat/agency request instantly, while reporting commandcode timed out after NaNms (or after -5000ms) — an error that points at the upstream engine, not at the configuration. The proxy starts cleanly and answers /health, so supervisors see a healthy process. A large-but-sane-looking value (e.g. 9999999999999, or anything above 2³¹−1 ≈ 24.8 days in ms) overflows Node's timer the same way. Startup is the right place for this to fail, as the port parser already established for this family.

Acceptance criteria

  • An invalid COMMANDCODE_PROXY_TIMEOUT_MS (non-numeric, trailing junk, zero, negative, or above a pinned maximum ≤ 2³¹−1) makes the proxy exit at startup with an error naming the variable and its value, in the style of proxy-port.mjs's parseProxyPort.
  • The parsing lives in a shared/strict helper (extending proxy-port.mjs or a sibling) rather than an inline copy unique to this proxy, or the triage comment pins why inline is right here.
  • Tests in bin/commandcode-proxy.test.mjs (or the helper's test file) cover: unset → 240000 default; a plain value → itself; each invalid class above → startup error.
  • No behaviour change for valid values: ACP request/prompt timers and the spawn kill timer receive the same millisecond values as today.

Related: #483 / #494 (strict port parsing for this same proxy family).

Activity

Next
  1. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-743

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/commandcode-proxybin/commandcode-proxy.mjs fleet proxy
    effort/xsTrivial: expected under 30 minutes of work
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b run 2026-10-28 15:20 CDT
    • Found via: filed this run
    • Task: Filed after verifying on main e91098f1 that bin/commandcode-proxy.mjs:60 parses COMMANDCODE_PROXY_TIMEOUT_MS with a bare Number() and no validation, while every timeout in the proxy (ACP request :567, prompt :675, spawn kill :945, error text :1067) consumes it. Laptop probe of the verbatim expression + same setTimeout use: 'abc'/'240000junk' → NaN, timer fires ~1-6ms; '-5000' → fires ~2ms; '9999999999999' → TimeoutOverflow, fires ~2ms; control '300' → 306ms. The bin/ family's ports were hardened against this exact class in bin proxies: *_PROXY_PORT parsed with bare parseInt — invalid values crash opaquely or bind the wrong port #483/antigravity-ls-proxy: ANTIGRAVITY_LS_ADDRESS port parsed with bare parseInt — malformed addresses silently discarded, managed daemon spawned instead #494 (proxy-port.mjs strict parser, startup failure naming the variable); the timeout was not.
    • Expectation: effort/xs — triage pins the valid range/max (≤2^31−1) and whether the strict parser extends proxy-port.mjs or a sibling helper; startup failure naming variable+value; tests for unset/plain/each invalid class.
    • Links: packet queue-packets/packet-1809.json (repo-health-code-pilot, triage); probe ~/git/fleet/probe-2026-10-28-laneB-cctimeout/ (laptop); related bin proxies: *_PROXY_PORT parsed with bare parseInt — invalid values crash opaquely or bind the wrong port #483, antigravity-ls-proxy: ANTIGRAVITY_LS_ADDRESS port parsed with bare parseInt — malformed addresses silently discarded, managed daemon spawned instead #494
  4. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  5. dezren39
    added a parent issue on Oct 30, 2026
    • Design: env numbers are arguments — one strict parse for boot-time configuration #2835
  6. dezren39
    added
    source/design-architectFiled by the repo design architect job
    on Oct 30, 2026
  7. dezren39 commented on Oct 30, 2026

    @dezren39
    dezren39
    on Oct 30, 2026
    MemberAuthor
    More actions

    agent-note:v1 — design-architect pass 22 (2026-10-30): ADOPTED as Phase 1 of design #2835 (bin/ proxies, with #2823/#2786/#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.

  8. dezren39
    removed
    status/needs-triageNot yet triaged; needs a first look
    on Nov 1, 2026
  9. 73 remaining items

  10. dezren39
    added
    queue/queuedHas a queued queue task
    status/needs-triageNot yet triaged; needs a first look
    and removed
    work/assignedQueue worker lifecycle state
    on Nov 5, 2026
  11. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: fleet monitor
    • Session / ID: task 7726 (repo-fleet-monitor run 2026-11-05T15:45:48Z)
    • Found via: monitor reconciliation (Duty 1 claim/label divergence repair)
    • Task: Claim evaporated: task 7726 is queued and unclaimed in repo-health-code-pilot, but this issue still carried claimed labels. Labels reset to the truth (queue/queued + status/needs-triage). Checkpoint stage at evaporation: handed_off.
    • Expectation: The next lane claim picks task 7726 up from the queued state and posts a fresh pickup note.
  12. dezren39
    added
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 8, 2026
  13. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane L shift
    • Session / ID: task 7726
    • Found via: queue claim (resume of prior parked state)
    • Fresh ownership check (2026-11-08T00:27Z): PR fix(commandcode-proxy): validate timeout at startup (#1809) #4026 is still OPEN, non-draft, authored by dezren39, and issue 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 is still OPEN and assigned to dezren39. The prior park condition is unchanged, so this lane does not touch PR fix(commandcode-proxy): validate timeout at startup (#1809) #4026 or create competing work.
    • Parked: task 7726 parked 12h. Resume condition: PR fix(commandcode-proxy): validate timeout at startup (#1809) #4026 merged/closed or Drew unassigns issue 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 — then re-triage at current main.
  14. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · closed as superseded — target file decommissioned on main

    • Agent: queue worker (repo-worker-code), lane code-h
    • Session / ID: task 13373 (pr_shepherd, batch issue Unowned PR batch from branch disposition (2026-11-07) #7297 part 3)
    • Found via: queue claim
    • Fresh revalidation (2026-11-08T16:20Z): PR fix(commandcode-proxy): validate timeout at startup (#1809) #4026 OPEN, no hard-stop labels, Codex review clean on head 36acc19 (has_any_findings=false), diff itself sound (switch COMMANDCODE_PROXY_TIMEOUT_MS to the shared strict parseProxyMillis). But the PR is CONFLICTING/DIRTY against current main.
    • Why it cannot and should not land: rebasing onto current origin/main in laptop worktree /home/user/git/fleet/13373-4026 produced modify/delete conflicts: bin/commandcode-proxy.mjs and bin/commandcode-proxy.test.mjs were DELETED on main by commit 1ad7042 chore(proxy): decommission the retired CLI proxy lineage (Drew, 2026-11-06), which also removed bin/commandcode-proxy-start.sh. Verified independently via the GitHub API: that commit lists all three files as removed, and GET contents/bin/commandcode-proxy.mjs?ref=main returns 404. COMMANDCODE_PROXY_TIMEOUT_MS exists nowhere on current main; the successor bin/opencode-route-proxy.mjs already parses its timeout with the same strict parseProxyMillis.
    • Disposition: PR fix(commandcode-proxy): validate timeout at startup (#1809) #4026 closed as superseded (branch left untouched, not deleted by hand); issue 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 closed with this evidence — the buggy code path no longer exists, so the defect cannot occur. Rebase aborted, PR head unchanged at 36acc19.
    • Links: issue 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, issue Unowned PR batch from branch disposition (2026-11-07) #7297, commit 1ad7042, task 13373
  15. dezren39
    closed this as completedon Nov 8, 2026
  16. dezren39
    added
    status:done
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  17. dezren39 commented on Nov 9, 2026

    @dezren39
    dezren39
    on Nov 9, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (already_done)

    • Agent: repo queue worker, lane code-t (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-t run 2026-11-09; task 14327
    • Found via: claimed task 14327 this shift (small_fix follow-on for issue 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, revived from task 5042); execution-lane assignment returned opencode (lane row 5560), but fresh revalidation shows the work is already resolved, so the task completes here instead of handing off.
    • Evidence: issue 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 is CLOSED (stateReason COMPLETED) at 2026-11-08T16:20:46Z by task 13373 (lane code-h): the target file bin/commandcode-proxy.mjs was decommissioned on main by commit 1ad7042, the buggy COMMANDCODE_PROXY_TIMEOUT_MS parse exists nowhere on current main, the successor proxy already uses the strict parse, and fix PR fix(commandcode-proxy): validate timeout at startup (#1809) #4026 was closed as superseded. The defect cannot occur.
    • Outcome: task 14327 completed as already_done; no code changed, no PR opened.
    • Links: task 14327 · issue 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 · PR fix(commandcode-proxy): validate timeout at startup (#1809) #4026 · commit 1ad7042
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/commandcode-proxybin/commandcode-proxy.mjs fleet proxyeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.