openpencil/crates
Kayshen-X c3d0bb30cd fix(desktop/chat): downgrade HttpServer for_cli — wire protocol not verified
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).
2026-05-14 17:06:07 +08:00
..
anthropic-agent-sdk chore(crates): move vendored SDKs into workspace as forkable crates 2026-05-14 16:49:17 +08:00
copilot-sdk chore(crates): move vendored SDKs into workspace as forkable crates 2026-05-14 16:49:17 +08:00
openpencil-app feat(openpencil-app): skeleton crate (Stage F entry placeholder) 2026-05-03 22:05:00 +08:00
openpencil-desktop fix(desktop/chat): downgrade HttpServer for_cli — wire protocol not verified 2026-05-14 17:06:07 +08:00
openpencil-shell-core fix(desktop/chat): address codex review BLOCKs + CONCERNs on chat backend trio 2026-05-14 16:16:24 +08:00
openpencil-shell-native fix(shell): 3 codex stop-gate regressions (anchor drag, MCP id, doc load reset) 2026-05-14 15:18:02 +08:00
openpencil-shell-web feat(shell): export dialog + multi-format raster (PNG/JPEG/WEBP) + Property-panel preview 2026-05-14 14:02:52 +08:00
pen-codegen chore(workspace): cargo-deny 0.18 activation (Phase 1 Task 1.8 Step 6) 2026-05-03 23:05:00 +08:00
pen-core chore(workspace): cargo-deny 0.18 activation (Phase 1 Task 1.8 Step 6) 2026-05-03 23:05:00 +08:00
pen-engine chore(workspace): cargo-deny 0.18 activation (Phase 1 Task 1.8 Step 6) 2026-05-03 23:05:00 +08:00
pen-figma chore(workspace): cargo-deny 0.18 activation (Phase 1 Task 1.8 Step 6) 2026-05-03 23:05:00 +08:00
pen-types feat(pen-types): skeleton crate (bucket A) 2026-05-03 22:35:00 +08:00
wasm-libc-shim style(shell): cargo fmt --all (rustfmt-clean) 2026-05-10 18:47:33 +08:00
CLAUDE.md feat(shell): canonical .op loader + jian-core layout + visual fidelity pass 2026-05-14 09:26:08 +08:00