Skip to content

Feature/hil testing overhaul - #1926

Open
aljazdu wants to merge 6 commits into
developfrom
feature/hil_testing_overhaul
Open

Feature/hil testing overhaul#1926
aljazdu wants to merge 6 commits into
developfrom
feature/hil_testing_overhaul

Conversation

@aljazdu

@aljazdu aljazdu commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Purpose

Adds the following testing structure:

  • Short PR tests
  • Specific nightly tests
  • Weekly full run

Specification

  • PR tests are triggered on PR approval, however they can be triggered manually by adding the existing "testable" label
  • Weekly tests are run on a schedule - specifically on the develop branch. They can be triggered manually in the workflow dispatch, where additional settings can be specified: Run sanitizer tests (true/false), Run OS tests (true/false), Run replay tests (true/false)
  • Nightly tests are run on a schedule - specifically on the develop branch.

Dependencies & Potential Impact

None / not applicable

Deployment Plan

None / not applicable

Testing & Validation

None / not applicable

AI Usage

Assisted-by: Codex

Submitted code was reviewed by a human: YES

The author is taking the responsibility for the contribution: YES

Summary by CodeRabbit

  • New Features

    • Added pull request, nightly, weekly, and scheduled hardware-in-the-loop testing workflows.
    • Added configurable weekly test groups for operating systems, replay, and sanitizers.
    • Added automated test summaries, log uploads, and Slack notifications.
    • Added an option to skip standard test suites when running specialized tests.
  • Changes

    • Pull request validation now runs only when explicitly labeled.
    • Removed the legacy test workflow.

@aljazdu
aljazdu requested a review from aljazkonec1 August 5, 2026 08:10
@aljazdu aljazdu self-assigned this Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@aljazdu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cdddc051-2371-48b6-a404-b524cbafa810

📥 Commits

Reviewing files that changed from the base of the PR and between e03b569 and 87b7031.

📒 Files selected for processing (7)
  • .github/workflows/hil_testing_nightly.yml
  • .github/workflows/hil_testing_pull_request.yml
  • .github/workflows/hil_testing_schedule_develop.yml
  • .github/workflows/hil_testing_weekly.yml
  • .github/workflows/main.workflow.yml
  • .github/workflows/test.workflow.yml
  • .github/workflows/test_child.yml
📝 Walkthrough

Walkthrough

The PR replaces the legacy test workflow with HIL-focused pull-request, nightly, scheduled, and weekly workflows. It adds selectable platform and sanitizer runs, Slack reporting, required-result checks, and optional standard-test execution in the reusable child workflow.

Changes

HIL testing workflow overhaul

Layer / File(s) Summary
Reusable test controls
.github/workflows/test_child.yml
Adds the run_standard_tests boolean input. Standard RVC2, RVC4, USB, RGB, and Linux result jobs now depend on this input.
Pull-request HIL validation
.github/workflows/main.workflow.yml, .github/workflows/hil_testing_pull_request.yml
Limits the main pull-request workflow to labeled events. Adds container publishing, RVC2 and RVC4 HIL tests, log artifacts, combined summaries, and required-result validation.
Weekly test orchestration
.github/workflows/hil_testing_weekly.yml
Adds selectable Linux, sanitizer, Windows, replay, and macOS workflows. The notification job parses JUnit results and posts status details to Slack.
Nightly and scheduled entrypoints
.github/workflows/hil_testing_nightly.yml, .github/workflows/hil_testing_schedule_develop.yml, .github/workflows/test.workflow.yml
Adds manual nightly HIL execution and scheduled develop dispatches. Removes the legacy test workflow.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: testable

Suggested reviewers: aljazkonec1

Poem

I hop through workflows under moonlit skies,
RVC tests run, and nightly logs arise.
Slack receives the passing tale,
Failed checks wave a little flag.
Thump, thump—HIL is on the trail! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feature/hil testing overhaul' describes the main change: a comprehensive restructuring of HIL testing workflows. It aligns with the PR objectives that detail multiple new testing workflows (PR, nightly, weekly) and workflow restructuring.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/hil_testing_overhaul

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/hil_testing_pull_request.yml:
- Line 32: Pin every external GitHub Actions reference in the listed workflow
steps to a full immutable commit SHA instead of mutable tags, updating the
`actions/checkout`, `actions/upload-artifact`, and `actions/download-artifact`
usages in `.github/workflows/hil_testing_pull_request.yml` and
`.github/workflows/hil_testing_weekly.yml`. Keep the workflow behavior unchanged
and replace each tagged action reference at the anchor and sibling sites with
its trusted SHA-pinned equivalent.

In @.github/workflows/hil_testing_schedule_develop.yml:
- Line 19: Update the Saturday schedule’s gh workflow run command to dispatch
hil_testing_weekly.yml instead of hil_testing_main.yml, while preserving the
existing repository and develop ref arguments.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1a97d72d-28a2-4835-b676-31c12b64a40b

