Getting started with OpenSpec#245
Open
mkadinti wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds OpenSpec “getting started” documentation for rdkfwupdater, including a project baseline, per-module specs, and repository-local OpenSpec workflow/skill definitions (plus an archived example change).
Changes:
- Added OpenSpec project baseline (
openspec/project.md) and module specs for major subsystems underopenspec/specs/. - Added OpenSpec configuration plus an archived spec-driven change example under
openspec/changes/archive/. - Added GitHub workflow skill/prompt docs for
/opsx:*OpenSpec actions under.github/skills/and.github/prompts/.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| openspec/specs/rfcInterface.md | Documents RFC interface module (identity, key params, API, return codes). |
| openspec/specs/rdkv_upgrade.md | Documents download engine responsibilities, key functions, constants, errors. |
| openspec/specs/rdkv_main.md | Documents legacy CLI entrypoint flow, state, dependencies, tests. |
| openspec/specs/rdkFwupdateMgr_daemon.md | Documents daemon mode purpose, state machine, D-Bus surface, deps/tests. |
| openspec/specs/rbusInterface.md | Documents rbus telemetry trigger integration used by updater. |
| openspec/specs/librdkFwupdateMgr.md | Documents client library API and async/callback architecture. |
| openspec/specs/json_process.md | Documents XConf JSON parsing module structures and API. |
| openspec/specs/iarmInterface.md | Documents IARM event bus integration module. |
| openspec/specs/flash.md | Documents flashing module API, responsibilities, status files. |
| openspec/specs/deviceutils.md | Documents device utilities module, URL/system command behaviors. |
| openspec/specs/device_status_helper.md | Documents device/download status helper responsibilities and APIs. |
| openspec/specs/dbus_server.md | Documents internal D-Bus server components, data structures, cache strategy. |
| openspec/specs/cedmInterface.md | Documents certificate + Codebig signing utilities and variants. |
| openspec/project.md | Provides repo-wide baseline: architecture, structure, build artifacts, workflows, conventions. |
| openspec/config.yaml | Adds OpenSpec schema config scaffold for artifact generation context/rules. |
| openspec/changes/archive/2026-05-07-fix-pdri-newline-strip/tasks.md | Archived change task checklist for PDRI newline stripping fix. |
| openspec/changes/archive/2026-05-07-fix-pdri-newline-strip/specs/iarmInterface/spec.md | Archived delta spec describing expected PDRI filename trimming behavior. |
| openspec/changes/archive/2026-05-07-fix-pdri-newline-strip/proposal.md | Archived change proposal (why/what/impact/testing). |
| openspec/changes/archive/2026-05-07-fix-pdri-newline-strip/design.md | Archived design notes and decisions/tradeoffs for the fix. |
| openspec/changes/archive/2026-05-07-fix-pdri-newline-strip/.openspec.yaml | Archived change metadata (schema + creation date). |
| .github/skills/openspec-propose/SKILL.md | Skill doc for proposing a change and generating artifacts. |
| .github/skills/openspec-explore/SKILL.md | Skill doc for explore mode (investigation/clarification stance). |
| .github/skills/openspec-archive-change/SKILL.md | Skill doc for archiving completed changes (with sync/warnings). |
| .github/skills/openspec-apply-change/SKILL.md | Skill doc for implementing tasks from an OpenSpec change. |
| .github/prompts/opsx-propose.prompt.md | Prompt doc for /opsx:propose workflow. |
| .github/prompts/opsx-explore.prompt.md | Prompt doc for /opsx:explore workflow. |
| .github/prompts/opsx-archive.prompt.md | Prompt doc for /opsx:archive workflow. |
| .github/prompts/opsx-apply.prompt.md | Prompt doc for /opsx:apply workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+50
to
+57
| // Initialize IARM bus and register member | ||
| void initIarmBus(void); | ||
|
|
||
| // Send download status event | ||
| void eventManager(int status); | ||
|
|
||
| // Cleanup IARM bus connection | ||
| void cleanupIarmBus(void); |
Comment on lines
+46
to
+49
| int read_RFCProperty(const char *rfcName, char *rfcValue, size_t rfcValueSize); | ||
|
|
||
| // Read all firmware-related RFC settings into Rfc_t | ||
| void getRFCSettings(Rfc_t *rfc_list); |
Comment on lines
+44
to
+45
| void updateFWDownloadStatus(const char *status); // Write status to file | ||
| void notifyDwnlStatus(int status); // Broadcast status event |
Comment on lines
+43
to
+44
| - Not compiled when `GTEST_ENABLE` is defined (excluded from test builds) | ||
| - Requires `librbus` at link time |
Comment on lines
+25
to
+52
| ## Key Functions | ||
|
|
||
| | Function | Purpose | | ||
| |----------|---------| | ||
| | `MakeXconfComms()` | Build and send XConf request | | ||
| | `upgradeRequest()` | Orchestrate download with business logic | | ||
| | `downloadFile()` | Direct server download (XConf/SSR) | | ||
| | `codebigdownloadFile()` | Codebig proxy download | | ||
| | `doCurlInit()` | Initialize curl handle | | ||
| | `doHttpFileDownload()` | Execute HTTP download with curl options | | ||
| | `doStopDownload()` | Release curl resources | | ||
| | `retryDownload()` | Retry failed download | | ||
| | `fallBack()` | Switch between direct/codebig paths | | ||
|
|
||
| ## Download Paths | ||
|
|
||
| ``` | ||
| ┌─────────────┐ | ||
| │upgradeRequest│ | ||
| └──────┬──────┘ | ||
| ┌────────────┼────────────┐ | ||
| ▼ ▼ ▼ | ||
| ┌──────────┐ ┌──────────┐ ┌──────────┐ | ||
| │ Direct │ │ Codebig │ │State Red │ | ||
| │ Download │ │ Download │ │ Recovery │ | ||
| └────┬─────┘ └────┬─────┘ └──────────┘ | ||
| │ │ | ||
| └──── fallBack ┘ (after 3 HTTP 0 errors) |
| - `MakeXconfComms()` → XConf HTTP request | ||
| - `processJsonResponse()` → Parse XConf response | ||
| - `checkTriggerUpgrade()` → Determine upgrade action | ||
| - `upgradeRequest()` → Execute download with fallback strategy |
Comment on lines
+55
to
+57
| | `CheckForUpdate` | `(s)` handler_id | `(tiissss)` via signal | Async XConf query | | ||
| | `DownloadFirmware` | `(s)` handler_id + params | Progress via signal | Async download | | ||
| | `UpdateFirmware` | `(s)` handler_id + params | Progress via signal | Async flash | |
Comment on lines
+67
to
+73
| ## XConf Cache Strategy | ||
|
|
||
| 1. Check cache file: `/tmp/xconf_response_thunder.txt` | ||
| 2. **Cache hit**: Parse cached response, validate, return immediately | ||
| 3. **Cache miss**: Spawn async GTask to fetch from XConf server | ||
| 4. Return `FIRMWARE_CHECK_ERROR` immediately on cache miss | ||
| 5. Emit `CheckForUpdateComplete` signal when async fetch completes |
| | `--enable-rfcapi` | Enable RFC API (`-DRFC_API_ENABLED`) | | ||
| | `--enable-t2api` | Enable T2 telemetry (`-DT2_EVENT_ENABLED`) | | ||
| | `--enable-iarmevent` | Enable IARM event bus (`-DIARM_ENABLED`) | | ||
| | `--enable-dbus-daemon` | Enable D-Bus daemon build (`-DENABLE_DBUS_DAEMON`) | |
Comment on lines
+19
to
+20
| ```c | ||
| FirmwareInterfaceHandle registerProcess(const char *processName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.