Summary
End-to-end smoke test validating the full pipeline with a real Codex CLI: message → ChannelBridge → CodexCliRuntime → codex CLI → NDJSON streaming → AgentDeliveryResult. Gated behind LIVE=1 environment variable. Mirrors the Claude smoke test (#34, PR #35).
Context
The Claude smoke test (PR #35) established the pattern: ChannelBridge → CLI runtime → real subprocess → assertion on result. This test applies the same pattern to Codex, additionally exercising CodexMcpConfigManager's setup/teardown lifecycle (TOML config.toml merge-restore).
CLIs are pre-authenticated on the developer machine — no API key env var checks needed.
Acceptance Criteria
Given the middleware is implemented and ChannelBridge works (PR #33)
When a LIVE=1 smoke test is executed with a pre-authenticated codex CLI
Then a test message is sent through ChannelBridge → CodexCliRuntime
And a coherent text response is received via NDJSON streaming
And the session ID is captured and a follow-up message resumes the session
And the test is skippable in CI (gated behind LIVE=1 environment variable)
Architecture
File
src/middleware/__smoke__/codex.live.test.ts
Pattern
Same as claude.live.test.ts (PR #35):
describe.skipIf(!LIVE) guard
beforeAll: create temp dir, SessionMap, ChannelBridge with provider: "codex"
- Test 1: single-turn response (assert payloads, text, sessionId, aborted=false)
- Test 2: session resumption (same channel/user → same sessionId)
afterAll: cleanup temp dir
- 60s timeout per test
Codex-Specific
- No
CLAUDECODE env var unset needed (only Claude has this concern)
- Codex uses
CodexMcpConfigManager for TOML config.toml merge-restore — this is exercised implicitly when MCP config is provided
Related
Dependencies
Estimate
~80 LoC (reuses pattern from claude.live.test.ts)
Summary
End-to-end smoke test validating the full pipeline with a real Codex CLI: message → ChannelBridge → CodexCliRuntime →
codexCLI → NDJSON streaming → AgentDeliveryResult. Gated behindLIVE=1environment variable. Mirrors the Claude smoke test (#34, PR #35).Context
The Claude smoke test (PR #35) established the pattern:
ChannelBridge→ CLI runtime → real subprocess → assertion on result. This test applies the same pattern to Codex, additionally exercisingCodexMcpConfigManager's setup/teardown lifecycle (TOMLconfig.tomlmerge-restore).CLIs are pre-authenticated on the developer machine — no API key env var checks needed.
Acceptance Criteria
Architecture
File
Pattern
Same as
claude.live.test.ts(PR #35):describe.skipIf(!LIVE)guardbeforeAll: create temp dir, SessionMap, ChannelBridge withprovider: "codex"afterAll: cleanup temp dirCodex-Specific
CLAUDECODEenv var unset needed (only Claude has this concern)CodexMcpConfigManagerfor TOMLconfig.tomlmerge-restore — this is exercised implicitly when MCP config is providedRelated
Dependencies
Estimate
~80 LoC (reuses pattern from claude.live.test.ts)