Skip to content

Realtime Sensors Implementation#129

Draft
isbm wants to merge 51 commits intomasterfrom
isbm-sensors-initial
Draft

Realtime Sensors Implementation#129
isbm wants to merge 51 commits intomasterfrom
isbm-sensors-initial

Conversation

@isbm
Copy link
Member

@isbm isbm commented Feb 11, 2026

This PR adds ability to detect system changes in real time, adding sensors mechanism.

Goals:

  • True cross-platform portability between Linux and *BSD (Windows > /dev/null lol)
  • Low CPU/mem/IO
  • Zero my-great-os components

Done:

  • Designed & defined
  • Implemented spec parser
  • Implemented spec chunked loader
  • Implemented service runner for probes
  • Added file listener sensor probe
  • Added events routing
  • Documentation updated
  • Unit tests added

@isbm isbm self-assigned this Feb 11, 2026
@isbm isbm added documentation Improvements or additions to documentation feature New feature or request dependencies Pull requests that update a dependency file labels Feb 11, 2026
Copy link
Contributor

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 implements a comprehensive real-time sensors mechanism for the SysInspect system, enabling cross-platform monitoring of system changes with low resource overhead. The implementation adds sensor configuration parsing, a service runner for sensor probes, file listener capabilities, and event routing to handlers.

Changes:

  • Added new libsensors crate with sensor specification parser, service runner, and fsnotify sensor implementation
  • Updated event routing format from forward-slash delimiters (/) to pipe delimiters (|) for better parsing
  • Enhanced EventProcessor with drain functionality and improved lifecycle management
  • Extended protocol with SensorsSyncRequest and SensorsSyncResponse message types
  • Added sensors directory configuration and file synchronization support in minion/master

Reviewed changes

Copilot reviewed 49 out of 50 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
libsensors/* New crate implementing sensor specification parsing, service management, and fsnotify sensor
sysminion/src/minion.rs Added sensor synchronization, file download, and event processor integration
sysminion/src/filedata.rs Added SensorsFiledata for managing sensor file checksums and paths
sysminion/src/main.rs Configured multi-threaded tokio runtime with explicit worker/blocking thread limits
sysmaster/src/master.rs Added sensors file serving and sync response message handling
sysmaster/src/dataserv/fls.rs Enhanced file server initialization to create sensors directory structure
libsysproto/* Added new request types and sensors_root field to payload structures
libsysinspect/src/intp/actproc/response.rs Implemented from_sensor() and enhanced matching with @ specifier support
libsysinspect/src/reactor/* Renamed Config to EventsConfig, added drain_all method, improved JSONPath interpolation
libsysinspect/src/cfg/mmconf.rs Added sensors directory configuration methods for minion/master
libdpq/src/lib.rs Added EventCommand variant to WorkItem enum
docs/* Updated documentation for event routing format change and added sensor documentation

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

Comment on lines 293 to 301
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event pump loop on line 293-301 runs forever without any shutdown mechanism. This spawned task will continue running even if the sensors need to be stopped or restarted. Consider adding a cancellation mechanism (e.g., using tokio::select! with a shutdown signal) or storing the JoinHandle for proper lifecycle management.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments