Skip to content

Add openspec spec files and entos config files#34

Open
sajilal711 wants to merge 14 commits into
developfrom
topic/RDKEMW-17925
Open

Add openspec spec files and entos config files#34
sajilal711 wants to merge 14 commits into
developfrom
topic/RDKEMW-17925

Conversation

@sajilal711

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 05: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.

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.

Comment thread Tests/L1Tests/tests/test_SceneSet.cpp Outdated
Comment thread openspec/specs/preinstall-management/spec.md Outdated
Comment thread src/SceneSet.cpp
Comment thread src/SceneSet.cpp Outdated
Comment thread openspec/specs/configuration/spec.md
Copilot AI review requested due to automatic review settings May 29, 2026 07:12

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.

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.

Comment thread src/SceneSet.cpp
Comment thread README.md Outdated
Comment thread openspec/specs/configuration/spec.md
Comment thread src/SceneSet.cpp
@github-advanced-security

Copy link
Copy Markdown
Contributor

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI review requested due to automatic review settings May 29, 2026 12:30

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.

Pull request overview

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

Comment thread Tests/L1Tests/tests/test_SceneSet.cpp
Comment thread openspec/specs/app-launch/spec.md Outdated
@sajilal711 sajilal711 force-pushed the topic/RDKEMW-17925 branch from d11bc4b to b652131 Compare May 29, 2026 12:37
Copilot AI review requested due to automatic review settings May 29, 2026 12:39

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.

Pull request overview

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

Comment thread Tests/L1Tests/tests/test_SceneSet.cpp
Comment thread Tests/L1Tests/tests/test_SceneSet.cpp Outdated
Comment thread src/SceneSet.cpp Outdated
#include <unistd.h>
#include <string_view>
#include <optional>
#include <unordered_map>

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.

Can we avoid header declaration here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

okay

Comment thread src/CMakeLists.txt Outdated
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")

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.

Is it possible to avoid adding define here mentioning ENTOS builds and have common logic with only preinstall location/appname change handled?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copilot AI review requested due to automatic review settings June 1, 2026 12:03

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.

Pull request overview

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

Comment thread Tests/L1Tests/CMakeLists.txt Outdated
Comment on lines 2167 to 2177
@@ -2160,9 +2175,6 @@ TEST_F(AppManagerEventHandlerTest, OnAppLifecycleStateChangedNoRestartOnUnloaded
SceneSetAppTestPeer::SetAppLaunched(instance, true);
SceneSetAppTestPeer::SetPendingRestart(instance, false);

sajilal711 and others added 3 commits June 8, 2026 10:57
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sajilal711 sajilal711 force-pushed the topic/RDKEMW-17925 branch from b48c75e to cdf1d3e Compare June 8, 2026 05:27
Copilot AI review requested due to automatic review settings June 9, 2026 05:25

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.

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.";

Comment thread src/SceneSet.cpp
Comment on lines +1036 to 1048
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
}
Comment on lines +11 to +15
| 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 |
Comment on lines +23 to +28
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.

Comment on lines +94 to +96
├── CommunicatorClient ──► /tmp/communicator (or THUNDER_ACCESS)
│ └── IPackageInstaller ←→ org.rdk.PackageManagerRDKEMS
Comment on lines +5 to +7
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`.
Comment on lines +13 to +17
### 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.
Comment on lines +64 to +68
| Config source | Key | Member populated |
|---|---|---|
| `org.rdk.PackageManagerRDKEMS` | `downloadDir` | Download directory for OTA monitoring |
| `org.rdk.PreinstallManager` | `appPreinstallDirectory` | Preinstall directory for bundle staging |

Comment on lines +128 to +132
downloadDirectory resolution:
PackageManagerRDKEMS plugin config → downloadDir
│ empty
Download monitoring disabled (no fallback)
Comment on lines +47 to +52
### 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`.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants