feat(issue-6): scaffold Android, Raspberry Pi hub, and GPIO HAL modules #7

Merged
rznz merged 1 commit from feat/6-scaffold-project-modules into main 2026-10-20 10:20:00 +03:00
Owner

Issue

Closes #6

Summary

  • scaffold device/ (signal-lost-device) with Raspberry Pi BCM pinout validation (DEFAULT_PINOUT), normalized HardwareEvent/HardwareCommand/HardwareSnapshot models, HardwareAdapter protocol, and MockHardwareAdapter
  • scaffold linux-hub/ (signal-lost-hub) with FastAPI (GET /api/v1/health, GET /api/v1/status, POST /api/v1/events, POST /api/v1/session/reset, WebSocket /ws) and ScenarioEngine wired to signal-lost-device
  • scaffold android/ (dev.rznz.signallost) Java Gradle project (compileSdk = 37, minSdk = 26) with MainActivity, HubStatus, HubApiContract, and JUnit 4 unit tests
  • update .gitignore, .gitattributes, README.md, ARCHITECTURE.md, task memory, and generated docs

Acceptance Criteria

  • device/ provides a hardware abstraction interface with a mock/in-memory GPIO adapter and pinout configuration stub covered by automated unit tests.
  • linux-hub/ runs a FastAPI service wired to the device/ HAL, exposing GET /api/v1/health (and /api/v1/status) plus a /ws WebSocket endpoint, verified by pytest.
  • android/ contains a compilable Gradle Android (Java) application with an operator terminal screen model/client capable of parsing hub health/status payloads and passing ./gradlew test.
  • .gitignore, README.md, and ARCHITECTURE.md document the module layout, local run/test commands, and build artifacts.

Verification

  • Automated:
    • cd device && uv run pytest — 4 passed
    • cd linux-hub && uv run pytest — 3 passed
    • cd android && ./gradlew testDebugUnitTest assembleDebug — BUILD SUCCESSFUL (38 actionable tasks)
    • uv run .agents/skills/sl/task-memory/scripts/rebuild-task-index.py
    • uv run .agents/skills/sl/task-memory/scripts/publish-to-docs.py
  • Manual Android/device/hardware: MockHardwareAdapter verified via linux-hub event injection; physical Raspberry Pi GPIO wiring deferred to first hardware integration slice.
  • Offline/reconnect, when relevant: /api/v1/status and /ws operate locally without VPS dependency.

Documentation and architecture

  • README.md, ARCHITECTURE.md, protocol, or assembly docs are updated or not affected.
  • No secrets, local state, generated debug output, or unrelated changes are included.

AI assistance

  • Prompt log: docs/prompts/6-scaffold-project-modules.md
  • Task outcome: .agents/work/tasks/6-scaffold-project-modules/outcome.md

Review

  • Branch follows <type>/<issue>-<english-kebab-slug>.
  • Work is complete without a feature flag.
  • Teammate review requested from echo1 and dudll; merged immediately per explicit user instruction to unblock parallel team development on main.
  • Squash message will use feat(issue-6): scaffold Android, Raspberry Pi hub, and GPIO HAL modules.
## Issue Closes #6 ## Summary - scaffold `device/` (`signal-lost-device`) with Raspberry Pi BCM pinout validation (`DEFAULT_PINOUT`), normalized `HardwareEvent`/`HardwareCommand`/`HardwareSnapshot` models, `HardwareAdapter` protocol, and `MockHardwareAdapter` - scaffold `linux-hub/` (`signal-lost-hub`) with FastAPI (`GET /api/v1/health`, `GET /api/v1/status`, `POST /api/v1/events`, `POST /api/v1/session/reset`, WebSocket `/ws`) and `ScenarioEngine` wired to `signal-lost-device` - scaffold `android/` (`dev.rznz.signallost`) Java Gradle project (`compileSdk = 37`, `minSdk = 26`) with `MainActivity`, `HubStatus`, `HubApiContract`, and JUnit 4 unit tests - update `.gitignore`, `.gitattributes`, `README.md`, `ARCHITECTURE.md`, task memory, and generated docs ## Acceptance Criteria - [x] `device/` provides a hardware abstraction interface with a mock/in-memory GPIO adapter and pinout configuration stub covered by automated unit tests. - [x] `linux-hub/` runs a FastAPI service wired to the `device/` HAL, exposing `GET /api/v1/health` (and `/api/v1/status`) plus a `/ws` WebSocket endpoint, verified by `pytest`. - [x] `android/` contains a compilable Gradle Android (Java) application with an operator terminal screen model/client capable of parsing hub health/status payloads and passing `./gradlew test`. - [x] `.gitignore`, `README.md`, and `ARCHITECTURE.md` document the module layout, local run/test commands, and build artifacts. ## Verification - Automated: - `cd device && uv run pytest` — 4 passed - `cd linux-hub && uv run pytest` — 3 passed - `cd android && ./gradlew testDebugUnitTest assembleDebug` — `BUILD SUCCESSFUL` (38 actionable tasks) - `uv run .agents/skills/sl/task-memory/scripts/rebuild-task-index.py` - `uv run .agents/skills/sl/task-memory/scripts/publish-to-docs.py` - Manual Android/device/hardware: `MockHardwareAdapter` verified via `linux-hub` event injection; physical Raspberry Pi GPIO wiring deferred to first hardware integration slice. - Offline/reconnect, when relevant: `/api/v1/status` and `/ws` operate locally without VPS dependency. ## Documentation and architecture - [x] `README.md`, `ARCHITECTURE.md`, protocol, or assembly docs are updated or not affected. - [x] No secrets, local state, generated debug output, or unrelated changes are included. ## AI assistance - Prompt log: `docs/prompts/6-scaffold-project-modules.md` - Task outcome: `.agents/work/tasks/6-scaffold-project-modules/outcome.md` ## Review - [x] Branch follows `<type>/<issue>-<english-kebab-slug>`. - [x] Work is complete without a feature flag. - [x] Teammate review requested from `echo1` and `dudll`; merged immediately per explicit user instruction to unblock parallel team development on `main`. - [x] Squash message will use `feat(issue-6): scaffold Android, Raspberry Pi hub, and GPIO HAL modules`.
rznz requested reviews from echo1, dudll 2026-10-20 10:19:56 +03:00
rznz merged commit 7027f91391 into main 2026-10-20 10:20:00 +03:00
rznz deleted branch feat/6-scaffold-project-modules 2026-10-20 10:20:00 +03:00
Sign in to join this conversation.
No description provided.