Skip to content

[BUG] Hybrid discovery merge drops plugin App external flag - external-app faults vanish from Function rollup #517

Description

@bburda

Bug report

Steps to reproduce

  1. Run the gateway with discovery.mode: hybrid and a protocol plugin that introspects an external App with an empty effective_fqn (e.g. the OPC-UA plugin's process App).
  2. Declare a manifest Function whose hosted_by lists that App id.
  3. Report a fault to the fault_manager with source_id = the App id.
  4. GET /functions/<id>/faults.

Expected behavior

The fault rolls up into the Function (the external+empty-fqn rule in collect_app_fqn() grants the App its own id as fault-scope owner). This is exactly what happens under discovery.mode: manifest_only.

Actual behavior

Empty items - under hybrid the merged entity cache holds the App with external=false, so the external rule never fires and the host contributes no fqn. The fault silently vanishes from the rollup.

Suspected mechanism: src/ros2_medkit_gateway/src/discovery/merge_pipeline.cpp, METADATA group - external merges with scalar semantics, so when the target layer wins the plugin's external=true is discarded (target default false). The comment says "external is a classification, not a status flag", but the hybrid merge does not preserve the classification.

Environment

  • ros2_medkit version: main (0d637f6)
  • ROS 2 distro: Jazzy
  • OS: Ubuntu 24.04

Additional information

Test-coverage gap that would have caught this: fa05ad8 ("surface external plugin-entity faults") added external-app fault-scope regressions for the APP and COMPONENT routes but not for FUNCTION-hosts-external-app. Worth adding that regression alongside the fix.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions