Skip to content

refactor(gateway): the core builds the plugin context and the fault-trigger engine - #764

Open
bburda wants to merge 9 commits into
feat/gateway-core-12-core-triggersfrom
feat/gateway-core-13-core-plugin-context
Open

bburda wants to merge 9 commits into
feat/gateway-core-12-core-triggersfrom
feat/gateway-core-13-core-plugin-context

Conversation

@bburda

@bburda bburda commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

make_core_plugin_context(services, wiring) builds the context plugins get from GatewayServices. On a host without a ROS node node() is null; the node's context derives from it and only adds the node. The plugin API version does not change.

make_fault_trigger_host(config, wiring) builds the threshold-rule engine behind /apps/{id}/fault-triggers and its loop from FaultTriggerHostConfig.

Also: scripts/check_cores_without_ros/run.sh prints the build log when the build fails, and the notice for an unresolved data point no longer names a ROS 2 topic.


Issue


Type

  • Bug fix
  • New feature or tests
  • Breaking change
  • Documentation only

Testing

  • scripts/check_cores_without_ros/run.sh builds a plugin without ROS, loads it through the core PluginManager, and checks its routes, its data provider and the services it reaches. A fault-trigger rule reports a fault through the host's fault manager, and the SSE stream and the freeze-frame capture get it.
  • ./scripts/test.sh for the plugin and fault-trigger tests, ./scripts/test.sh integ --packages-select ros2_medkit_integration_tests.

Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Tests were added or updated if needed
  • Docs were updated if behavior or public API changed

A program that hosts the core builds a plugin context from GatewayServices and gives it to PluginManager::set_context(). Its node() is null, and the ROS 2 node derives its context from the same class and overrides only node().
A host builds the threshold-rule engine and its evaluation thread from a config with the fault_triggers.* names and defaults. The ROS 2 node uses the same builder and keeps its gate on the parameter and on loaded plugins.
The warning for a data trigger whose resource path has no source now reads the same on a host without topics. The status and the error code of the responses do not change.
docker build -q hides the compiler output behind an exit code. When it fails, run.sh now repeats the build with the full log.
…thout ROS

The check loads a plugin built without ROS through the core PluginManager and drives the fault-trigger engine through the host's single fault event source. The Dockerfile builds with four jobs and checks the plugin for rclcpp too.
…gger engine

The gateway README and the design index describe the two builders and the null node of a host without ROS. The check README lists what the new check covers.
…ore-13-core-plugin-context

# Conflicts:
#	src/ros2_medkit_gateway/README.md
@bburda bburda self-assigned this Oct 26, 2026
@bburda
bburda added this pull request to stack #759 October 26, 2026 19:47
The context takes a nullable GatewayServices pointer, so make_gateway_plugin_context(nullptr, ...) no longer binds a reference to a null node. Without services it answers no entities and locking as disabled, and capabilities and samplers still work.
…ore-13-core-plugin-context

# Conflicts:
#	src/ros2_medkit_gateway/src/plugins/plugin_context.cpp

This branch has not been deployed

No deployments
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.

1 participant