Skip to content

fix: Lifecycle enums were not aligned with the spec#59

Merged
tomasz-blasz merged 1 commit intomainfrom
topic/fix-enum-in-lifecycle
Mar 12, 2026
Merged

fix: Lifecycle enums were not aligned with the spec#59
tomasz-blasz merged 1 commit intomainfrom
topic/fix-enum-in-lifecycle

Conversation

@tomasz-blasz
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 15:40
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

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 checkEnums unit 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.CloseType enum 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.

@tomasz-blasz tomasz-blasz force-pushed the topic/fix-enum-in-lifecycle branch from 4169082 to 59f3d21 Compare March 11, 2026 16:23
Copilot AI review requested due to automatic review settings March 11, 2026 16:26
@tomasz-blasz tomasz-blasz force-pushed the topic/fix-enum-in-lifecycle branch from 59f3d21 to f839ce2 Compare March 11, 2026 16:26
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

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.

@tomasz-blasz tomasz-blasz force-pushed the topic/fix-enum-in-lifecycle branch from f839ce2 to 820e44b Compare March 12, 2026 06:44
@tomasz-blasz tomasz-blasz merged commit 38ce401 into main Mar 12, 2026
12 checks passed
@tomasz-blasz tomasz-blasz deleted the topic/fix-enum-in-lifecycle branch March 12, 2026 08:54
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2026
@tomasz-blasz
Copy link
Contributor Author

🎉 This PR is included in version 0.5.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants