Skip to content

chore(ci): expand CI matrix for optional integration features#548

Open
qhkm wants to merge 2 commits intomainfrom
chore/expand-ci-matrix
Open

chore(ci): expand CI matrix for optional integration features#548
qhkm wants to merge 2 commits intomainfrom
chore/expand-ci-matrix

Conversation

@qhkm
Copy link
Copy Markdown
Owner

@qhkm qhkm commented Apr 25, 2026

Summary

Cherry-pick of #544 (manelsen) under an author-owned branch — same OAuth `workflow` scope wall as #521/#542, resolved by SSH push.

Expands the CI feature-matrix to compile-check optional paths that previously drifted silently behind the default build:

`memory-embedding`, `screenshot`, `channel-email`, `google`, `provider-vertex`, `whatsapp-web`, `hardware`, `peripheral-rpi`, `probe`, `android`, `sandbox-landlock`, `sandbox-firejail`, `sandbox-bubblewrap`

The matrix expansion immediately surfaced two latent bugs that are also fixed here:

  1. `src/channels/email_channel.rs` — use-after-move on `Arc` inside the `AssertUnwindSafe` panic-capture closure (only built under `channel-email`)
  2. `src/peripherals/i2c.rs` → `mod.rs` — `validate_hex` lived under `hardware` but was used by `rpi_i2c.rs` under `peripheral-rpi`; moved up to the parent module with the right cfg gate
  3. `src/peripherals/serial.rs` — `transport()` getter cfg-gated to `peripheral-esp32` (dead code under `hardware` alone)

`google` feature also pulls a separate `reqwest013 = { package = "reqwest", version = "0.13" }` since the `gog-*` crates are still on reqwest 0.13 while main is on 0.12 — clean version-conflict workaround, only when `google` is enabled.

Closes #544.

Co-Authored-By: manelsen emanuelmoura@gmail.com
🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Expanded CI compilation matrix to verify additional feature combinations.
    • Added optional dependency for Google Workspace integration.
  • Refactor

    • Consolidated hexadecimal validation logic into a shared utility.
    • Improved email IMAP task synchronization handling.
  • Tests

    • Enhanced feature-gating coverage in continuous integration pipeline.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

📝 Walkthrough

Walkthrough

This PR expands the CI feature-matrix compilation to cover additional optional integration features (email channel, Google Workspace, Vertex provider, WhatsApp Web, and hardware/sandbox features) and fixes two latent compile-time issues that surface when these features are enabled: correcting async block variable reuse in the email channel task and resolving reqwest version incompatibility in the Google tool.

Changes

Cohort / File(s) Summary
CI Workflow Expansion
.github/workflows/ci.yml
Expands feature-matrix job to compile additional optional feature combinations including channel-email, google, provider-vertex, whatsapp-web, memory/screenshot features, and hardware/sandbox runtimes.
Documentation Updates
AGENTS.md, CLAUDE.md
Clarifies expanded CI feature-matrix coverage and documents that memory-bm25 and peripheral-esp32 remain handled by dedicated test/clippy jobs; updates failure-mode description from "drifting" to "fail fast before merge.""
Dependency Configuration
Cargo.toml
Adds optional reqwest013 dependency (pinned to 0.13) and wires it to the google feature to resolve version mismatch with gogcli-rs Google Workspace integration.
Email Channel Lifecycle Fix
src/channels/email_channel.rs
Fixes async move block variable reuse issue by cloning the Arc<AtomicBool> running flag for the spawned IMAP IDLE task loop.
Peripheral Validation Refactoring
src/peripherals/mod.rs, src/peripherals/i2c.rs, src/peripherals/rpi_i2c.rs
Centralizes validate_hex helper function in module root, removes local definition from i2c, and updates both i2c and rpi_i2c imports to use the shared implementation.
Serial Transport Gating
src/peripherals/serial.rs
Conditionally gates SerialPeripheral::transport() method behind peripheral-esp32 feature flag.
Google Tool HTTP Client Update
src/tools/google.rs
Switches HTTP client type from reqwest::Client to reqwest013::Client to match gogcli-rs dependency expectations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 We've widened the CI lens so broad,
Catching sneaky bugs down every road,
Reqwest versions now align,
Email loops behave just fine,
Optional features pass before they're owed! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: expanding the CI matrix to cover optional integration features. It directly reflects the PR's core objective.
Linked Issues check ✅ Passed All coding requirements from issue #544 are met: expanded CI matrix for optional features, fixed email channel Arc ownership issue, added reqwest013 alias for google feature compatibility, and moved validate_hex to shared module.
Out of Scope Changes check ✅ Passed All changes directly support the stated objectives: CI matrix expansion, documentation updates, and necessary bug fixes. The peripheral-esp32 gating in serial.rs is a direct consequence of expanded feature coverage.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/expand-ci-matrix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Cargo.toml (1)

49-50: Add http2 to the reqwest013 features for better Google API performance.

Reqwest 0.13's default features include http2, but default-features = false removes it from this declaration. The current feature set is valid for HTTP/1.1, but adding http2 restores support for HTTP/2 multiplexing, which improves throughput for Gmail/Calendar batched requests at no cost.

Optional: enable HTTP/2 for the Google client
-reqwest013 = { package = "reqwest", version = "0.13", features = ["json", "rustls", "stream", "multipart"], default-features = false, optional = true }
+reqwest013 = { package = "reqwest", version = "0.13", features = ["json", "rustls", "http2", "stream", "multipart"], default-features = false, optional = true }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Cargo.toml` around lines 49 - 50, Update the reqwest013 dependency features
to include "http2": in the Cargo.toml entry for the optional package alias
reqwest013 (the line defining reqwest013 = { package = "reqwest", version =
"0.13", features = [...], default-features = false, optional = true }), add
"http2" to the features array so the reqwest 0.13 client enables HTTP/2 support
for Google Workspace requests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Cargo.toml`:
- Around line 49-50: Update the reqwest013 dependency features to include
"http2": in the Cargo.toml entry for the optional package alias reqwest013 (the
line defining reqwest013 = { package = "reqwest", version = "0.13", features =
[...], default-features = false, optional = true }), add "http2" to the features
array so the reqwest 0.13 client enables HTTP/2 support for Google Workspace
requests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 82fdeeca-a942-40a6-8e14-7a6922a654c6

📥 Commits

Reviewing files that changed from the base of the PR and between cdccdce and bc41061.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .github/workflows/ci.yml
  • AGENTS.md
  • CLAUDE.md
  • Cargo.toml
  • src/channels/email_channel.rs
  • src/peripherals/i2c.rs
  • src/peripherals/mod.rs
  • src/peripherals/rpi_i2c.rs
  • src/peripherals/serial.rs
  • src/tools/google.rs

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.

2 participants