📥 Commits

Reviewing files that changed from the base of the PR and between e03b569 and 05118c3.

📒 Files selected for processing (7)
  • .github/workflows/hil_testing_nightly.yml
  • .github/workflows/hil_testing_pull_request.yml
  • .github/workflows/hil_testing_schedule_develop.yml
  • .github/workflows/hil_testing_weekly.yml
  • .github/workflows/main.workflow.yml
  • .github/workflows/test.workflow.yml
  • .github/workflows/test_child.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/test.workflow.yml
📜 Review details
🧰 Additional context used
🪛 actionlint (1.7.12)
.github/workflows/hil_testing_pull_request.yml

[error] 28-28: label "hil-test-v3" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-intel", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


[error] 52-52: label "testbed-runner" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-intel", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


[error] 87-87: label "testbed-runner" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-intel", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🪛 zizmor (1.29.0)
.github/workflows/hil_testing_schedule_develop.yml

[error] 9-9: overly broad permissions (excessive-permissions): actions: write is overly broad at the workflow level

(excessive-permissions)


[warning] 9-9: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)


[info] 12-12: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 3-6: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

.github/workflows/hil_testing_nightly.yml

[warning] 1-26: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)

.github/workflows/hil_testing_pull_request.yml

[warning] 32-32: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 55-55: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 89-89: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 132-132: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 1-180: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 17-48: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 49-79: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 80-113: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 40-40: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 42-42: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 46-46: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 59-59: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 67-67: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[info] 67-67: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 68-68: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 68-68: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 93-93: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 94-94: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 100-100: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 101-101: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[info] 101-101: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 102-102: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 102-102: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 174-174: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 174-174: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 176-176: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 177-177: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[error] 32-32: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 55-55: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 73-73: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 89-89: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 107-107: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 132-132: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 135-135: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 129-129: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)

.github/workflows/hil_testing_weekly.yml

[warning] 1-224: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 25-31: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 33-46: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 48-59: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 61-72: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 74-85: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 87-101: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 103-114: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[warning] 31-31: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[error] 129-129: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[info] 25-25: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[info] 116-116: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)

🔇 Additional comments (5)
.github/workflows/test_child.yml (1)

20-23: LGTM!

Also applies to: 86-86, 114-114, 144-144, 170-170, 197-197

.github/workflows/main.workflow.yml (1)

20-20: LGTM!

.github/workflows/hil_testing_weekly.yml (1)

25-114: LGTM!

.github/workflows/hil_testing_nightly.yml (1)

12-25: LGTM!

.github/workflows/hil_testing_pull_request.yml (1)

40-46: 🔒 Security & Privacy

Sensitive Data Exposure (CWE-367): Time-of-check Time-of-use (TOCTOU) Race Condition

Reachability: External

Bind the build to an immutable reviewed revision.

SOURCE_REF resolves the mutable refs/pull/<number>/merge ref when the build starts. A pull request can change after the approval or label event and before a self-hosted runner resolves this ref. The resulting image then runs with HIL_PAT_TOKEN and telemetry secrets.

Pass an immutable event SHA to the build script. Verify that scripts/hil/build_and_push.sh checks out that SHA and does not resolve the pull-request ref again.

#!/bin/bash
set -euo pipefail

# Inspect whether the build script resolves its source argument as a mutable ref.
rg -n -C 4 'SOURCE_REF|\$2|git (fetch|checkout|clone)|refs/pull' \
  scripts/hil/build_and_push.sh

Comment thread .github/workflows/hil_testing_pull_request.yml
Comment thread .github/workflows/hil_testing_schedule_develop.yml Outdated
@aljazdu
aljazdu force-pushed the feature/hil_testing_overhaul branch from 05118c3 to 87b7031 Compare August 5, 2026 08:22
@aljazdu aljazdu added the testable PR is ready to be tested - run vanilla tests label Aug 5, 2026

@danilo-pejovic danilo-pejovic 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.

Mostly lgtm, barring those nitpicks. You will probably have to create nightly/weekly workflows in main before running them else github can be bit hard to work with as it cant find them to run them.

name: DepthAI Core HIL Testing Develop Schedule

on:
schedule:

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.

Why do we need a separate workflow to trigger nightly runs? I think just adding this schedule directly into nightly.yml/weekly file should work well? Nightly/weekly can also be combined into a single file that runs with different OS/platform requirements based on schedule.


jobs:
# Build the docker container
build_docker_container:

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.

This seems like code duplication as these same functions will also be in test_child? Can this pipeline work similarly to test.workflow.yml previously where it would just call relevant jobs from test_child.yml and then we move relevant reporting there?

Nothing critical but having such behaviour in reusable scripts makes it much easier to quickly set up testing to replicate specific issues we find during testing.

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

Labels

testable PR is ready to be tested - run vanilla tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants