ci: run the energy meters' RAPL and NVML tests on real hardware (jetson-hub, linux-hw) #162

Merged
dcharlot merged 1 commit from ci/energy-hardware-linux-hw into main 2026-10-05 15:54:21 -04:00
Owner

Runs the energy meters' Linux RAPL and NVML hardware tests (from #129) against real counters, in CI.

Why. Every other job runs in a container. Docker masks /sys/devices/virtual/powercap there and gives no GPU, so those tests only ever took their "unavailable, and the oracle agrees" branch. Nothing in CI exercised the live path.

Where. A new runner, jetson-hub-linux-hw, label linux-hw: a host executor on jetson-hub.

  • Hardware: an Intel i9-13900H (package-0, a core sub-zone, psys, an mmio package) and an RTX 4050 Laptop GPU.
  • Isolation: it runs as txhw, a dedicated user with no sudo and no docker, which can read powercap and open /dev/nvidia*.
  • Service: systemd forgejo-runner-hw, beside the existing docker runner, which is unchanged.

What it runs. The six crates' hardware tests:

Crate Tests Features
jcp-energy RAPL, NVML nvml
eoc-meter RAPL, NVML cuda
sandbox-meter RAPL, NVML
sandbox-exec-microvm RAPL
proof-cascade RAPL
jouleclaw-energy RAPL, NVML rapl,nvml

Each step fails unless the live path ran:

  • RAPL: the oracle's package-only inner … outer … bracket was printed. Only the live path prints it, after asserting the meter read inside the bracket and below package+psys and package+core. For proof-cascade, the oracle has to say Live instead.
  • NVML: the test saw the GPU (nvml hardware: 1 GPU). On this GPU the counter runs past the board while it is polled, so the tests assert it is Implausible and never graded as hardware.

Mechanics. The host has no Node, so there are no JavaScript actions:

  • the source is fetched with plain git from the forge, and the step checks it got the commit the run is for;
  • target directories persist in the runner's home, so later runs are incremental;
  • builds run under nice and -j 8, since the host is also the docker runner and has 15 GB of RAM.

Triggers. Pull requests and pushes to main that touch those six crates or this workflow. This PR touches the workflow, so its own run is the first real test.

🤖 Generated with Claude Code

Runs the energy meters' Linux RAPL and NVML hardware tests (from #129) against **real counters**, in CI. **Why.** Every other job runs in a container. Docker masks `/sys/devices/virtual/powercap` there and gives no GPU, so those tests only ever took their "unavailable, and the oracle agrees" branch. Nothing in CI exercised the live path. **Where.** A new runner, `jetson-hub-linux-hw`, label **`linux-hw`**: a **host executor** on jetson-hub. - **Hardware:** an Intel i9-13900H (`package-0`, a `core` sub-zone, `psys`, an mmio package) and an RTX 4050 Laptop GPU. - **Isolation:** it runs as `txhw`, a dedicated user with no sudo and no docker, which can read powercap and open `/dev/nvidia*`. - **Service:** systemd `forgejo-runner-hw`, beside the existing docker runner, which is unchanged. **What it runs.** The six crates' hardware tests: | Crate | Tests | Features | |---|---|---| | jcp-energy | RAPL, NVML | `nvml` | | eoc-meter | RAPL, NVML | `cuda` | | sandbox-meter | RAPL, NVML | | | sandbox-exec-microvm | RAPL | | | proof-cascade | RAPL | | | jouleclaw-energy | RAPL, NVML | `rapl,nvml` | Each step fails unless the live path ran: - **RAPL:** the oracle's `package-only inner … outer …` bracket was printed. Only the live path prints it, after asserting the meter read inside the bracket and below package+psys and package+core. For proof-cascade, the oracle has to say Live instead. - **NVML:** the test saw the GPU (`nvml hardware: 1 GPU`). On this GPU the counter runs past the board while it is polled, so the tests assert it is Implausible and never graded as hardware. **Mechanics.** The host has no Node, so there are no JavaScript actions: - the source is fetched with plain git from the forge, and the step checks it got the commit the run is for; - target directories persist in the runner's home, so later runs are incremental; - builds run under `nice` and `-j 8`, since the host is also the docker runner and has 15 GB of RAM. **Triggers.** Pull requests and pushes to `main` that touch those six crates or this workflow. This PR touches the workflow, so its own run is the first real test. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci: run the energy meters' RAPL and NVML tests on real hardware
All checks were successful
energy meters on real hardware / RAPL and NVML on jetson-hub (pull_request) Successful in 1m2s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m53s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m26s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m12s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m13s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m41s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 2m32s
standards workspaces build + test / aac-rs (pull_request) Successful in 1m32s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 56s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 39s
standards workspaces build + test / map-rs (pull_request) Successful in 37s
standards workspaces build + test / mesh-rs (pull_request) Successful in 30s
standards workspaces build + test / openpay (pull_request) Successful in 1m47s
standards workspaces build + test / arl-rs (pull_request) Successful in 3m44s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 3m49s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 3m48s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 3m42s
standards workspaces build + test / sense-rs (pull_request) Successful in 3m45s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 5m38s
9318986759
Every existing job runs in a container. Docker masks
/sys/devices/virtual/powercap there and gives no GPU, so the energy
crates' hardware tests only ever took their "unavailable, and the oracle
agrees" branch. This job runs on `linux-hw`, a host executor on
jetson-hub. It runs as an unprivileged user (no sudo, no docker) that
can read powercap and open /dev/nvidia*, on an Intel i9-13900H with
package-0, a core sub-zone, psys and an mmio package, and an RTX 4050
Laptop GPU.

It runs jcp-energy, eoc-meter, sandbox-meter, sandbox-exec-microvm,
proof-cascade and jouleclaw-energy, with their NVML features on. Each
step fails unless the live path ran:
- RAPL: the oracle's package-only bracket was printed;
- NVML: the GPU was seen.

The source is fetched with plain git (the host has no Node), and the
step checks it got the commit the run is for. Target dirs persist in
the runner's home between runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!162
No description provided.