Skip to content

RDKEMW-26413 : Support generic JSON intents - #117

Merged
swethasukumarr merged 5 commits into
developfrom
feature/RDKEMW-26413
Oct 7, 2026
Merged

swethasukumarr merged 5 commits into
developfrom
feature/RDKEMW-26413

Conversation

@swethasukumarr

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings October 5, 2026 15:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The public dependency boundary and generator-owned files need correction before approval.

Review effort: Balanced
Findings: 1 Medium severity · 4 Low severity

Open (5)
What changed in this PR

Adds generic JSON intent payload support across the Actions API, transport adapter, specification, demo, and tests.

Changes:

  • Replaces typed intent data with generic JSON payloads.
  • Updates OpenRPC schemas and intent forwarding.
  • Adds JSON dependency propagation and broader payload tests.
File Description
include/​firebolt/​actions.h Exposes generic intent payloads.
src/​actions_impl.h Updates the start signature.
src/​actions_impl.cpp Forwards JSON intents unchanged.
src/​json_types/​actions.h Preserves generic response payloads.
src/​CMakeLists.txt Makes nlohmann JSON public.
cmake/​FireboltClientConfig.cmake.in Finds the exported JSON dependency.
docs/​openrpc/​the-spec/​firebolt-open-rpc.json Generalizes intent schemas and examples.
test/​unit/​actionsTest.cpp Tests getter and start behavior.
test/​unit/​actionsGeneratedTest.cpp Tests generic subscription dispatch.
test/​component/​actionsGeneratedTest.cpp Tests generic intents end-to-end.
test/​api_test_app/​apis/​actionsDemo.cpp Demonstrates generic JSON usage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/unit/actionsTest.cpp Outdated
Comment thread include/firebolt/actions.h
Comment thread src/actions_impl.cpp
Comment thread src/actions_impl.h
Comment thread src/json_types/actions.h
Copilot AI balanced review requested due to automatic review settings October 5, 2026 16:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The public API introduces unsafe ABI breaks and exposes a prohibited implementation dependency while generator-owned artifacts lose their ownership markers.

Review effort: Balanced
Findings: 2 High severity

Open (2)
Resolved since last review (5)
Previously missed (2)

In code that hasn't changed since last review

Medium severity Avoid exposing nlohmann::json in public headers

include/​firebolt/​actions.h:24

Public Firebolt headers must not expose nlohmann::json. Making this implementation library part of the installed API couples every consumer to its headers and ABI; the new PUBLIC CMake dependency does not restore the public/JSON-layer boundary. Represent generic payloads with a Firebolt-owned public type (or serialized JSON) and convert to nlohmann::json inside the implementation/adapter layer.

Low severity Add malformed response and invalid event tests

src/​json_types/​actions.h:40

The deserialization contract changed, but the Actions tests still have no malformed-response case for the envelope validation here (for example, missing intentId or a non-unsigned ID). Add unit and component negative tests that assert the getter fails and an invalid event does not invoke its callback, matching the repository's getter/event pairing rules.

Comment thread include/firebolt/actions.h Outdated
Comment thread include/firebolt/actions.h Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 18:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Generator-owned files were edited directly, the public API conflicts with the established contract, and an obsolete duplicate specification was added.

Review effort: Balanced
Findings: 2 High severity · 2 Medium severity · 3 Low severity

Open (7)
Resolved since last review (1)

Comment thread include/firebolt/actions.h
Comment thread test/component/actionsGeneratedTest.cpp
Comment thread test/unit/actionsGeneratedTest.cpp
Comment thread docs/openrpc/the-spec/firebolt-open-rpc copy.json Outdated
Comment thread include/firebolt/actions.h Outdated
Comment thread include/firebolt/actions.h Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 18:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Generated artifacts were edited outside their generator workflow, and the TextToSpeech casing note contradicts the protocol specification.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (7)

Comment thread CHANGELOG.md
Copilot AI balanced review requested due to automatic review settings October 6, 2026 19:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Generator-owned files were edited directly, and malformed response deserialization lacks required coverage.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Low severity Add malformed wire-response coverage for intent deserialization

src/​json_types/​actions.h:40

The new deserializer's malformed-wire-response path is not covered: the transport-error test returns before fromJson() runs, and current tests only provide valid envelopes. Add an Actions.intent unit test with a missing required field or invalid intentId type and assert Error::InvalidParams, matching getter coverage elsewhere in the repository.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 19:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Generated files are edited directly, JSON conversion violates layer boundaries, validation coverage is incomplete, and the TextToSpeech casing claim conflicts with the protocol.

Review effort: Balanced
Findings: 2 Low severity

Open (2)

Comment thread src/actions_impl.cpp
Comment thread src/json_types/actions.h
@swethasukumarr
swethasukumarr merged commit 1d3a3ec into develop Oct 7, 2026
17 checks passed
@swethasukumarr
swethasukumarr deleted the feature/RDKEMW-26413 branch October 7, 2026 13:46
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants