Skip to content

feat: v2.4 Phase 31 — Gemini CLI Tests#19

Merged
RichardHightower merged 9 commits intomainfrom
feature/phase-31-gemini-cli-tests
Feb 26, 2026
Merged

feat: v2.4 Phase 31 — Gemini CLI Tests#19
RichardHightower merged 9 commits intomainfrom
feature/phase-31-gemini-cli-tests

Conversation

@RichardHightower
Copy link
Contributor

Summary

  • 28 bats E2E tests across 4 files (smoke, hooks, pipeline, negative) validating the full Gemini CLI hook-to-query pipeline
  • 7 Gemini-native JSON fixture files (BeforeAgent, AfterAgent, BeforeTool, AfterTool, SessionStart, SessionEnd, malformed)
  • Fixed jq -njq -nc bug in memory-capture.sh that caused silent ingest failures (same root cause as Phase 30 hooks.bats fix)
  • Negative tests cover fail-open for both memory-ingest ({"continue":true}) and memory-capture.sh ({})

Test plan

  • bats tests/cli/gemini/smoke.bats — 8 tests (binary detection, daemon health, basic ingest)
  • bats tests/cli/gemini/hooks.bats — 8 tests (all 6 Gemini event types via memory-capture.sh two-layer proof)
  • bats tests/cli/gemini/pipeline.bats — 5 tests (full ingest-to-query cycle with agent=gemini)
  • bats tests/cli/gemini/negative.bats — 7 tests (daemon-down, malformed, empty stdin fail-open)
  • CI e2e-cli matrix passes for gemini job

🤖 Generated with Claude Code

RichardHightower and others added 9 commits February 25, 2026 22:12
…n layer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 7 Gemini-format fixtures (SessionStart, SessionEnd, BeforeAgent, AfterAgent, BeforeTool, AfterTool, malformed)
- All valid fixtures are compact single-line JSON for memory-ingest compatibility
- Uses Gemini event names and field conventions (.prompt, .prompt_response)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- smoke.bats: 8 tests covering binary detection, daemon health, hook script, ingest, gemini CLI
- hooks.bats: 8 tests covering all 6 Gemini event types via memory-capture.sh two-layer proof
- Fix: memory-capture.sh jq -n -> jq -nc for compact single-line JSON output
  (memory-ingest reads stdin line-by-line; multi-line JSON from jq silently failed)

[Rule 1 - Bug] Fixed jq multi-line output in memory-capture.sh payload construction

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- SUMMARY.md with 2-task execution, 1 deviation (jq -nc fix)
- STATE.md updated to Phase 31, plan 1 of 2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 5 tests covering full session lifecycle, TOC browse, cwd metadata, agent field preservation, concurrent sessions
- All events use agent=gemini with direct CchEvent format
- Hard assertions with diagnostic echo on failure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 4 memory-ingest tests: daemon down, malformed JSON, empty stdin, unknown event type
- 3 memory-capture.sh tests: daemon down, malformed input, empty stdin
- All assert exit 0 with appropriate fail-open output ({} or {"continue":true})

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- SUMMARY.md with 2 task commits, 28 total Gemini tests passing
- STATE.md updated: phase 31 complete, progress 69%

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant