PR-02: pump actuator layer and board abstraction#7
Merged
Conversation
…onsole diagnostics - interfaces component (header-only, zero IDF deps): IActuator, IWaterPump (runFor/stop/update contract with StopReason), ITimeProvider - actuators component: WaterPump base holds ALL timing/safety logic (timed runs only, hard 300 s max-runtime enforced in update(), paired output transitions, runtime statistics) behind a single virtual applyOutput; GpioWaterPump (active-HIGH MOSFET, glitch-free off-first init, explicit error handling); EspTimeProvider; header-only test doubles - LockedWaterPump decorator serializes pump access between the console REPL task and the main update loop (review finding C1: unsynchronized state would allow a fresh start to be torn down by a concurrent poll) - app_main wires both pumps behind IWaterPump after the unchanged boot fail-safe; esp_console REPL (ws>) with pump start/stop/status for rig HIL - No indefinite runs: duration 0 and >300 s rejected (deliberate change vs Arduino uncapped manual runs, per parity checklist §4) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nity checks - status LED 2, manual button 5, config button 18 on both boards (rev2 provisional, TODO(SYNC1)) - preprocessor sanity block: pin distinctness and RS485 DE flag/macro iff-consistency fail the build instead of producing a wrong binary - firmware docs: pump layer, concurrency rule (LockedWaterPump), console diagnostics, host-test commands Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- separate IDF project firmware/test_apps/host (linux preview target, bundled Unity, exit code = failure count) - 10 tests against the REAL WaterPump logic via MockWaterPump + FakeTimeProvider: duration self-stop, forced 300 s stop with reason, rejections without state change, paired transitions, accumulated runtime, single-poll enforcement, LockedWaterPump delegation - CI: new host-test job (pinned action/IDF version); test failure fails the PR Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Spec, plan, research (6 decisions incl. verified linux-target host-test mechanism), data model, interface + serial-diagnostic contracts, quickstart, 22-task breakdown, HIL checklist for rig sign-off. .gitignore: checkpoint dialog docs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The esp-idf-ci-action defaults IDF_TARGET to esp32, which makes `idf.py --preview set-target linux` abort with "not consistent with target in the environment" (worked locally because the raw container has no IDF_TARGET set). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…HIL checklist Without ota_data_initial.bin at 0xd000 the artifact set was not the complete flash image idf.py produces. The HIL checklist gains a step-by-step esptool flashing guide (macOS, no ESP-IDF install needed) including the boot-banner verification step. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
HIL checklist executed on the rev1 bench rig (2026-06-12): all items pass.
Runner: Paul (project owner). This was the last open gate from Checkpoint 3 — merging. |
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
Phase 1 driver work per
docs/prd/PR-02-pump-gpio-board.md(spec-kit artifacts inspecs/002-pump-gpio-board/):WaterPumpbase (timed runs only, hard 300 s max-runtime enforced inupdate(), paired output transitions, runtime statistics, observable stop reasons) behind a single virtualapplyOutput;GpioWaterPump(active-HIGH MOSFET, glitch-free off-first init, explicit error handling). No indefinite runs — duration 0 / >300 s rejected (deliberate change vs Arduino's uncapped manual runs, parity checklist §4).LockedWaterPumpdecorator serializes access between theesp_consoleREPL task and the main update loop (caught in review as a real data race, fixed + re-reviewed CLEAN).ws>REPL withpump <plant|reservoir> start <s>|stop|status.TODO(SYNC1)), compile-time sanity checks (pin distinctness, DE flag/macro consistency) that fail the build instead of producing a wrong binary.Verification
CONFIG_BOARD_*assertedspecs/002-pump-gpio-board/checklists/hil.md) — Paul, before or after merge🤖 Generated with Claude Code