Skip to content

Commit 7fac362

Browse files
committed
test(gateway): cover node control plane
1 parent 7939a39 commit 7fac362

4 files changed

Lines changed: 1105 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
title: Gateway node control plane
2+
3+
scenario:
4+
id: gateway-node-control-plane
5+
surface: gateway
6+
category: gateway.nodes-and-remote-capabilities
7+
coverage:
8+
primary:
9+
- gateway.node-presence
10+
- gateway.node-capabilities
11+
- gateway.node-inventory
12+
- gateway.node-actions
13+
- gateway.node-events
14+
- gateway.remote-device-capabilities
15+
objective: Verify a real authenticated Gateway pairs and operates a remote device through the node WebSocket control plane.
16+
successCriteria:
17+
- A real child Gateway accepts an authenticated operator and pairs an isolated iOS node identity over WebSocket.
18+
- Approved reconnect declarations appear in node.list and node.describe with the effective capabilities, commands, permissions, name, platform, and connected state.
19+
- Exact camera.list and location.get requests and results cross the same node.invoke and node.invoke.result socket boundary.
20+
- A node.presence.alive event is persisted and becomes visible through both node.list and node.describe.
21+
docsRefs:
22+
- docs/gateway/protocol.md
23+
- docs/nodes/index.md
24+
codeRefs:
25+
- src/gateway/server-methods/nodes.read.ts
26+
- src/gateway/server-methods/nodes.invoke.ts
27+
- src/gateway/server-methods/nodes.event.ts
28+
- test/e2e/qa-lab/runtime/gateway-node-control-plane.e2e.test.ts
29+
execution:
30+
kind: vitest
31+
path: test/e2e/qa-lab/runtime/gateway-node-control-plane.e2e.test.ts
32+
summary: Start a real child Gateway, pair an iOS node WebSocket, inspect inventory and declarations, invoke camera and location commands, and persist node presence.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
title: Gateway node pending work
2+
3+
scenario:
4+
id: gateway-node-pending-work
5+
surface: gateway
6+
category: gateway.nodes-and-remote-capabilities
7+
coverage:
8+
primary:
9+
- gateway.pending-work-delivery
10+
objective: Verify both Gateway node pending-work queues survive same-pairing reconnects and expose explicit delivery outcomes.
11+
successCriteria:
12+
- An operator queues explicit work for a paired disconnected node with wake disabled.
13+
- The same node identity reconnects and drains the explicit work plus the baseline status request.
14+
- An iPadOS camera command rejected as background-unavailable becomes a pullable pending action with the original command, parameters, and action id.
15+
- A same-pairing foreground reconnect pulls and acknowledges the action, after which the queue is empty.
16+
docsRefs:
17+
- docs/gateway/protocol.md
18+
- docs/nodes/camera.md
19+
codeRefs:
20+
- src/gateway/server-methods/nodes-pending.ts
21+
- src/gateway/server-methods/nodes.invoke.ts
22+
- src/gateway/server-methods/nodes.pending.ts
23+
- test/e2e/qa-lab/runtime/gateway-node-pending-work.e2e.test.ts
24+
execution:
25+
kind: vitest
26+
path: test/e2e/qa-lab/runtime/gateway-node-pending-work.e2e.test.ts
27+
summary: Start a real child Gateway and prove disconnected enqueue/drain plus foreground-only pull/ack across same-pairing reconnects.

0 commit comments

Comments
 (0)