ci: energy-hardware fetches the run's own commit by its hash #669

Closed
dcharlot wants to merge 1 commit from ci/energy-hardware-fetch-by-sha into main
Owner

Landed on main as c8ae450ed (cherry-picked unchanged; main had not touched the workflow since this branch). Checked first: the forge serves a depth-1 fetch of a commit that is no branch's tip.

The two Linux jobs of energy-hardware.yml fetched the branch a run was started for, and failed if it had moved, on the grounds that a newer run would test it.

On main that newer run rarely exists. The push that moves main usually touches none of this workflow's paths, so nothing re-runs it. The run after #650 and #651 merged waited for the one hardware runner. main moved two minutes before it started, and both jobs failed in five seconds having tested nothing. The macOS job, which checks out the exact commit, passed.

The two Linux jobs now fetch the run's own commit by its hash: the head commit for a pull request, the pushed commit for main. The forge serves any reachable commit this way, including one a branch has since moved past and a pull request's head; both were tried before this change. The check that the forge returned the commit asked for stays.

Checks run locally: scripts/check-workflow-concurrency.sh passes, and the workflow parses with its three jobs. This pull request touches the workflow file, so the workflow runs on it on the hardware runner.

wai-quantum-service.yml uses the same branch-fetch pattern and is left to its maintainers.

🤖 Generated with Claude Code

**Landed on main as c8ae450ed** (cherry-picked unchanged; main had not touched the workflow since this branch). Checked first: the forge serves a depth-1 fetch of a commit that is no branch's tip. The two Linux jobs of `energy-hardware.yml` fetched the branch a run was started for, and failed if it had moved, on the grounds that a newer run would test it. On `main` that newer run rarely exists. The push that moves `main` usually touches none of this workflow's paths, so nothing re-runs it. The run after #650 and #651 merged waited for the one hardware runner. `main` moved two minutes before it started, and both jobs failed in five seconds having tested nothing. The macOS job, which checks out the exact commit, passed. The two Linux jobs now fetch the run's own commit by its hash: the head commit for a pull request, the pushed commit for `main`. The forge serves any reachable commit this way, including one a branch has since moved past and a pull request's head; both were tried before this change. The check that the forge returned the commit asked for stays. Checks run locally: `scripts/check-workflow-concurrency.sh` passes, and the workflow parses with its three jobs. This pull request touches the workflow file, so the workflow runs on it on the hardware runner. `wai-quantum-service.yml` uses the same branch-fetch pattern and is left to its maintainers. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci: energy-hardware fetches the run's own commit by its hash
Some checks failed
energy meters on real hardware / sink decode table · per-task energy and the GPU rail on macOS (pull_request) Failing after 6s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 8s
standards workspaces build + test / macOS energy backends (pull_request) Has been skipped
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 4m47s
energy meters on real hardware / RAPL and NVML on jetson-hub (pull_request) Successful in 42s
energy meters on real hardware / sink decode table · RAPL on jetson-hub (NVML surveyed) (pull_request) Successful in 2m58s
5b21c043c2
The two linux-hw jobs fetched the branch a run was started for and failed when
it had moved, on the grounds that a newer run would test it. On main the push
that moves the branch rarely touches this workflow's paths, so no newer run
follows: the run after the merge of #650 and #651 waited behind the one
linux-hw runner, main moved on two minutes before it started, and both jobs
failed in five seconds having tested nothing. Fetching the commit by hash
tests exactly what the run was started for; the forge serves any reachable
commit that way, a pull request's head included.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
dcharlot closed this pull request 2026-11-09 19:19:29 -05:00
Some checks failed
energy meters on real hardware / sink decode table · per-task energy and the GPU rail on macOS (pull_request) Failing after 6s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 8s
standards workspaces build + test / macOS energy backends (pull_request) Has been skipped
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 4m47s
energy meters on real hardware / RAPL and NVML on jetson-hub (pull_request) Successful in 42s
energy meters on real hardware / sink decode table · RAPL on jetson-hub (NVML surveyed) (pull_request) Successful in 2m58s

Pull request closed

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!669
No description provided.