Skip to content

Gate Gemini image cassette tests on image feature - #2007

Merged
gold-silver-copper merged 2 commits into
mainfrom
fix/gemini-image-generation-test-gate
Jul 4, 2026
Merged

Gate Gemini image cassette tests on image feature#2007
gold-silver-copper merged 2 commits into
mainfrom
fix/gemini-image-generation-test-gate

Conversation

@gold-silver-copper

@gold-silver-copper gold-silver-copper commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Gates the Gemini image-generation cassette module behind #[cfg(feature = "image")].
  • Adds a CI default-feature test-target compile step: cargo test -p rig --tests --no-run.
  • This prevents CI from only validating the --all-features graph and missing root integration-test compile failures when optional features are disabled.

Why CI passed before

  • The CI test job ran cargo nextest run --all-features --retries 2.
  • The Gemini image-generation test module compiled under --all-features because the image feature was enabled, so rig::image_generation, ImageGenerationClient, and GEMINI_2_5_FLASH_IMAGE existed.
  • A plain cargo test uses the default feature set, where image is disabled; the ungated Gemini image-generation test module still compiled and referenced image-only APIs, causing the failure.
  • The new CI no-run step compiles the root integration-test targets with default features before the all-features nextest run.

Validation

  • cargo fmt --check
  • cargo test -p rig --tests --no-run
  • cargo test -p rig --test gemini -- --nocapture --test-threads=1
  • cargo test -p rig --all-features --test gemini image_generation -- --nocapture --test-threads=1
  • cargo clippy --all-targets --all-features
  • cargo test was also run. The prior Gemini image-generation compile failure is fixed; the run later fails on an unrelated existing OpenAI cassette replay mismatch in openai::cassette::permission_control::permission_control_streaming_example.

Notes

  • No cassette fixtures changed.
  • The Gemini test gating mirrors existing image-feature gating used by OpenAI, xAI, HuggingFace, and other image-generation provider tests.

@gold-silver-copper
gold-silver-copper added this pull request to the merge queue Jul 4, 2026
Merged via the queue into main with commit 4419316 Jul 4, 2026
6 checks passed
This was referenced Jul 4, 2026
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