forked from openclaw/openclaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Implement LIVE=1 smoke test for Gemini CLI runtime #36
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
End-to-end smoke test validating the full pipeline with a real Gemini CLI: message → ChannelBridge → GeminiCliRuntime → gemini 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 Gemini, additionally exercising GeminiMcpConfigManager's setup/teardown lifecycle (.gemini/settings.json 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 gemini CLI
Then a test message is sent through ChannelBridge → GeminiCliRuntime
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__/gemini.live.test.ts
Pattern
Same as claude.live.test.ts (PR #35):
describe.skipIf(!LIVE)guardbeforeAll: create temp dir, SessionMap, ChannelBridge withprovider: "gemini"- 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
Gemini-Specific
- No
CLAUDECODEenv var unset needed (only Claude has this concern) - Gemini uses
GeminiMcpConfigManagerfor.gemini/settings.jsonmerge-restore — this is exercised implicitly when MCP config is provided
Related
- Part of 4-CLI smoke test suite: Implement LIVE=1 smoke test for Claude CLI runtime #34 (Claude ✅), Implement LIVE=1 smoke test for Gemini CLI runtime #36 (Gemini), Implement LIVE=1 smoke test for Codex CLI runtime #37 (Codex), Implement LIVE=1 smoke test for OpenCode CLI runtime #38 (OpenCode)
Dependencies
- ChannelBridge orchestrator (PR feat(middleware): implement ChannelBridge orchestrator #33) ✅
Estimate
~80 LoC (reuses pattern from claude.live.test.ts)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request