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-acp-adapter: --server value is never validated — a trailing --server silently talks to the default serve, --server= / a flag-like value loop forever on 'Failed to parse URL', and a typo'd flag is silently ignored · Issue #6939 · developing-today/code Closed Labels app/opencode-acp-adapterbin/opencode-acp-adapter.mjs — ACP-to-HTTP adapter for the standing OpenCode serveeffort/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 jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests Descriptionopencode-acp-adapter:
|
| Invocation | Observed |
|---|---|
control: --server http://127.0.0.1:9 |
started; server=http://127.0.0.1:9; event stream fetch failed; reconnecting (connection refused on the named port — the named server is the one being dialled) |
--server (trailing) |
started; server=http://127.0.0.1:13420 — the explicit flag silently dropped, default serve used |
--server= |
started; server= — event stream error: Failed to parse URL from /api/event; reconnecting (1s retry loop, never exits); initialize still returns success |
--server --bogus-flag |
started; server=--bogus-flag — event stream error: Failed to parse URL from --bogus-flag/api/event; reconnecting, same loop |
--sever http://127.0.0.1:9 (typo) |
started; server=http://127.0.0.1:13420 — unknown flag silently ignored, default serve used |
This adapter is the bridge between the ACP gateway (acpx/OpenClaw) and the standing OpenCode serve: prompts, sessions, and the server password resolved in serverPassword() all go to whatever serverBase resolves to. Silently falling back to the default serve means a mis-typed launch sends a session's prompts — authenticated with the standing server's credential — to a different server than the operator configured, and the only evidence is a debug line nobody has on by default. The empty/flag-like cases are the opposite failure with the same silence problem: the process never fails fast, initialize succeeds, and the misconfiguration surfaces only as an endless reconnect loop and per-session URL-parse errors that name no flag and no value.
This is the concrete instance for this script of the repo's strict-argv problem class (umbrella design #3352; sibling instances #3469 for the quota exporters, #3415, #3449) — those filings do not touch this file.
--server with a missing (trailing), empty (--server= or --server ""), or flag-like (--…) value fails fast at startup: a usage error on stderr naming the flag and the offending value, non-zero exit, before the event stream starts and before any ACP traffic is served.--server value that is not a parseable http:/https: URL fails the same way at startup — never as a per-request Failed to parse URL reconnect loop.--server <url>, --server=<url>, trailing slashes stripped, OPENCODE_ACP_SERVER env fallback, and the built-in default when neither is given.bin/opencode-acp-adapter.test.mjs cover: trailing --server, --server=, flag-like --server value, and a non-URL value — each asserting the fast non-zero exit naming --server; the existing well-formed --server control keeps passing and the full suite passes.--sever typo) follows the contract chosen under Design: unknown means stop — one strict argument contract for the repo's operator scripts #3352 — at minimum it must not silently change which server is dialled without a stderr signal.Related: #3352 (umbrella strict-argv design), #3469 (same failure class in the three quota exporters — different files, different argv code).
🤖 Agent note · filed
--server value in bin/opencode-acp-adapter.mjs parseServerUrl — fail fast at startup on a trailing/empty/flag-like/non-URL value instead of silently dialling the default serve or looping on URL-parse errors.bin/opencode-acp-adapter.test.mjs.~/git/fleet/probe-acp-server-arg (laptop); related issue Design: unknown means stop — one strict argument contract for the repo's operator scripts #3352, issue pm-stack(quota-exporters): opt() in all three exporters takes a flag token as a value — '--out-dir --cdp-port 19222' writes the export into a directory named '--cdp-port', the flag token is consumed twice, and a non-numeric --cdp-port becomes a NaN CDP outage #3469🤖 Agent note · picked up
🤖 Agent note · picked up — Agent: queue worker (repo-worker-code), lane code-n — Session/ID: task 11326, repo-queue-worker-shift-n 2026-11-09 run. Task 11326 (small_fix) for issue #6939: opencode-acp-adapter validate --server value. Fresh check: issue #6939 OPEN, no held/user/owned/do-not-merge/do-not-auto-edit labels. Execution lane = direct (row 3645), so this lane works it: validate --server in bin/opencode-acp-adapter.mjs per the issue acceptance criteria, with regression tests.
🤖 Agent note · done — Agent: queue worker (repo-worker-code), lane code-n — Session/ID: task 11326, repo-queue-worker-shift-n 2026-11-09 run. Task 11326 (small_fix) for issue #6939 resumed from the prior attempt's pushed work (§10 resume, don't restart): branch queue/11326-6939-acp-server-validate / PR #8054 already carried the --server validation fix. Verified fresh this shift: node --test bin/opencode-acp-adapter.test.mjs — 18/18 pass on the laptop worktree at b1aa662 (8 new #6939 regression tests included); Codex review posted no concrete findings (its summary comment carried no finding threads and a usage-limit notice). Merged PR #8054 (squash) — merge sha b236b1d; issue #6939 CLOSED.