Repository navigation
Conversation
fotiDim
marked this pull request as draft
November 12, 2026 20:36
fotiDim
force-pushed
the
windows-hil-ci
branch
from
November 19, 2026 08:23
b9d7974 to
396cfd1
Compare
Add a maintainer-triggered workflow that flashes a pinned Zephyr image to the nRF52 DK fixture and then runs the baseline and fault insertion suites on a self-hosted Windows runner, one selected group at a time. Windows now arms fixture faults over the DK's USB virtual COM port instead of BLE, so a link that the fault under test tears down can no longer drop the control command: - hil_serial_io.dart drives a PowerShell serial bridge over a loopback socket and serialises request/reply exchanges; hil_serial_stub.dart is selected by conditional import where dart:io serial control is absent. - HilPeripheral opens the wired link, validates the reported fixture address and contract revision, exposes wired telemetry reads, and gains dispose() so the serial bridge is released with the connection. - Fault insertion tests carry a group tag in their names so the workflow can select a single group, trace FIT-CONN-009/013 timings, and fail loudly instead of tolerating BLE control-path write errors when the wired path is in use. - run_windows_hil_group.ps1 runs each group in a worker process under a timeout so a hung group cannot block the remaining groups.
…gets The branch guard cannot protect the self-hosted runner: a workflow_dispatch run executes the YAML of the selected ref, so anyone with write access can dispatch a branch whose copy of this file drops the guard. Say so in the header, name the two organization controls the job actually depends on (the runner group's workflow-access allowlist and the environment's deployment-branch and reviewer rules), and add github.workflow_ref as a second signal rather than implying the file is sufficient on its own. Budgets: - pass a per-group -TimeoutSeconds above that group's declared per-test timeouts; timing-sweeps alone sums to 34 minutes, so 480 seconds could never fit; - raise the job timeout to cover 180 minutes of group budgets plus preparation, the warm build, and the flash; - warm the CMake/MSVC build once outside the timed groups; - start from a clean windows/, build/ and .metadata on a persistent runner. Smaller fixes: - mask HIL_JLINK_SERIAL, and keep the configured serial (leading zeros included) for the jlink -USB selection while matching the PnP instance id without them; - fail and print the discovered ports when no VCOM0 interface exists instead of falling back to $ports[0]; - invoke the group script with an explicit execution policy; - guard the group conditions with `inputs.test_group || 'all'`; - pin the used actions by SHA on the hardware runner; - name the PCA10040 board next to the device name; - warn instead of ignoring a missing log artifact.
…antly The bridge only read the port while a command was in flight, so 64 KiB of Zephyr log output could fill the buffer and discard a reply, and a single ReadLine timeout threw out of the loop and marked the session failed for good. The helper now reads the port every iteration, forwards whole lines as they arrive, and treats a short read timeout as "nothing yet" instead of a failure. The Dart side keeps the 5 second budget as the only timeout authority: a miss fails that one exchange, the session stays usable, and a late reply is logged as ordinary fixture output. Teardown bounds the wait for the helper process. Reply matching no longer assumes the reply is alone on its line. The `HIL <id> ` marker is located with lastIndexOf, and each call site validates the payload with an anchored, fully specified pattern (handshake address, 72-hex telemetry, single `0` accept token), ignoring any log text that follows it. Timeouts report the port and the last helper error.
… script The 480 second default was smaller than the per-test budgets the timing sweeps declare. Raise the default well past that sum and document that the caller owns the budget, that CI passes it per group, and that the warm build keeps a cold CMake/MSVC build out of it. Note the explicit execution policy needed when local scripts are restricted.
Mirror the fault suite: a failure path may leave the peripheral disconnected, and an error from dispose() during teardown must not replace the real test result.
… built The maintainer section still described a workflow that no longer exists: the runner group is already selected, and port resolution only fails at zero matches, prefers the &MI_00 interface, and now fails instead of silently falling back to the first port. Rewrite that passage, drop the "before upstreaming, enable runs-on.group" text, and document the group budgets, the warm build, and the execution-policy requirement. Also record what the code now does elsewhere: - the host-side reply framing and its firmware-side durable fix; - that the reader drains continuously and only the per-exchange budget fails; - that Windows has no BLE control path (no HIL_CONTROL=ble escape hatch); - that the firmware is fetched from a personal account while this is a draft.
fotiDim
force-pushed
the
windows-hil-ci
branch
from
November 19, 2026 17:05
7a780c3 to
31322ce
Compare
This branch has not been deployed
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.
Summary
Adds automated Windows Hardware-in-the-Loop (HIL) and fault injection testing for universal_ble using a physical Nordic nRF52 DK fixture running contract v2 firmware.
Changes
uns-on.group: windows-hil with labels [self-hosted, Windows, X64, universal-ble-hil].
otifications-indications, mtu-resources, iming-sweeps).
Upstream Security & Organization Requirements
Before enabling on the upstream repository, ensure the following organization and repository settings are configured:
Organization Runner Group (windows-hil):
ext Navideck/universal_ble/.github/workflows/windows_hil.yml@refs/heads/mainRepository Environment (windows-hil):
Local & CI Verification