Description
When starting the ACP HTTP server via config autostart ([acp] transport = \"http\" or transport = \"both\"), the http_bind field from [acp] is silently ignored. The server always binds to the hardcoded default 127.0.0.1:9800.
Reproduction Steps
- Set in config:
[acp]\ntransport = \"http\"\nhttp_bind = \"127.0.0.1:9811\"
- Run:
cargo run --features full -- --config <config>
- Observe: server starts on
127.0.0.1:9800, not 9811
Expected Behavior
Server binds to the address specified in [acp] http_bind.
Actual Behavior
Server always binds to 127.0.0.1:9800 (hardcoded default in run_acp_http_server).
Root Cause
In src/runner.rs, when run_acp_http_server is called via autostart path (AcpTransport::Http / AcpTransport::Both), bind_override is passed as None (lines 206, 228). Inside run_acp_http_server (src/acp.rs:1348):
let bind_addr = bind_override.map_or_else(|| "127.0.0.1:9800".to_owned(), str::to_owned);
app.config().acp.http_bind is loaded into the AcpConfig struct (field exists, deserialized correctly), but is never consulted when determining the bind address. The config field is only displayed in /acp status output — never actually applied.
The CLI path (--acp-http --acp-http-bind <addr>) works correctly because it passes the CLI override explicitly; the autostart path has no equivalent.
Fix
In run_acp_http_server, fall back to app.config().acp.http_bind when bind_override is None:
let bind_addr = bind_override
.map(str::to_owned)
.unwrap_or_else(|| app.config().acp.http_bind.clone());
Environment
- Feature flags:
acp-http
- Relevant code:
src/acp.rs:1348, src/runner.rs:200-210, crates/zeph-config/src/ui.rs:317
Logs / Evidence
CI-604 live session: config had http_bind = "127.0.0.1:9811", server started and accepted connections only on port 9800. Confirmed by curl http://127.0.0.1:9811/health → connection refused, curl http://127.0.0.1:9800/health → 200 OK.
Description
When starting the ACP HTTP server via config autostart (
[acp] transport = \"http\"ortransport = \"both\"), thehttp_bindfield from[acp]is silently ignored. The server always binds to the hardcoded default127.0.0.1:9800.Reproduction Steps
[acp]\ntransport = \"http\"\nhttp_bind = \"127.0.0.1:9811\"cargo run --features full -- --config <config>127.0.0.1:9800, not9811Expected Behavior
Server binds to the address specified in
[acp] http_bind.Actual Behavior
Server always binds to
127.0.0.1:9800(hardcoded default inrun_acp_http_server).Root Cause
In
src/runner.rs, whenrun_acp_http_serveris called via autostart path (AcpTransport::Http/AcpTransport::Both),bind_overrideis passed asNone(lines 206, 228). Insiderun_acp_http_server(src/acp.rs:1348):app.config().acp.http_bindis loaded into theAcpConfigstruct (field exists, deserialized correctly), but is never consulted when determining the bind address. The config field is only displayed in/acp statusoutput — never actually applied.The CLI path (
--acp-http --acp-http-bind <addr>) works correctly because it passes the CLI override explicitly; the autostart path has no equivalent.Fix
In
run_acp_http_server, fall back toapp.config().acp.http_bindwhenbind_overrideisNone:Environment
acp-httpsrc/acp.rs:1348,src/runner.rs:200-210,crates/zeph-config/src/ui.rs:317Logs / Evidence
CI-604 live session: config had
http_bind = "127.0.0.1:9811", server started and accepted connections only on port 9800. Confirmed bycurl http://127.0.0.1:9811/health→ connection refused,curl http://127.0.0.1:9800/health→ 200 OK.