Skip to content

fix(multimodal): gate shm-namespace test to Linux - #1849

Merged
slin1237 merged 1 commit into
mainfrom
fix/shm-namespace-test-linux-gate
Jun 26, 2026
Merged

slin1237 merged 1 commit into
mainfrom
fix/shm-namespace-test-linux-gate

Conversation

@slin1237

@slin1237 slin1237 commented Jun 26, 2026 •

Copy link
Copy Markdown
Member

Summary

The local_shm_namespace_id_resolves_on_linux test was gated with #[cfg(unix)], but it reads Linux-only paths (/proc/sys/kernel/random/boot_id and /dev/shm). On macOS dev hosts (which are also unix), the test fails because those paths don't exist.

Re-gated the test to #[cfg(target_os = "linux")] so it only runs on Linux where the required paths exist.

Test plan

  • cargo build -p smg - clean
  • cargo test -p smg --lib routers::grpc::multimodal - 19 passed, test correctly skipped on macOS
  • cargo clippy -p smg --all-targets - clean (only pre-existing warnings)

CI (Linux) behavior unchanged - the test will continue to run and pass on Linux CI.

Summary by CodeRabbit

  • Tests
    • Restricted a platform-specific test to run only on Linux, improving compatibility across other Unix-like environments.

…reads /proc + /dev/shm)

Signed-off-by: Simo Lin <linsimo.mark@gmail.com>
@github-actions github-actions Bot added grpc gRPC client and router changes model-gateway Model gateway crate changes labels Jun 26, 2026
@coderabbitai

coderabbitai Bot commented Jun 26, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ac09a763-9538-4989-a55c-1a13918f4d2b

📥 Commits

Reviewing files that changed from the base of the PR and between 74f82cf and c732986.

📒 Files selected for processing (1)
  • model_gateway/src/routers/grpc/multimodal.rs

📝 Walkthrough

Walkthrough

The test module for local_shm_namespace_id_resolves_on_linux is now compiled only on Linux targets instead of all Unix targets.

Changes

Linux test gating

Layer / File(s) Summary
Target OS gate change
model_gateway/src/routers/grpc/multimodal.rs
The local_shm_namespace_id_resolves_on_linux test module now uses #[cfg(target_os = "linux")] instead of #[cfg(unix)].

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A bunny hopped through Linux snow,
Where one small test now learns to go.
Unix wide doors close, snug and bright,
target_os = "linux" feels just right.
🐇

🚥 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 concisely describes the main change: restricting the shm-namespace test to Linux.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 fix/shm-namespace-test-linux-gate

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the conditional compilation attribute for the local_shm_namespace_id_resolves_on_linux test in multimodal.rs from #[cfg(unix)] to #[cfg(target_os = "linux")] to ensure it only runs on Linux environments. There are no review comments to address, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@claude

claude Bot commented Jun 26, 2026

Copy link
Copy Markdown

👋 The PR description doesn't fully follow PULL_REQUEST_TEMPLATE.md:

  • Missing header: ## Description
  • Missing header: ### Problem
  • Missing header: ### Solution
  • Missing header: ## Changes
  • Missing header: ## Test Plan (present as ## Test plan — case mismatch)

Please update the PR description so reviewers have the context they need.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean one-liner — the cfg gate now matches the paths the test actually reads. No issues found.

@slin1237
slin1237 merged commit c9a23e2 into main Jun 26, 2026
32 of 41 checks passed
@slin1237
slin1237 deleted the fix/shm-namespace-test-linux-gate branch June 26, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

grpc gRPC client and router changes model-gateway Model gateway crate changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant