Skip to content

Getting started with OpenSpec#245

Open
mkadinti wants to merge 1 commit into
developfrom
topic/opsx
Open

Getting started with OpenSpec#245
mkadinti wants to merge 1 commit into
developfrom
topic/opsx

Conversation

@mkadinti
Copy link
Copy Markdown
Contributor

@mkadinti mkadinti commented May 8, 2026

No description provided.

@mkadinti mkadinti requested a review from a team as a code owner May 8, 2026 10:16
Copilot AI review requested due to automatic review settings May 8, 2026 10:16
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

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 under openspec/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
Comment thread openspec/project.md
| `--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);
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.

2 participants