Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
af75c69
RDKEMW-17483: Change Discovery.watched and Metrics methods return typ…
swethasukumarr May 7, 2026
3fc8635
RDKEMW-17483: Update comments and OpenRPC result schemas for void met…
swethasukumarr May 7, 2026
bd39f0d
RDKEMW-17483: Align OpenRPC example results with null result schema
swethasukumarr May 7, 2026
c8e00f2
Merge pull request #62 from rdkcentral/feature/RDKEMW-17483
swethasukumarr May 13, 2026
63604b0
feat: actions.intent() and related eventing
May 26, 2026
d1c7f4c
fix: copilot feedback on bad accessor
May 27, 2026
87dc59c
chore(actions): regenerate json_types with JsonData namespace
May 27, 2026
a201bef
fix(scripts): validate option args and guard install without sysroot
May 27, 2026
2a7e03c
feat(actions): rename start API to intent
May 27, 2026
e6c37d3
fix(actions): address review feedback on headers and scripts
May 27, 2026
da592f3
Potential fix for pull request finding
brendanobra May 27, 2026
d744c05
Potential fix for pull request finding
brendanobra May 27, 2026
118d76a
fix(review): harden thread resolver and make ActionsImpl non-copyable
May 27, 2026
8a5f934
fix(review): address remaining ABI and include comments
May 27, 2026
9d86e6c
test(actions): add component coverage for intent and onIntent
May 27, 2026
6648db2
Merge branch 'develop' into feat/actions-api
brendanobra May 27, 2026
e3506a8
fix(review): address latest CI and script feedback
May 27, 2026
d416d8a
chore: remove review-thread helper script from PR
May 27, 2026
5423100
fix(lint): add clang-format check/fix and apply formatting
May 27, 2026
2a0b0b9
fix(review): tighten test safety and lint mode semantics
May 27, 2026
1192f3c
Merge pull request #63 from rdkcentral/feat/actions-api
brendanobra May 29, 2026
f14e3b4
Update changelog for v0.6.0
swethasukumarr Jun 1, 2026
477a277
Update changelog for v0.6.0
swethasukumarr Jun 1, 2026
4a8c72a
Address changelog review comments
swethasukumarr Jun 1, 2026
e24bb38
Merge pull request #65 from rdkcentral/cutReleaseN
swethasukumarr Jun 1, 2026
abc0e58
fix: actions.intent no args/correct return type
Jun 2, 2026
e800022
feat: use sdk gen to gen fix
Jun 2, 2026
08384df
Potential fix for pull request finding
brendanobra Jun 2, 2026
22e000b
fix: delete copy constructor added
Jun 2, 2026
06e86a5
Merge branch 'fix/actions.intent' of github-public:rdkcentral/firebol…
Jun 2, 2026
684a704
fix(actions): address include review comments
Jun 2, 2026
53bf62b
fix(actions): address remaining review feedback
Jun 2, 2026
020afc9
docs: add copilot instructions for cpp client conventions
Jun 2, 2026
74c8f2b
Potential fix for pull request finding
brendanobra Jun 2, 2026
45d1ffc
fix(actions): finalize PR review follow-ups
Jun 2, 2026
e98cce6
fix(actions): drop unused nlohmann include
Jun 2, 2026
f2fc7a3
Potential fix for pull request finding
brendanobra Jun 2, 2026
ea2e2ea
Merge pull request #67 from rdkcentral/fix/actions.intent
brendanobra Jun 2, 2026
46fc48d
fix(actions): apply clang-format to resolve CI formatting violations
swethasukumarr Jun 2, 2026
223baa8
Merge remote-tracking branch 'origin/develop' into fix/actions.intent
swethasukumarr Jun 2, 2026
959ef62
Update workflow to trigger checks for develop branch push/pull_request
swethasukumarr Jun 2, 2026
dc350bd
Merge pull request #68 from rdkcentral/fix/actions.intent
swethasukumarr Jun 3, 2026
49f255a
Address PR #66 review comments on params and test robustness
Jun 3, 2026
ed57b7c
Apply clang-format to mock_helper after review fixes
Jun 3, 2026
51e0df3
Address copilot comments
swethasukumarr Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# firebolt-cpp-client Copilot Instructions

Scope: This file applies to the firebolt-cpp-client repository.

## Primary goals

- Preserve API contract correctness across interface, implementation, tests, and OpenRPC fixtures.
- Keep generated surfaces and bespoke conventions aligned.
- Prefer minimal, targeted changes.

## High-signal workflow

1. For API-facing changes, update all of the following in one pass:
- `include/firebolt/*.h`
- `src/*_impl.h` and `src/*_impl.cpp`
- `test/unit/*Test.cpp` and `test/component/*Test.cpp`
- `docs/openrpc/the-spec/firebolt-open-rpc.json` when component tests depend on fixture shape.
2. Run component tests after edits.
3. If behavior is generator-owned, patch generator code in sibling repo and regenerate module artifacts.

## Test commands

- Local one-shot (current preferred):
- `./run-component-tests-local.sh`
- `./run-component-tests-local.sh --skip-image-build`
- Legacy wrappers may still exist in conversation history; prefer the local script in this repo.
- Unit-only:
- `./run-unit-tests.sh`

## Actions module rules (important)

- `Actions.intent` is getter-only:
- takes no parameters
- returns `Result<std::string>`
- `Actions.onIntent` callback payload is a string value.
- Component event trigger for `Actions.onIntent` should use a string JSON payload (for example `"launch"`), not an object.

## Generated-code conventions that must be preserved

