Skip to content

Add full HIL bench controller (all 5 milestones)#1

Merged
daharoni merged 5 commits into
mainfrom
feat/full-build-out
Mar 9, 2026
Merged

Add full HIL bench controller (all 5 milestones)#1
daharoni merged 5 commits into
mainfrom
feat/full-build-out

Conversation

@daharoni

@daharoni daharoni commented Mar 9, 2026

Copy link
Copy Markdown
Member

Summary

  • M1 Skeleton & Bootstrap: Installable benchctl CLI with Click, Pydantic v2 config validation, structured logging, 7 idempotent Pi bootstrap scripts, udev rules, CI workflow (ruff + mypy + pytest on 3.11/3.12)
  • M2 Flash & Probe: benchctl flash with edbg and OpenOCD backends, firmware artifact resolution, subprocess-mocked tests for success/failure/timeout paths
  • M3 Serial & GPIO: benchctl serial listen|send|expect (pyserial), benchctl gpio set|get|pulse (libgpiod/gpiod), named pin resolution from config, stubbed relay module
  • M4 Health & CI: benchctl health with rich table + JSON output, checks for config/probe/serial/GPIO/runner, systemd timer for periodic health monitoring, example 2-job firmware CI workflow
  • M5 Docs & Polish: Quickstart, bench setup, wiring guide, and GitHub integration docs; dry-run support on all commands; multi-target --target selection

Verification

  • 54 tests pass (pytest -m "not hardware")
  • ruff check and ruff format --check clean
  • benchctl --help shows all subcommands
  • benchctl config validate --config configs/bench-config.example.yaml passes

Test plan

  • CI passes (ruff, mypy, pytest on Python 3.11 + 3.12)
  • pip install -e . succeeds; benchctl --help works
  • benchctl config validate --config configs/bench-config.example.yaml passes
  • benchctl flash --dry-run shows correct edbg command
  • benchctl gpio set --pin reset --value high --dry-run resolves named pin
  • benchctl serial expect --dry-run shows correct parameters
  • Bootstrap scripts are executable and idempotent (manual on Pi)
  • On real Pi + bench: flash, serial expect, GPIO, and health all work end-to-end

🤖 Generated with Claude Code

daharoni and others added 5 commits March 9, 2026 12:48
Implements the complete benchctl CLI tool for automated MCU firmware
testing on Raspberry Pi 5, from project skeleton through production
docs. Includes Pydantic v2 config, edbg/OpenOCD flash, pyserial
serial I/O, gpiod GPIO control, health checks, systemd timer,
idempotent Pi bootstrap scripts, CI workflow, and example firmware
repo workflow. All 54 tests pass, ruff + format clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mypy with --ignore-missing-imports doesn't need these since the
Protocol return type is satisfied structurally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix systemctl glob not expanding in check_runner_service (shell=True)
- Fix flash dry-run always printing edbg command regardless of probe type
- Extract _subprocess_ok and _run_flash helpers to deduplicate probe code
- Add describe_command to Probe protocol for dry-run support
- Replace json.loads(model_dump_json()) with model_dump(mode="json")
- Extract _require_configured guard in RelayController
- Remove TOCTOU existence check for absolute paths in artifacts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The systemd timer unit files existed but were never installed during
bootstrap, so health checks would not run after a reboot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@daharoni daharoni merged commit 5d45f24 into main Mar 9, 2026
2 checks passed
@daharoni daharoni deleted the feat/full-build-out branch March 9, 2026 21:07
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