← Back to Pull requests

Fix content filtering on Windows with modern Connext DDS #226

Closed
unknown closed this pull request without merging on May 12, 2026 14:48 UTC
View on GitHub
unknown unknown commented on Apr 28, 2026 23:10 UTC
Author

Description

This PR fixes Content Filtering on Windows when using modern versions of RTI Connext DDS (6.x and 7.x).

The Problem


Previously, the rmw_connextdds implementation on Windows was forced into a "Compatibility Mode." This mode:
1. Disabled Writer-side filtering: All samples were sent to all matching readers, regardless of whether they matched the filter.
2. Forced Reader-side filtering: Filtering was performed after deserialization. However, the built-in RTI SQL filter expects samples in the Connext memory layout. Because ROS 2 uses its own internal format, the filter would fail "open" and accept all samples.

This led to failures in rcl, rclcpp, and rcl_action tests where samples were received by subscribers despite being explicitly filtered out by SQL expressions.

The Fix


1. Enable Serialized Evaluation: Updated CMakeLists.txt to only enable RMW_CONNEXT_BUILTIN_CFT_COMPATIBILITY_MODE on Windows for Connext versions older than 6.0.0. For modern versions, we now use the internal register_contentfilterI API, which supports evaluation on CDR-serialized samples.
2. Fix Redefinition Conflict: Adjusted custom_sql_filter.hpp to use the official RTI declaration of register_contentfilterI (available in modern headers) to avoid linkage errors on MSVC.
3. Correct Cookie Handling: Fixed a bug in RTI_CustomSqlFilter_writer_evaluated_result where it assumed RTI's built-in filter always returned a discontiguous sequence of cookies. It now correctly handles both contiguous and discontiguous sequences.

Verification


Verified on Windows using a targeted CI run with Connext 7.7.0. All content filtering tests in rcl, rclcpp, and rcl_action passed.

CI Result (Windows 10, Connext 7.7.0): https://ci.ros2.org/job/ci_windows/27743/

Is this user-facing behavior change?


No, it fixes a regression in existing functionality.

Did you use Generative AI?


Yes. Gemini CLI:2.0-Flash [web_fetch, run_shell_command, replace, git, gh]

Diff: 252 lines (+189 / -63) across 3 files Reviewer: fgallegosalido Review duration: 19658m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 252 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.331
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #226"
general weight: 0.35
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39% (MEDIUM) · Higher = larger blast radius
39%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 16.9% · Safe to merge
16.9%