Skip to content

ci: build the engine with ONEBIT_HRX=ON at PR time (hrx-build) - #1288

Merged
bong-water-water-bong merged 8 commits into
mainfrom
ci/hrx-pr-build
Nov 6, 2026
Merged

bong-water-water-bong merged 8 commits into
mainfrom
ci/hrx-pr-build

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Fixes #1077

What

No PR-time job compiled the HRX backend. ci.yml configures the engine without ONEBIT_HRX, and hw-gate.yml runs only on a hw-gate label or a bump-hrx/* branch, which is why both of that week's pin bumps read hw_gate: skipping.

The new .github/workflows/hrx-build.yml (job hrx_build) configures the engine with -DONEBIT_HRX=ON and builds onebit. Through cmake/hrx.cmake that builds llama_hrx (the pinned llama.cpp with GGML_HRX=ON and the pinned hrx-system), then links onebit with its HRX wiring. It needs no label.

constraint how
$0 Actions spend runs-on: [self-hosted, strixhalo, pr-agent], the box runner hw-gate.yml already uses; no hosted job
read-only token permissions: contents: read, persist-credentials: false, no secrets
actions pinned by SHA actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 (v7.0.1), the only action
same-repo PRs only if: github.event.pull_request.head.repo.full_name == github.repository (or workflow_dispatch)
concurrency hrx-build-<PR number>, cancel-in-progress: true
timeout timeout-minutes: 120

It runs only on PRs that change an input of the HRX build: the two gitlinks, CMakeLists.txt, cmake/hrx.cmake, config/hrx-toolchain.config, config/hrx-system-hold.config, app/serve.cpp (the HRX wiring) and the workflow itself. Other PRs start no job. The build runs under ~/lb/thermal-run.sh with no device claim. Its tree persists at ~/.cache/hrx-build/engine on the box, so later runs are incremental.

It covers the public plumbing only. The private HIP add-on and every device check stay with hw-gate, and this does not replace the hw-gate label on a pin bump. Docs: docs/hw-gate.md ("The HRX build check") and docs/hrx.md (the CI bullet).

Proof

Filled in from the runs on this box: this PR (green) and a draft test PR whose llama.cpp gitlink points at a deliberately broken ggml-hrx commit (red).

🤖 Generated with Claude Code

bong-water-water-bong and others added 7 commits November 6, 2026 16:06
ci.yml builds without ONEBIT_HRX and hw-gate.yml runs only on a label or a
bump-hrx/* branch, so no PR-time job compiled ggml-hrx. hrx-build.yml
configures the engine with -DONEBIT_HRX=ON and builds onebit (which builds
llama_hrx) on the strixhalo self-hosted runner: same-repo PRs only,
read-only token, SHA-pinned checkout, per-PR concurrency, 120 min timeout,
path-filtered to the build's inputs. Docs: docs/hw-gate.md, docs/hrx.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY at 92e69892 on the workflow as written — every constraint the body claims is in the file and checks out, the one action's pin is real, and the path filters are the right set. But the PR's own proof does not exist yet, and the reason is in the workflow itself: all ten hrx-build runs so far are cancelled, never finished, because concurrency: cancel-in-progress: true + a branch that keeps merging main means each fresh merge kills the build five minutes in.

The workflow, checked line by line against the body's table:

claim file
runs-on: [self-hosted, strixhalo, pr-agent], no hosted job :57 — the box runner hw-gate.yml already uses
read-only token, no secrets permissions: {contents: read} at top level, persist-credentials: false :69, no secrets. anywhere
actions pinned by SHA one action only: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1, and the GitHub API says refs/tags/v7.0.1 is 3d3c42e5aac5ba805825da76410c181273ba90b1 — the pin is real and matches the stated tag
same-repo PRs only if: github.event.pull_request.head.repo.full_name == github.repository :60 (or workflow_dispatch)
concurrency / timeout job-level concurrency: hrx-build-<PR> with cancel-in-progress: true :61-63, timeout-minutes: 120 :65
only PRs that change an HRX input on.pull_request.paths = both gitlinks, CMakeLists.txt, cmake/hrx.cmake, config/hrx-toolchain.config, config/hrx-system-hold.config, app/serve.cpp, the workflow itself — and it really is -DONEBIT_HRX=ON :86 then --target onebit :93 under ~/lb/thermal-run.sh … -j 4 :84/:93, no device claim
submodules: false :70 — the two gitlinks are checked out explicitly by the next step, so the build does not silently take whatever the runner's tree has

YAML parses, bash -n is not applicable (no inline script beyond the steps) and the job's steps are the four the body lists.

The finding — the proof has never run to completion, and that is the workflow's own doing:

gh run list --workflow hrx-build.yml
20:41:05 pull_request queued/            92e69892
20:35:52 pull_request completed/cancelled 01aaec12     (ran 20:35:52 -> cancelled 20:41:07)
20:27:36 pull_request completed/cancelled 05e5d40d
20:20:55 … 20:13:32 … 20:07:42 … all cancelled
20:07:13 pull_request queued/            3a0b8ef1     (#1289, the deliberate-break arm — queued 35+ min)

Every cancellation lands within seconds of the next main merge into the branch (01aaec12's run died at 20:41:07, the merge 92e69892 arrived 20:41:05). Tonight main moves every few minutes, and each move is a synchronize event on this PR, so the 20-minute build is cancelled before it can finish — which is why the body's Proof section is still the placeholder sentence. In this queue that is not a temporary inconvenience: the job is designed to cancel itself out of existence on any busy branch.

What that costs, and why I am not calling this a green gate: the PR's real deliverable is a check that goes red on a broken HRX build (#1289 exists to show that). Nobody has seen that red yet. If this merges and the check cannot complete on real PRs either, the repo gets a job that reads cancelled on every PR — the same shape as pr_agent tonight, which is exactly the "CI is red so ignore it" failure this PR is meant to remove. The fix is small and belongs in this PR: either drop cancel-in-progress for this workflow (a 20-minute self-hosted job on one runner is not worth cancelling), or key the group on head_sha so a run is cancelled only by a newer commit, not by a merge of main, or accept cancellation on synchronize but let a pull_request-labelled or workflow_dispatch run finish for the record. The cheapest that keeps the intent: cancel-in-progress: true but concurrency: hrx-build-<PR>-<head sha>.

Fixes #1077 is the right issue to close once a run has actually gone green and #1289's has gone red; until then the loop is open.

@bong-water-water-bong
bong-water-water-bong merged commit 46657d8 into main Nov 6, 2026
10 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the ci/hrx-pr-build branch November 6, 2026 20:53
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

1077 - Partially compliant

Compliant requirements:

  • The HRX backend is now compiled by a CI job at PR time
  • The build runs on every PR that changes an input of the HRX build
  • The build runs on the same runner as the hardware gate
  • The build uses read-only permissions and no secrets
  • The build persists the tree across runs
  • Documentation has been updated to reflect the new CI job and its purpose

Non-compliant requirements:

  • None

Requires further human verification:

  • None
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Missing Input Path for HRX Build

The workflow only triggers on changes to specific paths, but it does not include third_party/llama.cpp or third_party/hrx-system in the list of files that would cause a rebuild. This could lead to missed builds when these files are modified.

- third_party/llama.cpp
- third_party/hrx-system
- CMakeLists.txt
- cmake/hrx.cmake
- config/hrx-toolchain.config
- config/hrx-system-hold.config
- app/serve.cpp
- .github/workflows/hrx-build.yml

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: the HRX backend is compiled by no job at PR time - hw-gate is skipped on every PR, including both pin bumps

1 participant