Add openspec spec files and entos config files#34
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds OpenSpec documentation and introduces runtime SceneSet configuration from /etc/sceneset.conf, including preinstallLocation, defaultHomeApp, and debug-only /opt/sceneset.conf overrides.
Changes:
- Adds system config parsing and startup integration in
SceneSetApp. - Adds CMake support for
SCENESET_DEBUG_BUILD. - Adds OpenSpec specs/archive artifacts and new L1 tests for system config loading.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/SceneSet.cpp |
Adds system config parsing, preinstall override, default home app resolution, and debug override merge. |
src/SceneSet.h |
Adds config-loading helpers and makes reference app ID mutable. |
src/CMakeLists.txt |
Adds SCENESET_DEBUG_BUILD compile definition. |
Tests/L1Tests/tests/test_SceneSet.cpp |
Adds tests for system config parsing and preinstall location behavior. |
openspec/config.yaml |
Adds OpenSpec project config. |
openspec/specs/configuration/spec.md |
Adds configuration behavior spec. |
openspec/specs/app-launch/spec.md |
Adds reference app launch spec. |
openspec/specs/preinstall-management/spec.md |
Adds preinstall management spec. |
openspec/specs/ota-update-monitoring/spec.md |
Adds OTA monitoring spec. |
openspec/specs/thunder-integration/spec.md |
Adds Thunder integration spec. |
openspec/changes/archive/2026-05-19-preinstall-location-config-fallback/* |
Archives preinstall location config fallback proposal, design, tasks, and spec. |
openspec/changes/archive/2026-05-19-home-app-and-override/* |
Archives default home app and override proposal, design, tasks, and specs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
d11bc4b to
b652131
Compare
| #include <unistd.h> | ||
| #include <string_view> | ||
| #include <optional> | ||
| #include <unordered_map> |
There was a problem hiding this comment.
Can we avoid header declaration here?
| endif() | ||
|
|
||
| set(SCENESET_DEBUG_BUILD OFF CACHE BOOL "Enable debug-only /opt/sceneset.conf override of /etc/sceneset.conf") | ||
| set(SCENESET_ENTOS_BUILD OFF CACHE BOOL "Enable ENTOS-specific SceneSet behavior") |
There was a problem hiding this comment.
Is it possible to avoid adding define here mentioning ENTOS builds and have common logic with only preinstall location/appname change handled?
There was a problem hiding this comment.
We need entos specific behaviour (restarting home app always and opt override) as part of the ticket requirement, maybe can use some other name for compile flag
Rebase to develop
| @@ -2160,9 +2175,6 @@ TEST_F(AppManagerEventHandlerTest, OnAppLifecycleStateChangedNoRestartOnUnloaded | |||
| SceneSetAppTestPeer::SetAppLaunched(instance, true); | |||
| SceneSetAppTestPeer::SetPendingRestart(instance, false); | |||
|
|
|||
RDKEMW-18625:Rename to apppackagemanager plugin
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
b48c75e to
cdf1d3e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 26 out of 26 changed files in this pull request and generated 9 comments.
Comments suppressed due to low confidence (1)
Tests/L1Tests/tests/test_SceneSet.cpp:2173
- This test is compiled into the RESTART_HOMEAPP_ALWAYS L1 test executable. In that build, a TERMINATING→UNLOADED transition triggers startLaunchThread(), which calls launchDefaultApp() and dereferences m_appManager without a null-check. Since this fixture never initializes/injects an AppManager mock, the test can crash the process asynchronously.
TEST_F(AppManagerEventHandlerTest, OnAppLifecycleStateChangedNonAbortKeepsExpectedFlags) {
SceneSetApp& instance = SceneSetApp::getInstance();
const std::string& refId = SceneSetAppTestPeer::GetReferenceAppId(instance);
if (refId.empty()) {
GTEST_SKIP() << "Reference app ID is empty; skipping.";
| else if (oldState == Exchange::IAppManager::AppLifecycleState::APP_STATE_TERMINATING) { | ||
| #if RESTART_HOMEAPP_ALWAYS | ||
| // Optional build behavior: restart on any TERMINATING->UNLOADED transition. | ||
| std::cout << "App " << appId << " terminated. Restarting reference app due to RESTART_HOMEAPP_ALWAYS." << std::endl; | ||
| instance.startLaunchThread(); | ||
| #else | ||
| // Default behavior: restart only for ABORT terminations. | ||
| if (errorReason == Exchange::IAppManager::AppErrorReason::APP_ERROR_ABORT) { | ||
| std::cout << "App " << appId << " terminated with ABORT error. Restarting reference app." << std::endl; | ||
| instance.startLaunchThread(); | ||
| } | ||
| #endif | ||
| } |
| | Callsign | Interface | Purpose | | ||
| |---|---|---| | ||
| | `org.rdk.AppManager` | `Exchange::IAppManager` | Launch, kill, and query app installation; receive lifecycle events | | ||
| | `org.rdk.PreinstallManager` | `Exchange::IPreinstallManager` | Trigger bundle preinstallation; receive completion notification | | ||
| | `org.rdk.PackageManagerRDKEMS` | `Exchange::IPackageInstaller` | Receive per-package installation status events; source of download directory config | |
| During `initialize()`, SceneSet opens a separate `RPC::CommunicatorClient` for each plugin: | ||
|
|
||
| 1. `AppManager` client → `IAppManager` interface. | ||
| 2. `PreinstallManager` client → `IPreinstallManager` interface. | ||
| 3. `PackageManagerRDKEMS` client → `IPackageInstaller` interface. | ||
|
|
| ├── CommunicatorClient ──► /tmp/communicator (or THUNDER_ACCESS) | ||
| │ └── IPackageInstaller ←→ org.rdk.PackageManagerRDKEMS | ||
| │ |
| After the startup preinstall phase completes, SceneSet optionally monitors a configured download directory for newly arrived RALF packages. When a package matching the reference app is found, SceneSet stages it in the preinstall directory so that `PackageManagerRDKEMS` can install it, after which the reference app is restarted with the new version. | ||
|
|
||
| This feature can be disabled at build time with `-DDISABLE_REFERENCE_APP_UPDATE=ON`. |
| ### 1. Download Directory Source | ||
|
|
||
| - The download directory is resolved dynamically from the `PackageManagerRDKEMS` plugin config key `downloadDir` via the Thunder Controller during initialization. | ||
| - If the dynamic lookup returns an empty value, download monitoring is disabled for the session (logged as a warning, not an error). | ||
| - The download directory is **not** configurable at runtime via environment variables or a config file. |
| | Config source | Key | Member populated | | ||
| |---|---|---| | ||
| | `org.rdk.PackageManagerRDKEMS` | `downloadDir` | Download directory for OTA monitoring | | ||
| | `org.rdk.PreinstallManager` | `appPreinstallDirectory` | Preinstall directory for bundle staging | | ||
|
|
| downloadDirectory resolution: | ||
| PackageManagerRDKEMS plugin config → downloadDir | ||
| │ empty | ||
| ▼ | ||
| Download monitoring disabled (no fallback) |
| ### 4. Waiting for Preinstall Completion | ||
|
|
||
| SceneSet waits for `PreinstallManager.OnPreinstallationComplete` before continuing startup. During this wait, SceneSet monitors per-package installation status events from `PackageManagerRDKEMS.OnAppInstallationStatus`. | ||
|
|
||
| Each package status event is parsed as a JSON array of objects with `packageId`, `state`, and optional `version` fields. A package is considered to have failed if its `state` is not `INSTALLED` or `INSTALLING`. | ||
|
|
No description provided.