Skip to content

L2 Coverage Documentation for RFC#197

Open
nhanasi wants to merge 6 commits into
developfrom
feature/rfcdocs
Open

L2 Coverage Documentation for RFC#197
nhanasi wants to merge 6 commits into
developfrom
feature/rfcdocs

Conversation

@nhanasi

@nhanasi nhanasi commented May 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 5, 2026 20:01
@nhanasi
nhanasi requested a review from a team as a code owner May 5, 2026 20:01
@nhanasi

nhanasi commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	docs/rfc-parameter-runtime-priority.md
#	test/docs/l2-test-coverage-analysis.md

Co-authored-by: nhanasi <107076221+nhanasi@users.noreply.github.com>

Copilot AI commented May 5, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit 2aeff14. The conflicts in docs/rfc-parameter-runtime-priority.md and test/docs/l2-test-coverage-analysis.md were caused by both branches adding those files independently. I merged origin/develop into this branch, keeping the extended content from this PR.

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 and updates documentation to better describe RFC/TR-181 parameter lookup precedence at runtime and to capture the current (and missing) L2 functional test coverage for the RFC module.

Changes:

  • Documented runtime lookup priority across librfcapi / libtr181api, including pre-tr69hostif fallback layers (store/bootstrap/defaults).
  • Added a comprehensive L2 functional test coverage analysis document with gap identification and proposed scenarios.
  • Linked the new runtime priority doc from the repository root README.md.

Reviewed changes

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

Show a summary per file
File Description
tr181api/docs/README.md Updates TR181 store hierarchy docs and clarifies getLocalParam() fallback behavior.
rfcapi/docs/README.md Updates getRFCParameter() documentation to include live data model behavior and bootstrap/defaults precedence.
docs/rfc-parameter-runtime-priority.md New deep-dive document describing runtime priority across multiple resolution paths (RFC library, bootstrap subsystem, live hostif fallback).
test/docs/l2-test-coverage-analysis.md New document mapping L2 tests to code paths, highlighting gaps, and proposing additional scenarios and mock-server enhancements.
README.md Adds a link to the new runtime priority document.
Comments suppressed due to low confidence (2)

docs/rfc-parameter-runtime-priority.md:72

  • This document says legacy RFC_xxxx keys are always file-based via rfcVariable.ini. In the current rfcapi.cpp non-RDKB path, RFC_ keys are only routed to rfcVariable.ini when /tmp/.tr69hostif_http_server_ready is missing; once that sentinel exists, getRFCParameter() uses the localhost HTTP path and does not special-case RFC_ keys. Please clarify this in the runtime-priority description (or align the implementation if the intent is ‘always file-based’).
For TR181-style RFC keys such as `Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.*`, the effective priority is:

1. Live data-model value from `tr69hostif`, when `/tmp/.tr69hostif_http_server_ready` exists
2. Persisted XConf-applied value in `/opt/secure/RFC/tr181store.ini`
3. Persisted bootstrap value in `/opt/secure/RFC/bootstrap.ini`
4. RFC fallback default from `/tmp/rfcdefaults.ini`, generated from `/etc/rfcdefaults/*.ini`

For legacy `RFC_xxxx` keys without a dot, lookup remains file-based and uses `/opt/secure/RFC/rfcVariable.ini` directly.

test/docs/l2-test-coverage-analysis.md:1149

  • Section numbering looks inconsistent: under “## 6. Mock Server Enhancement Requirements” the subsections are labeled “### 5.1” and “### 5.2”. Renumbering these to “6.1/6.2” (or dropping the numeric prefixes) would avoid confusion when referencing sections.
## 6. Mock Server Enhancement Requirements

To support the missing test scenarios, the mock XConf server (`rfcData.js`) needs:

### 5.1 New Response Endpoints

| Endpoint | Purpose | Gap |
|---|---|---|
| `/featureControl/timeout` | Delayed response (>120s) | GAP-H1 |
| `/featureControl/503retry` | Returns 503 first N times, then 200 | GAP-H2 |
| `/featureControl/malformed` | Returns invalid JSON | GAP-H3 |
| `/featureControl/emptyFeatures` | Returns `{"featureControl":{"features":[]}}` | GAP-H3 |
| `/featureControl/noConfigData` | Returns features without configData | GAP-H3 |
| `/featureControl/changedHash` | Returns response with different configSetHash | GAP-H9 |
| `/featureControl/partnerChange` | Returns changed PartnerID | GAP-H6 |

### 5.2 New Mock XConf Response Files

Comment thread rfcapi/docs/README.md
Comment on lines +30 to +38
For TR181-style RFC keys (`Device.*`), the effective priority is:

1. Live TR181 data model via `tr69hostif` when `/tmp/.tr69hostif_http_server_ready` exists
2. `/opt/secure/RFC/tr181store.ini` when the host interface is not ready
3. `/opt/secure/RFC/bootstrap.ini` when the host interface is not ready and the key is not present in `tr181store.ini`
4. `/tmp/rfcdefaults.ini` as the final fallback

For legacy `RFC_xxxx` keys without a dot, the lookup remains file-based and reads `/opt/secure/RFC/rfcVariable.ini` directly.

Comment on lines 7 to +16
**Test Framework:** pytest (Python) with Gherkin `.feature` files
**Test Infrastructure:** Mock XConf HTTPS server (`rfcData.js`), mock parodus binary, Docker container
**Execution Scripts:** `run_l2.sh` (main), `run_l2_reboot_trigger.sh` (reboot-specific)

### Test Directory Structure

```
test/functional-tests/
├── features/ # Gherkin feature specifications (19 files)
│ ├── rfc_data.feature
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.

3 participants