Conversation
simonyg
approved these changes
Nov 11, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes validation for sample observations in the pipeline by improving the validation transform. The changes ensure that sample values are properly validated based on their data types and add comprehensive test coverage for various sample validation scenarios.
- Refactored the validation logic to handle sample observations with different value types (double, int64_t)
- Consolidated validation error handling and logging into a single code path
- Added new test cases for sample validation covering valid samples, int64 values, and double values
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test_package/observation_validation_test.cpp | Renamed test and added three new test cases to validate samples with different value types (double, int64_t) |
| src/mtconnect/pipeline/validator.hpp | Refactored validation logic to consolidate error handling and properly validate sample observations based on value types |
| src/mtconnect/device_model/device.cpp | Fixed error message from "Duplicate source" to "Duplicate name" for clarity |
| src/mtconnect/configuration/agent_config.hpp | Added afterConfigHooks callback manager for post-configuration hooks |
| src/mtconnect/configuration/agent_config.cpp | Added execution of afterAgentHooks after loading adapters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Imporved the validation transform in the pipeline.