Skip to content

MATTER-7075: Implement Renode commissioning tests in CI - #1135

Open
Michael Duggan (miduggan24) wants to merge 17 commits into
matter-4641-pipelinefrom
matter-7075-commissioning
Open

Michael Duggan (miduggan24) wants to merge 17 commits into
matter-4641-pipelinefrom
matter-7075-commissioning

Conversation

@miduggan24

@miduggan24 Michael Duggan (miduggan24) commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Issue Link:
MATTER-7075

Description of Problem/Feature:
Exercise the published simulation bundle from prior work in PR stack and CI lighting app build with a Renode commissioning test

Description of Fix/Solution:

  • Add callable workflow renode-commissioning-tests.yaml that fetches Renode bundle from GHCR, downloads lighting app binary, and runs pyrenode3 harness against matter-sim.resc
  • Add commissioning_test.py: ble-thread commissioning then onoff toggle. writes log files for visibility in CI output
  • Hook renode commissioning test call into dev-apps-builder after successful lighting app build (with continue-on-error: true for pilot phase)

Additional workflow takes ~7 min to run based on tests in fork repo, but since it runs in parallel with dev-apps-builder no net gain in CI time.

Testing Done:
Test workflow in fork repo

Also tested manual flow using pyrenode3 harness for commissioning test as outlined in the README

Note that PR CI failure is expected as there is no package created in this repo yet. Once phase 2 of workflow input PR is merged, we can produce a container and run PR CI against it.

@miduggan24
Michael Duggan (miduggan24) added this pull request to stack #1095 October 6, 2026 12:52
@cursor

cursor Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
New CI job depends on GHCR bundle v1 and lighting artifact upload; failures are non-blocking but wrong bundle version or missing package will fail the pilot job until artifacts are published.

Overview
Adds a parallel CI smoke test that commissions the mg24 lighting app ELF in Renode and toggles on/off via chip-tool, wired into dev-apps-builder after the lighting build.

builder.yaml uploads the brd4187c lighting .out as a dedicated artifact (renode-commissioning-*) so the ELF survives artifact merge (which strips ELFs). renode-commissioning-tests.yaml downloads that binary, pulls the pinned Renode bundle from GHCR (fetch_bundle.py), installs the pyrenode3 harness, and runs new commissioning_test.py (BLE-Thread pairing + on/off toggle). The job uses continue-on-error: true during the pilot and does not gate merge-apps.

Docs in renode_integration/README.md cover local harness usage and CI behavior. BUNDLE_VERSION is bumped v0 → v1 so CI fetches the published bundle tag expected for this integration.

Reviewed by Cursor Bugbot for commit 472bed8. Configure here.

@miduggan24

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Autofix Details

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Caller drops GHCR package permission
    • Added packages: read permission at workflow level so the intersection with the called workflow includes the required GHCR package access.
  • ✅ Fixed: Lighting artifact deleted before download
    • Added renode-commissioning-tests to merge-apps dependencies to ensure the artifact is not deleted until after the commissioning job downloads it.

Create PR

Or push these changes by commenting:

@cursor push d2816c1e5b
Preview (d2816c1e5b)
diff --git a/.github/workflows/dev-apps-builder.yaml b/.github/workflows/dev-apps-builder.yaml
--- a/.github/workflows/dev-apps-builder.yaml
+++ b/.github/workflows/dev-apps-builder.yaml
@@ -24,6 +24,7 @@
 permissions:
   contents: read
   actions: write
+  packages: read
 
 jobs:
     set-build-type:
@@ -310,6 +311,7 @@
             - build_rangehood_app
             - build_series_3_bootloader
             - build_wake_on_matter_app
+            - renode-commissioning-tests
         if: success()
 
         steps:

You can send follow-ups to the cloud agent here.

Comment thread .github/workflows/dev-apps-builder.yaml
Comment thread .github/workflows/renode-commissioning-tests.yaml

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Merge deletes ELF before download
    • Added renode-commissioning-tests as a dependency of merge-apps to ensure the lighting artifact is downloaded before being deleted by the merge action.

Create PR

Or push these changes by commenting:

@cursor push f4d62df9ae
Preview (f4d62df9ae)
diff --git a/.github/workflows/dev-apps-builder.yaml b/.github/workflows/dev-apps-builder.yaml
--- a/.github/workflows/dev-apps-builder.yaml
+++ b/.github/workflows/dev-apps-builder.yaml
@@ -310,6 +310,7 @@
             - build_rangehood_app
             - build_series_3_bootloader
             - build_wake_on_matter_app
+            - renode-commissioning-tests
         if: success()
 
         steps:

You can send follow-ups to the cloud agent here.

