Skip to content

fix(log_bridge): skip the medkit stack's own nodes by default#460

Open
mfaferek93 wants to merge 2 commits into
mainfrom
fix/458-log-bridge-self-noise
Open

fix(log_bridge): skip the medkit stack's own nodes by default#460
mfaferek93 wants to merge 2 commits into
mainfrom
fix/458-log-bridge-self-noise

Conversation

@mfaferek93

Copy link
Copy Markdown
Collaborator

Part 2 of #458 (part 1 is #459).

log_bridge only self-excluded its own node and /log_bridge (log_bridge_node.cpp), so when the rest of the medkit stack logs to /rosout - notably fault_manager logging a confirmed fault - log_bridge promotes those lines into new faults about medkit itself, a self-noise feedback loop.

This skips the medkit stack's own infrastructure nodes (fault_manager, ros2_medkit_gateway, diagnostic_bridge, action_status_bridge) by default, gated by a new exclude_medkit_stack param (default true; set false only to debug medkit's own logs). Substring match, so namespaced nodes (/robot1/fault_manager) are covered. Ordinary application nodes are unaffected.

Verified: colcon build clean, clang-format-18 clean, and 2 new regression tests pass (NodeEligibility_ExcludesMedkitStackByDefault, NodeEligibility_MedkitStackExclusionDisablable) alongside the existing eligibility tests (5/5).

Addresses #458 (part 2). Together with #459 this resolves #458.

log_bridge only self-excluded its own node, so fault_manager/gateway/
bridge logs on /rosout were promoted into faults about medkit itself
(a feedback loop). Skip the medkit stack by default via a new
exclude_medkit_stack param (default true, disable to debug medkit's logs).

Addresses #458
Copilot AI review requested due to automatic review settings June 21, 2026 17:00

Copilot AI 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.

Pull request overview

This PR updates ros2_medkit_log_bridge to avoid a self-noise feedback loop by default, introducing a new parameter to exclude the medkit stack’s own infrastructure nodes from promotion into faults.

Changes:

  • Add exclude_medkit_stack parameter (default true) and enforce it in node_is_eligible().
  • Extend unit tests to cover the new default exclusion and the ability to disable it.
  • Document the new parameter in the shipped config/log_bridge.yaml.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/ros2_medkit_log_bridge/test/test_log_bridge.cpp Adds regression tests for default medkit-stack exclusion and disabling it.
src/ros2_medkit_log_bridge/src/log_bridge_node.cpp Declares exclude_medkit_stack and adds medkit-stack filtering logic.
src/ros2_medkit_log_bridge/include/ros2_medkit_log_bridge/log_bridge_node.hpp Adds member and inline documentation for the new behavior.
src/ros2_medkit_log_bridge/config/log_bridge.yaml Exposes exclude_medkit_stack: true with explanatory comments.

Comment thread src/ros2_medkit_log_bridge/src/log_bridge_node.cpp Outdated
Comment thread src/ros2_medkit_log_bridge/test/test_log_bridge.cpp Outdated
Comment thread src/ros2_medkit_log_bridge/config/log_bridge.yaml
Address review: node_source_id collapses a namespaced logger
("robot1.fault_manager") to its namespace ("/robot1"), so matching the
medkit stack against source_id missed namespaced nodes. Match the raw
logger name (msg->name) instead via a static is_medkit_stack_logger, and
test the real namespaced logger-name form. Document the param in the README.
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.

Fault bridges: default-config crash (action_status_bridge) + log_bridge self-noise

2 participants