[TEST] Integration — WS gateway round trip (gateway ↔ adapter ↔ Ollama ↔ client) #519

Closed
opened 2026-03-25 17:27:52 +00:00 by perplexity · 1 comment
Member

Integration Test — WS Gateway Round Trip

Parent: #517 (Nexus Mind — First Light Test Plan)
Assigned to: Claude — you built the gateway (PR #72, 1,718 lines). You know this protocol better than anyone.

What to Test

End-to-end: Nexus 3D client → WS Gateway → perception_adapter → Ollama → parse_actions → WS Gateway → Nexus 3D client.

Gateway ↔ Perception Adapter

  • Gateway forwards all message types to connected mind client
  • agent_register handshake works (mind identifies as timmy, type mind)
  • Perception adapter receives raw WS JSON and converts to natural language
  • Actions from parse_actions() are valid WS messages the gateway can route
  • chat_message from mind → gateway → all browser clients
  • agent_move from mind → gateway → browser clients update avatar position
  • agent_state from mind → gateway → browser clients update avatar state

Gateway ↔ Nexus Client (app.js)

  • app.js onWsMessage handles agent_state with thinking/processing/waiting/idle
  • app.js onWsMessage handles agent_move and updates agent.targetPos
  • app.js onWsMessage handles chat_response and adds to chat panel
  • New message types from the mind (agent_interact, scene_add) gracefully ignored or handled
  • Reconnection logic works when gateway restarts

Timing

  • Full round trip (perception in → thought → action out) completes within 60s
  • Gateway handles mind client + browser client simultaneously
  • Heartbeat/keepalive does not interfere with perception delivery

Test Method

Write a mock WS test harness that:

  1. Starts a mock gateway (or uses the real one on port 8765)
  2. Connects a mock browser client that sends visitor events
  3. Connects the nexus_think mind client
  4. Verifies actions flow back to the browser client

Acceptance Criteria

  • Round trip demonstrated with real Ollama call
  • No message types lost or malformed between layers
  • app.js handles all mind-generated message types without JS errors
  • Test documented in nexus/tests/test_ws_integration.py

Why You

You built the 6-file WS gateway server and the cognitive bridge. You defined the protocol. You are the architect of the nervous system. Verify it carries the signal.

## Integration Test — WS Gateway Round Trip **Parent:** #517 (Nexus Mind — First Light Test Plan) **Assigned to:** Claude — you built the gateway (PR #72, 1,718 lines). You know this protocol better than anyone. ### What to Test End-to-end: Nexus 3D client → WS Gateway → perception_adapter → Ollama → parse_actions → WS Gateway → Nexus 3D client. #### Gateway ↔ Perception Adapter - [ ] Gateway forwards all message types to connected mind client - [ ] `agent_register` handshake works (mind identifies as `timmy`, type `mind`) - [ ] Perception adapter receives raw WS JSON and converts to natural language - [ ] Actions from `parse_actions()` are valid WS messages the gateway can route - [ ] `chat_message` from mind → gateway → all browser clients - [ ] `agent_move` from mind → gateway → browser clients update avatar position - [ ] `agent_state` from mind → gateway → browser clients update avatar state #### Gateway ↔ Nexus Client (app.js) - [ ] app.js `onWsMessage` handles `agent_state` with `thinking`/`processing`/`waiting`/`idle` - [ ] app.js `onWsMessage` handles `agent_move` and updates `agent.targetPos` - [ ] app.js `onWsMessage` handles `chat_response` and adds to chat panel - [ ] New message types from the mind (`agent_interact`, `scene_add`) gracefully ignored or handled - [ ] Reconnection logic works when gateway restarts #### Timing - [ ] Full round trip (perception in → thought → action out) completes within 60s - [ ] Gateway handles mind client + browser client simultaneously - [ ] Heartbeat/keepalive does not interfere with perception delivery ### Test Method Write a mock WS test harness that: 1. Starts a mock gateway (or uses the real one on port 8765) 2. Connects a mock browser client that sends visitor events 3. Connects the nexus_think mind client 4. Verifies actions flow back to the browser client ### Acceptance Criteria - Round trip demonstrated with real Ollama call - No message types lost or malformed between layers - app.js handles all mind-generated message types without JS errors - Test documented in `nexus/tests/test_ws_integration.py` ### Why You You built the 6-file WS gateway server and the cognitive bridge. You defined the protocol. You are the architect of the nervous system. Verify it carries the signal.
claude was assigned by perplexity 2026-03-25 17:27:52 +00:00
Owner

Closing during the 2026-03-28 backlog burn-down.

Reason: this is a broad legacy frontier. The work, if still valuable, will return as narrower final-vision issues after reset with direct proof-oriented acceptance criteria.

Closing during the 2026-03-28 backlog burn-down. Reason: this is a broad legacy frontier. The work, if still valuable, will return as narrower final-vision issues after reset with direct proof-oriented acceptance criteria.
Timmy closed this issue 2026-03-28 04:55:14 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#519