← Back to Pull requests

Add traits for regular and lifecycle nodes #3423

Open
unknown opened this pull request with 101 lines diff across 1 files
View on GitHub
unknown unknown commented on Nov 19, 2026 04:26 UTC
Author

Add rclcpp::is_node and rclcpp::is_lifecycle_node, along with their _v forms. Now is_node matches rclcpp::Node and its subclasses and is_lifecycle_node matches rclcpp_lifecycle::LifecycleNode and also its subclasses.

Fixes #2875

Is this user-facing behavior change?

Yes, now users can include rclcpp/node_traits.hpp for regular nodes and rclcpp_lifecycle/node_traits.hpp for lifecycle nodes to check a node’s class family at compile time.

Did you use Generative AI?

Yes, Gpt 6.1 Sol to write tests and help me with review and documentation

Additional Information

Verified locally on Ubuntu 26.

  • All 15 compile-time trait assertions passed along with 23 tests in test_lifecycle_node and 2 in test_interface_traits

  • CI passed for all three changed files.
  • Diff: 101 lines (+75 / -26) across 1 files Reviewer: fujitatomoya Review duration: 5270m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.31) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.31 · 101 lines diff across 1 files
    0.31
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.277
    Real PR Conversation Timeline
    1 comments
    "Review active on #3423"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 30.7% (LOW) · Higher = larger blast radius
    30.7%
    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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 17.5% · Safe to merge
    17.5%
    Repository