Skip to content

hmon: rework Rust structure, align interfaces#102

Open
arkjedrz wants to merge 2 commits intoeclipse-score:mainfrom
qorix-group:arkjedrz_align-rust-cpp-interfaces
Open

hmon: rework Rust structure, align interfaces#102
arkjedrz wants to merge 2 commits intoeclipse-score:mainfrom
qorix-group:arkjedrz_align-rust-cpp-interfaces

Conversation

@arkjedrz
Copy link
Contributor

@arkjedrz arkjedrz commented Mar 3, 2026

  • Move HMON to a separate module.
  • Align Rust and C++ interfaces.

@arkjedrz arkjedrz self-assigned this Mar 3, 2026
@arkjedrz arkjedrz had a problem deploying to workflow-approval March 3, 2026 14:45 — with GitHub Actions Failure
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.4.2) and connecting to it...
INFO: Invocation ID: 9e7803b1-6a8b-490d-85cf-88d210ae1908
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'score_rust_policies', the root module requires module version score_rust_policies@0.0.3, but got score_rust_policies@0.0.5 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (38 packages loaded, 9 targets configured)

Analyzing: target //:license-check (87 packages loaded, 9 targets configured)

Analyzing: target //:license-check (90 packages loaded, 9 targets configured)

Analyzing: target //:license-check (145 packages loaded, 2642 targets configured)

Analyzing: target //:license-check (153 packages loaded, 5234 targets configured)

Analyzing: target //:license-check (162 packages loaded, 7368 targets configured)

Analyzing: target //:license-check (165 packages loaded, 7901 targets configured)

Analyzing: target //:license-check (165 packages loaded, 7901 targets configured)

Analyzing: target //:license-check (165 packages loaded, 7901 targets configured)

Analyzing: target //:license-check (168 packages loaded, 9789 targets configured)

Analyzing: target //:license-check (169 packages loaded, 9913 targets configured)

INFO: Analyzed target //:license-check (170 packages loaded, 10039 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions, 1 running)
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
[15 / 16] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 27.869s, Critical Path: 2.73s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

The created documentation from the pull request is available at: docu-html

@arkjedrz arkjedrz force-pushed the arkjedrz_align-rust-cpp-interfaces branch from 34a40cf to 5bca3e2 Compare March 3, 2026 15:21
@arkjedrz arkjedrz temporarily deployed to workflow-approval March 3, 2026 15:21 — with GitHub Actions Inactive
@arkjedrz arkjedrz temporarily deployed to workflow-approval March 3, 2026 15:21 — with GitHub Actions Inactive
@arkjedrz arkjedrz force-pushed the arkjedrz_align-rust-cpp-interfaces branch from 5bca3e2 to d27ae8f Compare March 4, 2026 14:56
@arkjedrz arkjedrz requested a deployment to workflow-approval March 4, 2026 14:56 — with GitHub Actions Waiting
@arkjedrz arkjedrz requested a deployment to workflow-approval March 4, 2026 14:56 — with GitHub Actions Waiting
@arkjedrz arkjedrz force-pushed the arkjedrz_align-rust-cpp-interfaces branch from d27ae8f to 5de7e39 Compare March 4, 2026 15:04
@arkjedrz arkjedrz requested a deployment to workflow-approval March 4, 2026 15:04 — with GitHub Actions Waiting
@arkjedrz arkjedrz requested a deployment to workflow-approval March 4, 2026 15:04 — with GitHub Actions Waiting
@arkjedrz arkjedrz force-pushed the arkjedrz_align-rust-cpp-interfaces branch from 5de7e39 to b23aea9 Compare March 9, 2026 13:51
@arkjedrz arkjedrz requested a deployment to workflow-approval March 9, 2026 13:51 — with GitHub Actions Waiting
@arkjedrz arkjedrz requested a deployment to workflow-approval March 9, 2026 13:51 — with GitHub Actions Waiting
@arkjedrz arkjedrz force-pushed the arkjedrz_align-rust-cpp-interfaces branch from b23aea9 to a3838c7 Compare March 13, 2026 08:13
@arkjedrz arkjedrz requested a deployment to workflow-approval March 13, 2026 08:13 — with GitHub Actions Waiting
@arkjedrz arkjedrz requested a deployment to workflow-approval March 13, 2026 08:13 — with GitHub Actions Waiting
@arkjedrz arkjedrz requested review from Copilot and pawelrutkaq March 13, 2026 08:14
@arkjedrz arkjedrz marked this pull request as ready for review March 13, 2026 08:14
Copy link

Copilot AI left a comment

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 restructures the health monitoring library by moving HealthMonitor, HealthMonitorBuilder, and HealthMonitorError from lib.rs into a dedicated health_monitor.rs module, adds logic monitor FFI bindings (Rust + C++), and aligns the C++ API to use expected return types instead of assertions for build() and start().

Changes:

  • Extracted HealthMonitor/HealthMonitorBuilder into health_monitor.rs module; updated all import paths accordingly.
  • Added full logic monitor FFI layer: LogicMonitorBuilder and LogicMonitor C++ classes with Rust FFI bindings, including StateTag C++ type.
  • Changed C++ HealthMonitorBuilder::build() and HealthMonitor::start() to return expected types instead of asserting on failure.

Reviewed changes

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

Show a summary per file
File Description
rust/lib.rs Moved HealthMonitor code to health_monitor.rs, re-exports types
rust/health_monitor.rs New module containing HealthMonitor/Builder/Error (moved from lib.rs)
rust/logic/mod.rs Exposes new ffi submodule
rust/logic/ffi.rs New FFI bindings for logic monitor builder/monitor
rust/logic/logic_monitor.rs Updated import paths
rust/ffi.rs Added health_monitor_builder_add_logic_monitor and health_monitor_get_logic_monitor FFI functions + tests
rust/worker.rs Updated import paths
rust/deadline/*.rs Updated import paths
rust/heartbeat/heartbeat_monitor.rs Updated import paths
cpp/logic_monitor.cpp New C++ implementation for LogicMonitorBuilder/LogicMonitor
cpp/include/score/hm/logic/logic_monitor.h New C++ header for logic monitor types
cpp/include/score/hm/tag.h Added default Tag() constructor and StateTag class
cpp/include/score/hm/health_monitor.h Added logic monitor methods, changed build/start return types
cpp/health_monitor.cpp Implemented logic monitor integration, error-returning build/start
cpp/tests/health_monitor_test.cpp Updated test for new API
examples/cpp_supervised_app/main.cpp Updated for new expected-returning API
BUILD Added logic_monitor source/header
.vscode/settings.json Added noDefaultFeatures setting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

- Move HMON to a separate module.
- Align Rust and C++ interfaces.
@arkjedrz arkjedrz force-pushed the arkjedrz_align-rust-cpp-interfaces branch from a3838c7 to 136d587 Compare March 13, 2026 10:44
@arkjedrz arkjedrz requested a deployment to workflow-approval March 13, 2026 10:44 — with GitHub Actions Waiting
@arkjedrz arkjedrz requested a deployment to workflow-approval March 13, 2026 10:44 — with GitHub Actions Waiting
Restore previous behavior that `start` can cause panic/abort.
@arkjedrz arkjedrz temporarily deployed to workflow-approval March 13, 2026 13:51 — with GitHub Actions Inactive
@arkjedrz arkjedrz temporarily deployed to workflow-approval March 13, 2026 13:51 — with GitHub Actions Inactive
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.

2 participants