Fix 5 HIL CI issues found during real-world bench setup#3
Merged
Conversation
Read the GitHub org from config instead of hardcoding in install_runner.sh. Defaults to "Aharoni-Lab" for backwards compat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… writes .env - Read runner.org and runner.labels from config via venv Python instead of hardcoding ORG and using tr to split bench name into labels - Always append bench_name to labels if not already present - mkdir -p /opt/hil-bench/_work to avoid permission errors - Write .env with venv on PATH so benchctl is available in runner jobs - Pass config path from bootstrap_pi.sh Fixes: runner label mangling, benchctl not found, workdir missing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add repeatable --check option to run a subset of health checks. Valid categories: config, probe, serial, gpio_chip, runner_service. When omitted, all checks run (existing behavior). This allows CI workflows to skip checks that require hardware not available in all contexts (e.g. serial device). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GitHub Actions downloads artifacts into the job's working directory, not the runner workspace. Try CWD first, then fall back to workspace. Glob resolution follows the same order. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Idempotent script to run after git pull: 1. pip install -e to update benchctl 2. Ensure work directory exists 3. Refresh runner .env (if installed) 4. Refresh systemd health timer Does NOT touch config or runner registration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Simplify runs-on to use bench_name label (added automatically by runner) - Add benchctl health --check config --check probe step before flashing - Update concurrency group to be repo+ref scoped - Add comment explaining bench_name as concurrency key Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Merge two Python subprocess calls in install_runner.sh into one - Extract duplicated .env heredoc into shared write_runner_env.sh - Cache Path.cwd() in resolve_firmware_path instead of calling 3x - Derive CHECK_CATEGORIES from _CHECK_RUNNERS keys to prevent divergence - Replace dict[str, Any] with proper Callable type for _CHECK_RUNNERS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Take main's bootstrap_pi.sh and install_runner.sh (org is a required CLI argument, non-root runner support via SUDO_USER). Remove the now-unused RunnerConfig.org field, config template entry, and test fixture reference. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Fixes 5 issues discovered while setting up HIL CI on the Pi for miniscope-firmware, plus adds an update mechanism.
install_runner.shusedtr '-' ','which splithil-bench-01intohil,bench,01— now reads labels from config and always includesbench_namebenchctlnot found in CI: Runner.envdidn't have venv on PATH — now written by sharedwrite_runner_env.sh/opt/hil-bench/_workwas never created — nowmkdir -pininstall_runner.shbenchctl healthfails on missing serial: Added--check / -crepeatable option to run a subset of checks (e.g.--check config --check probe)benchctl flashcan't find artifact: Relative paths resolved against workspace only — now tries CWD first (where GHA downloads artifacts)bootstrap/update.shfor lightweightgit pull+ update flowruns-onlabels, added health check step, better concurrency groupTest plan
pytest -vpasses in Linux CI (gpiod is Linux-only)git pull && sudo ./bootstrap/update.shbenchctl health --check config --check probepasses (serial skipped)benchctl flash --firmware /tmp/test.elf --target grand_central_m4 --verifyworks if .elf available🤖 Generated with Claude Code