EVENT MATRIX
Event matrix
The integration gate: prove every event family reaches Relay through relay-pubsub.
← Docs hub · Requires relay-pubsub with RELAY_BACKEND=relay-events
Run it¶
BASE=https://<relay-host>:8443 \ # or :18080; remote host — not 127.0.0.1 from your laptop
GATEWAY=https://<gateway-host>:8081 \
EDGE=https://<edge-host>:18086 \
./scripts/e2e-events-matrix.sh
The script prints a pass/fail table. Non-zero exit if any row fails.
Direct Relay (no pubsub): use scripts/e2e-direct-relay.sh — expanded scenario matrix via POST /v1/events. See config/lab-direct.env.example.
Latest verification: TEST_RESULTS.md — 2026-08-29: labs 212 + 175 gateway PASS (farm Act included).
If Farm Act fails with TLS unknown authority, run lab-wire-relay-act.sh then re-sync pubsub JWT.
What it checks¶
| Section | Source | Gate |
|---|---|---|
| A. Farm | Gateway REST (fasal-catalog-smoke) | 10× Accept; 5× critical Act |
| B. Firewater | Edge scenarios + publish:true |
New event in Relay |
| C. Remote edge | Edge scenarios + publish:true |
New event in Relay |
| D. Fleet | Edge scenarios + publish:true |
New event in Relay |
Smoke scripts alone (smoke.sh, smoke-firewater.sh, smoke-remote-edge.sh, smoke-fleet.sh) do not replace this matrix for pubsub integration. CI runs those smokes against a mock Relay; this matrix needs a live stack.
A. Farm catalog¶
| Event type | Severity | Command | Expected policy |
|---|---|---|---|
irrigation.required |
critical | irrigation.start |
pol_critical_farm + Act |
soil.moisture.critical |
critical | irrigation.start |
Act |
fertigation.required |
critical | fertigation.start |
Act |
disease.risk.critical |
critical | inspection.create |
Act |
device.control.required |
critical | pump.start |
Act |
crop.advisory |
info | — | pol_advisory, notify only |
weather.advisory |
info | — | notify only |
spray.advisory |
info | — | notify only |
frost.alert |
info | — | notify only |
pest.advisory |
info | — | notify only |
Act wiring checklist
RELAY_ACTION_TARGETS=…=https://<pubsub-host>:8081/v1/actionson Relay (127.0.0.1only if pubsub is co-located)PUBSUB_TLS_SANincludes every name/IP Relay uses to call pubsub- Relay outbound:
RELAY_TLS_INSECURE=1or trust gateway CA - Successful Act shows
provider_idprefixrpg_
B. Firewater / edge¶
Prerequisite: POST /v1/firewater/seed + POST /v1/firewater/config {"publish":true}
Remote-edge and fleet sections also require firewater seed (shared season_fw_watch).
| Scenario | Event type |
|---|---|
lowtank |
firewater.tank.low |
fire |
firewater.demand.active |
comms |
edge.comms.down |
vision |
edge.vision.fire |
gas |
edge.gas.alarm |
Full catalog: all firewater.*, edge.*, telemetry.sample — see Simulators.
C. Remote edge¶
Prerequisite: POST /v1/remote-edge/config {"publish": true}
| Scenario | Event type |
|---|---|
sat_down |
remote-edge.link.starlink.degraded |
offline |
remote-edge.link.offline |
gpu_hot |
remote-edge.galleon.thermal |
intrusion |
remote-edge.vision.intrusion |
flood |
remote-edge.iot.flood |
drone_patrol |
remote-edge.uav.rtb |
Also covered by gateway matrix: six remote-edge event types including drone_patrol.
D. Fleet¶
Prerequisite: POST /v1/fleet/config {"publish": true}
| Scenario | Event type |
|---|---|
blackout |
fleet.power.island |
amr_lost |
fleet.robot.lost |
ot_storm |
fleet.ot.ids |
spill |
fleet.env.exceedance |
heatwave |
fleet.dc.thermal |
intrusion |
fleet.access.fault |
Status snapshot¶
Lab verification 2026-08-29:
| Family | Accept | Act |
|---|---|---|
| Farm advisory (5) | ✅ | n/a |
| Farm critical (5) | ✅ | ✅ rpg_* after Act wiring |
| Firewater / edge | ✅ | — |
Remote edge (6, incl. drone_patrol) |
✅ | — |
| Fleet | ✅ | — |
| Direct Relay matrix | ✅ | n/a (Accept only) |
| k8s stack e2e | ✅ | relay-events publish verified |
relay-pubsub pre-registers 40 topics¶
At startup, relay-pubsub registers farm + edge + remote-edge + fleet catalogs for admin visibility. Publish works for any topic name regardless — see relay-pubsub docs.