Skip to content

Fix/actions.intent#67

Merged
brendanobra merged 12 commits into
developfrom
fix/actions.intent
Jun 2, 2026
Merged

Fix/actions.intent#67
brendanobra merged 12 commits into
developfrom
fix/actions.intent

Conversation

@brendanobra
Copy link
Copy Markdown
Contributor

Summary

This PR fixes the Actions contract so Actions.intent is a getter-only API:

  • takes no input
  • returns a string intent value

What Changed

  • Updated Actions API behavior to intent() -> string (no args)
  • Aligned generated C++ client interface and implementation
  • Aligned generated unit/component tests with the corrected contract
  • Updated test fixture/OpenRPC expectations used by component tests

Validation

  • ✅ Docker component tests pass: 76/76
  • ✅ Negative-case tests are still true negatives:
    • schema-invalid payloads are rejected by validation
    • callbacks are not invoked for invalid payloads

Notes

Red “validation error” log lines are expected from negative-path tests and do not indicate test failures.

Copy link
Copy Markdown
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 updates the Firebolt C++ client and its OpenRPC fixture to correct the Actions.intent contract to a getter-only API that takes no parameters and returns the current intent as a string, and aligns generated code and tests accordingly.

Changes:

  • Updated Actions.intent C++ interface/implementation to intent() -> Result<std::string> (no args).
  • Updated OpenRPC spec fixture to define Actions.intent (no params, string result) and Actions.onIntent.
  • Adjusted unit/component tests and added a local Docker runner script for component tests.

Reviewed changes

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

Show a summary per file
File Description
test/unit/actionsTest.cpp Updates unit test to call intent() and assert returned string.
test/unit/actionsGeneratedTest.cpp Aligns generated unit test to new getter behavior and error propagation path.
test/component/actionsGeneratedTest.cpp Reworks component test (currently reduced to interface-surface check).
src/json_types/actions.h Formatting/include-order adjustments for Actions JSON types header.
src/actions_impl.h Updates ActionsImpl signature to return Result<std::string> for intent().
src/actions_impl.cpp Implements getter-style intent() via helper get<...>().
run-component-tests-local.sh Adds a convenience script to run component tests locally via Docker.
include/firebolt/actions.h Updates public Actions interface to getter-only intent().
docs/openrpc/the-spec/firebolt-open-rpc.json Adds/updates OpenRPC entries for Actions.intent and Actions.onIntent and module description.
CHANGELOG.md Notes updated Actions.intent contract (no params, returns string).

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

Comment thread include/firebolt/actions.h
Comment thread src/actions_impl.h
Comment thread src/actions_impl.cpp Outdated
Comment thread test/component/actionsGeneratedTest.cpp Outdated
Comment thread run-component-tests-local.sh Outdated
Comment thread docs/openrpc/the-spec/firebolt-open-rpc.json Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 2, 2026 17:00
Copy link
Copy Markdown
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

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

Comment thread src/actions_impl.cpp Outdated
Comment thread src/actions_impl.h
Comment thread test/unit/actionsGeneratedTest.cpp Outdated
Comment thread test/component/actionsGeneratedTest.cpp Outdated
Comment thread docs/openrpc/the-spec/firebolt-open-rpc.json Outdated
Comment thread docs/openrpc/the-spec/firebolt-open-rpc.json Outdated
Copilot AI review requested due to automatic review settings June 2, 2026 17:14
Copy link
Copy Markdown
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

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

Comment thread docs/openrpc/the-spec/firebolt-open-rpc.json
Comment thread test/component/actionsGeneratedTest.cpp
Copy link
Copy Markdown
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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Comment thread docs/openrpc/the-spec/firebolt-open-rpc.json
Comment thread test/unit/actionsGeneratedTest.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 2, 2026 17:34
Copy link
Copy Markdown
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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

docs/openrpc/the-spec/firebolt-open-rpc.json:31

  • rpc.discover is not a getter-style property, but it is currently tagged with property:readonly. This tag can cause tooling/generators to treat rpc.discover like a property getter and is inconsistent with the rest of the schema (e.g., Accessibility.audioDescription is a property getter, rpc.discover is not). Remove the property:readonly tag from rpc.discover.
			"tags": [
				{
					"name": "capabilities",
					"x-uses": [
						"xrn:firebolt:capability:rpc:discover"

Comment thread src/actions_impl.cpp
Copy link
Copy Markdown
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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comment thread run-component-tests-local.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 2, 2026 17:59
Copy link
Copy Markdown
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

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@brendanobra brendanobra merged commit ea2e2ea into develop Jun 2, 2026
8 checks passed
@brendanobra brendanobra deleted the fix/actions.intent branch June 2, 2026 18:55
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 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