Comment thread .github/workflows/dev-apps-builder.yaml
@miduggan24

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: SQA lighting upload fails on ELF glob
    • Added condition to exclude custom-sqa builds from the Renode ELF upload step since those builds only create suffixed directories that don't match the glob pattern.

Create PR

Or push these changes by commenting:

@cursor push 9f3955659d
Preview (9f3955659d)
diff --git a/.github/workflows/builder.yaml b/.github/workflows/builder.yaml
--- a/.github/workflows/builder.yaml
+++ b/.github/workflows/builder.yaml
@@ -73,7 +73,7 @@
             # Need separate upload step for Renode ELF files to run commissioning test in parallel
             # Merge artifacts step deletes ELF files
             - name: Upload Renode commissioning ELF
-              if: inputs.example-app == 'lighting_app' && inputs.platform == 'mg24'
+              if: inputs.example-app == 'lighting_app' && inputs.platform == 'mg24' && inputs.build-type != 'custom-sqa'
               uses: actions/upload-artifact@v7
               with:
                   name: renode-commissioning-${{ inputs.build-type }}-lighting-mg24

You can send follow-ups to the cloud agent here.

Comment thread .github/workflows/builder.yaml
@miduggan24

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Autofix Details

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Exit-code fallback reads stale result
    • Removed the fallback search to the full UART history in Console.run() to prevent reading stale exit codes from previous commands.
  • ✅ Fixed: Job timeout shorter than test budget
    • Increased GitHub workflow timeout from 45 to 60 minutes to accommodate 35 minutes of test wait time plus setup overhead.

Create PR

Or push these changes by commenting:

@cursor push aa656ab2cb
Preview (aa656ab2cb)
diff --git a/.github/workflows/renode-commissioning-tests.yaml b/.github/workflows/renode-commissioning-tests.yaml
--- a/.github/workflows/renode-commissioning-tests.yaml
+++ b/.github/workflows/renode-commissioning-tests.yaml
@@ -16,7 +16,7 @@
     renode-commissioning:
         name: Renode commissioning smoke test
         runs-on: ubuntu-latest
-        timeout-minutes: 45
+        timeout-minutes: 60
         continue-on-error: true
         steps:
             - name: Checkout

diff --git a/renode_integration/harness/matter_sim.py b/renode_integration/harness/matter_sim.py
--- a/renode_integration/harness/matter_sim.py
+++ b/renode_integration/harness/matter_sim.py
@@ -116,7 +116,7 @@
         self.write_line(f'{cmd}; echo "__RC=$?"')
         matched = self.wait_for(r"__RC=(\d+)", timeout_s=timeout_s)
         report = self.get_report()
-        match = re.search(r"__RC=(\d+)", matched) or re.search(r"__RC=(\d+)", report)
+        match = re.search(r"__RC=(\d+)", matched)
         if match is None:
             raise RuntimeError(f"could not parse exit code from console output\n{report[-2000:]}")
         return int(match.group(1)), report

You can send follow-ups to the cloud agent here.

Comment thread renode_integration/harness/matter_sim.py Outdated
Comment thread .github/workflows/renode-commissioning-tests.yaml Outdated
@miduggan24

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@miduggan24 Michael Duggan (miduggan24) changed the title MATTER-7075: Implement Renode commissioing tests in CI MATTER-7075: Implement Renode commissioning tests in CI Oct 7, 2026
@miduggan24
Michael Duggan (miduggan24) force-pushed the matter-7075-commissioning branch 3 times, most recently from 96db8d6 to 36b00db Compare October 13, 2026 12:33
@miduggan24
Michael Duggan (miduggan24) force-pushed the matter-7075-commissioning branch 3 times, most recently from f2addfc to 30c3aea Compare October 13, 2026 15:53
@miduggan24

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Artifact download missing actions scope
    • Added actions: read permission to renode-commissioning-tests.yaml permissions block to allow artifact downloads from the called reusable workflow.

Create PR

Or push these changes by commenting:

@cursor push c0fbc5337e
Preview (c0fbc5337e)
diff --git a/.github/workflows/renode-commissioning-tests.yaml b/.github/workflows/renode-commissioning-tests.yaml
--- a/.github/workflows/renode-commissioning-tests.yaml
+++ b/.github/workflows/renode-commissioning-tests.yaml
@@ -11,6 +11,7 @@
 permissions:
     contents: read
     packages: read
+    actions: read
 
 jobs:
     renode-commissioning:

You can send follow-ups to the cloud agent here.

Comment thread .github/workflows/renode-commissioning-tests.yaml
@miduggan24

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 472bed8. Configure here.

@miduggan24
Michael Duggan (miduggan24) marked this pull request as ready for review October 15, 2026 11:08
@miduggan24
Michael Duggan (miduggan24) requested a review from a team as a code owner October 15, 2026 11:08
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.

1 participant