- `*Impl` classes should delete copy constructor and copy assignment:
- `ClassName(const ClassName&) = delete;`
- `ClassName& operator=(const ClassName&) = delete;`
- Unless explicitly justified as safe, `*Impl` classes should also delete move operations:
- `ClassName(ClassName&&) = delete;`
- `ClassName& operator=(ClassName&&) = delete;`
- Keep include hygiene strict:
- include `<utility>` when using `std::move`
- remove unused includes such as `<regex>` when not used
- Keep test names in consistent CamelCase for filtering.

## Component test expectations

- Red schema validation lines in logs can be expected for negative-path tests.
- Negative tests must still verify runtime behavior (callbacks not delivered for invalid payloads), not just compile-time surface checks.

## OpenRPC fixture expectations

- Module descriptions must match actual API behavior.
- Getter-style methods should carry property tags consistent with the rest of the file (for example `property:readonly` where applicable).
- Keep notifier/subscriber metadata aligned (`x-notifier`, `x-subscriber-for`).

## Regeneration notes (sibling repo)

When a change is generator-owned, use `firebolt-sdk-gen` and apply module-scoped output back into this repo.

Typical flow:

- From `../firebolt-sdk-gen`:
- `./sync-plan-checklist.sh --profile core --module actions --apply --no-accessor-touchpoints --target-root ../firebolt-cpp-client`

This keeps migration incremental and avoids unrelated accessor touchpoint churn.

## CI parity reminders

- CI uses Dockerized build/test flow and mock-firebolt integration.
- Keep changes compatible with:
- `.github/workflows/ci.yml`
- `.github/scripts/run-component-tests.sh`

## PR hygiene

- If a review asks for include-file fixes, prefer precise header/source edits and re-run component tests.
- Do not relax negative tests just to suppress red validation logs.
- Keep commit messages scoped and explicit (example: `fix(actions): address include review comments`).
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
- rpc_v2
- legacy
push:
branches: [ main, next ]
branches: [ main, develop, next ]
pull_request:
branches: [ main, next ]
branches: [ main, develop, next ]

defaults:
run:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## [0.6.0](https://github.com/rdkcentral/firebolt-cpp-client/compare/v0.5.5...v0.6.0)

### Added
- New APIs
- `Actions.intent` (no parameters, returns string)
- `Actions.onIntent` event

### Changed
- **Breaking**: `Discovery.watched` and all `Metrics.*` methods now return `Result<void>` (previously `Result<bool>`)

## [0.5.5](https://github.com/rdkcentral/firebolt-cpp-client/compare/v0.5.4...v0.5.5)

### Changed
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,27 @@ Implementation of Firebolt C++ Client.
For usage instructions of the API test application, see:

- [test/api_test_app/README.md](test/api_test_app/README.md)

## Test Runner

Use `run-all-test.sh` to build and run unit/component tests locally.

Examples:

- `./run-all-test.sh`
- `./run-unit-tests.sh --unit-filter "ActionsUTest.*"`
- `./run-component-tests.sh --component-filter "*Localization*"`

For the device websocket tunnel, use `setup-device-tunnel.sh`.
Before running it, export `DEVICE_SSH_USER`, `DEVICE_SSH_HOST`, and `DEVICE_SSH_PORT`.

## Lint

Use `lint.sh` to run local static analysis for C/C++ sources.

Examples:

- `./lint.sh`
- `./lint.sh --tidy-only`
- `./lint.sh --tidy-only --fix`
- `./lint.sh --cppcheck-only`
18 changes: 15 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,21 @@ while [[ ! -z $1 ]]; do
esac; shift
done

[[ ! -z $SYSROOT_PATH ]] || { echo "SYSROOT_PATH not set" >/dev/stderr; exit 1; }
[[ -e $SYSROOT_PATH ]] || { echo "SYSROOT_PATH not exist ($SYSROOT_PATH)" >/dev/stderr; exit 1; }
if [[ -n "$SYSROOT_PATH" ]]; then
[[ -e "$SYSROOT_PATH" ]] || { echo "SYSROOT_PATH not exist ($SYSROOT_PATH)" >/dev/stderr; exit 1; }
params+=" -DSYSROOT_PATH=$SYSROOT_PATH"
else
if $do_install; then
echo "--install requires --sysroot to be set; refusing to install without SYSROOT_PATH" >/dev/stderr
exit 1
fi
echo "SYSROOT_PATH not set; building without SYSROOT_PATH override"
fi

if [[ "$do_install" == true && "$bdir" == "build" && -z "${SYSROOT_PATH:-}" ]]; then
echo "Refusing --install without --sysroot to avoid host install into /usr" >&2
exit 1
fi

$cleanFirst && rm -rf $bdir

Expand All @@ -61,7 +74,6 @@ if [[ ! -e "$bdir" || -n "$@" ]]; then
command -v ccache >/dev/null 2>&1 && params+=" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
cmake -B $bdir \
-DCMAKE_BUILD_TYPE=$buildType \
-DSYSROOT_PATH=$SYSROOT_PATH \
$params \
"$@" || exit $?
fi
Expand Down
13 changes: 6 additions & 7 deletions docs/openrpc/openrpc/discovery.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@
}
],
"result": {
"name": "success",
"summary": "whether the call was successful or not",
"name": "result",
"schema": {
"type": "boolean"
"type": "null"
}
},
"examples": [
Expand All @@ -89,8 +88,8 @@
}
],
"result": {
"name": "success",
"value": true
"name": "result",
"value": null
}
},
{
Expand Down Expand Up @@ -118,8 +117,8 @@
}
],
"result": {
"name": "success",
"value": true
"name": "result",
"value": null
}
}
]
Expand Down
Loading
Loading