Skip to content

fix(hw-gate): resolve --checkout to an absolute path before launching a seat - #698

Merged
Kaden-Schutt merged 1 commit into
masterfrom
fix/hw-gate-checkout-abspath
Sep 4, 2026
Merged

fix(hw-gate): resolve --checkout to an absolute path before launching a seat#698
Kaden-Schutt merged 1 commit into
masterfrom
fix/hw-gate-checkout-abspath

Conversation

@Kaden-Schutt

Copy link
Copy Markdown
Collaborator

Summary

First live run of the rung — workflow_dispatch on #686, run 33848923893 — never reached Sol. review.py launches omp with cwd=checkout and --cwd checkout; the workflow passes --checkout pr relative to the job workspace, so omp resolved pr/pr and exited 1 before reading the diff:

Sol prelim unavailable: omp prelim failed (1): Error: Cannot change working directory to pr: ENOENT … chdir '/home/kaden/actions-runner/_work/hipfire/hipfire/pr' -> '…/pr/pr'

prelim.json came back null, both hardware lanes were skipped, and hw-gate went red with "sol prelim unavailable". The bot identity, secrets, runners, and comment posting all worked — the seat posted its own failure as hipfire-sol[bot].

The #679 dry runs did not catch it because the fake omp ignored --cwd and every test passed an absolute checkout.

Changes

  • scripts/hw-gate/review.py: abspath the checkout once after parse_args; all three seat launches and the git helpers inherit it.
  • scripts/hw-gate/tests/fake_omp.py: chdir to --cwd like the real binary, exit 1 with the same error shape when it does not exist.
  • scripts/hw-gate/tests/test_review.py: test_prelim_relative_checkout_reaches_the_seat — prelim invoked with a relative --checkout from the parent directory must reach the seat and pass an absolute --cwd.

Which surface(s) does this touch?

  • policy files — gate scripts (hard floor: a human merges this)

Evidence

  • Regression test fails on the old script with the runner's exact error (Cannot change working directory to pr/checkout … -> pr/checkout/pr/checkout) and passes with the fix.
  • python3 -m pytest scripts/hw-gate/tests -q103 passed.

After merge

Re-dispatch on #686: gh workflow run hw-gate.yml -f pr=686. Gate scripts come from the base branch (pull_request_target), so the fix has to be on master before any PR can get a real prelim.

… a seat

First live run of the rung (workflow_dispatch on #686, run 33848923893)
never reached Sol: review.py launched omp with cwd=checkout AND
`--cwd checkout`, and the workflow passes `--checkout pr` relative to the
job workspace, so omp resolved `pr/pr` and exited 1 before reading the
diff. prelim.json came back null, hardware was skipped, and the status
went red with "sol prelim unavailable".

The dry runs on #679 did not catch it because the fake omp ignored
`--cwd` and every test passed an absolute checkout.

- review.py: abspath the checkout once after parse_args; all three seat
  launches and the git helpers inherit it.
- tests/fake_omp.py: chdir to `--cwd` like the real binary, exit 1 with
  the same error shape when it does not exist.
- tests/test_review.py: prelim with a relative --checkout from the parent
  directory must reach the seat and pass an absolute --cwd. Fails on the
  old script with the runner's exact error; passes with the fix.

103/103 in scripts/hw-gate/tests.
@Kaden-Schutt
Kaden-Schutt merged commit 2392566 into master Sep 4, 2026
8 checks passed
@hipfire-sol

hipfire-sol Bot commented Sep 4, 2026

Copy link
Copy Markdown

hw-gate sol prelim

Sol prelim unavailable: omp prelim failed (1): Error: Cannot change working directory to pr: ENOENT: no such file or directory, chdir '/home/kaden/actions-runner/_work/hipfire/hipfire/pr' -> '/home/kaden/actions-runner/_work/hipfire/hipfire/pr/pr'.

run_hardware: false (sol unavailable, label hw-run may force)

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