fix: Lifecycle enums were not aligned with the spec#59
Merged
tomasz-blasz merged 1 commit intomainfrom Mar 12, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds unit-test coverage to validate generated enum mappings against the OpenRPC schema and fixes a Lifecycle enum string mismatch with the spec.
Changes:
- Added
checkEnumsunit tests for several modules (Lifecycle, Metrics, TextToSpeech, Discovery) to verify enum values match the OpenRPC schema. - Introduced
MockBase::validate_enum(...)helper to compare source enums vs schema enums. - Aligned
Lifecycle.CloseTypeenum string values with the spec (killReload,killReactivate) and documented the fix in the changelog.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/textToSpeechTest.cpp | Adds enum validation test for SpeechRate. |
| test/unit/metricsTest.cpp | Adds enum validation test for ErrorType. |
| test/unit/lifecycleTest.cpp | Adds enum validation tests for CloseType and LifecycleState. |
| test/unit/discoveryTest.cpp | Adds enum validation test for AgePolicy using a schema path under x-schemas. |
| test/unit/mock_helper.h | Adds shared validate_enum helper for schema-vs-source enum comparison. |
| test/json_engine.h | Adds operator[] to access raw OpenRPC JSON data. |
| src/json_types/lifecycle.h | Updates CloseType string literals to match spec casing. |
| CHANGELOG.md | Adds Unreleased entry describing the enum alignment fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4169082 to
59f3d21
Compare
59f3d21 to
f839ce2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f839ce2 to
820e44b
Compare
vladimir-rangelov
approved these changes
Mar 12, 2026
Contributor
Author
|
🎉 This PR is included in version 0.5.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.