# Test Roadmap

Tests planned for the [`test` command](test-command.md) that depend on hardware or
services not yet integrated. Each lands as a new subsystem/leaf in the existing
framework (profiles, baseline comparison, text report, Esc-cancel lock-out all
apply unchanged). **Status: planned — blocked on component.** When a component
lands, promote its entry into [test-command.md](test-command.md) and the taxonomy
table.

## 1. `env / *` — environmental sensing — *blocked on: DHT11*

The DHT11 (temperature + humidity) attaches to the Arduino/firmware side.

- **`env / dht11`** — _Healthy:_ sensor responds every read; temperature and
  humidity in plausible range; values update (not stuck). _Checks:_ issue the
  firmware read N times over a window; verify each returns a valid frame (DHT11
  checksum ok). _Metrics:_ temperature °C, relative humidity %, read-failure count,
  **dewpoint margin** (flag condensation risk when humidity is high and temperature
  is near the computed dewpoint — relevant for an outdoor tower enclosure).
  _Firmware:_ add a `READ DHT` command → `EN T <decideg> RH <deci%> OK|ERR` line
  (DHT11 is bit-banged; the firmware already owns timing-critical I/O). _Host:_ an
  `EnvReport` parser mirroring `DiagParser`; add `IEnvSource` if the IMU-style
  abstraction is wanted, else read over the motor serial link.

## 2. `comms / *` — message bus — *blocked on: RabbitMQ integration*

Validates the telemetry/control transport. Tests whichever `IControlChannel` is
active (MQTT today, RabbitMQ once integrated — see the MQTT→RabbitMQ migration in
[roadmap.md](roadmap.md)).

- **`comms / broker`** — _Healthy:_ broker reachable; auth succeeds; the expected
  exchange/queue (or MQTT topic tree) exists. _Checks:_ connect with configured
  credentials; assert connection within timeout; for RabbitMQ assert the
  exchange/queue topology is present. _Metrics:_ connect latency, auth ok,
  topology-present.
- **`comms / roundtrip`** — _Healthy:_ a published message returns to a subscriber
  promptly with no loss. _Checks:_ subscribe to a loopback/test topic (or a
  dedicated test queue), publish K sequenced messages, time each round-trip, detect
  gaps. _Metrics:_ mean/95th round-trip latency, loss %, out-of-order count. The
  message-bus analogue of `system/link`; for RabbitMQ also surface confirms/acks.

## 3. `camera / *` — imaging — *blocked on: RGB + thermal cameras on the rig*

One leaf per physical sensor; shares a common frame-quality core. Uses the existing
`ICameraSource`/`ImagePipeline`.

- **`camera / rgb`** — _Healthy:_ enumerates and connects; delivers frames at ~the
  configured rate; exposure/gain give a usable histogram (not clipped); few
  dead/hot pixels; frames sharp when focused; timestamps strictly increase; few
  dropped frames; JXL encode keeps up. _Checks:_ acquire a short burst; measure
  realized FPS vs configured, histogram clipping %, dead/hot-pixel count
  (dark/flat-field heuristic), a **sharpness/focus metric** (variance-of-Laplacian),
  timestamp monotonicity, dropped-frame count from sequence gaps, mean JXL encode
  time vs frame interval. _Metrics:_ realized FPS, exposure/histogram health,
  dead/hot-pixel count, focus score, dropped frames, encode throughput.
- **`camera / thermal`** — all of the above **plus** radiometric sanity:
  temperatures within expected range, NUC (non-uniformity correction) recent/valid,
  no excessive fixed-pattern noise. _Checks:_ as RGB, plus a flat-scene uniformity
  check and a temperature range/sanity check; verify NUC/shutter recency if exposed.
- _Shared:_ factor a `frameQualityMetrics(frame)` helper so both leaves (and future
  cameras) reuse the histogram/sharpness/dead-pixel code.

## 4. Deferred / needs additional hardware to measure

- **`gimbal / supply`** — supply-voltage sag during high-acceleration moves.
  _Blocked on:_ a voltage-sense path to the firmware (the TMC/board doesn't report
  bus voltage today). If added, the firmware reports it alongside the `LP` load
  capture; metric = min bus voltage under load vs nominal.

## Conventions for all roadmap tests

Same as the live suite: profiles carry per-metric thresholds + drift gates; results
go into the one text report with baseline/prev comparison; new firmware lines keep
the `OK`/`ERR` + 2-letter-prefix contract with a matching pure host parser and
`firmware/test/` coverage; new host-only sources (cameras, broker) need no firmware.
