Codex stop-gate review flagged that `HttpServerProvider::for_cli(Codex
| OpenCode)` claimed to work but was wired to a fabricated protocol:
- OpenAI's `codex` CLI does not ship a `serve` subcommand, so the
`for_cli(Codex)` path was guaranteed to fail at spawn.
- sst/opencode does ship `opencode serve`, but its real
request/response JSON shape was not validated against my
`{ "message": ... }` + newline-delimited `text/thinking/tool_use/
done/error` defaults — those were placeholders, not specs.
Original commit (0e27998e) called this out in the commit body but
the public API still pretended `for_cli` returned a working bridge
for either CLI, which is exactly the kind of false-confidence
codex objected to.
Fix:
- `for_cli(CliName)` now returns `None` for every variant, with a
doc comment explaining that the wire protocols haven't been
wired up. Callers who've verified a server's real protocol use
`with_binary(...)` and supply explicit binary + serve args +
chat path themselves.
- Module-level docs gained an explicit "honest scope note" listing
what is and isn't verified: the lifecycle plumbing (spawn,
stderr drain, listen-line discovery via `parse_listening_line`,
streaming response → parse_line dispatch, receiver-drop kill)
is structurally correct and reusable; the per-CLI protocol
defaults are placeholders.
- Tests updated: `for_cli_only_http_server_kinds` →
`for_cli_returns_none_pending_real_protocol_wiring` (asserts
every CliName now returns None); the trait-object + label tests
swapped to construct via `with_binary` with an arbitrary
binary, since that's the supported construction path today.
No code path was deleted — when a real `codex serve` or
`opencode serve` spec lands the work is "add a thin factory that
constructs an HttpServerProvider with the verified args + plug in
the matching response parser." The framework is ready; the
configuration is not.
Tests: 6 chat_http_server tests pass (was 7 — the redundant
codex/opencode label test was merged into the trait-object test).
Desktop total: 54 pass (was 55).