Overview
Most failure tests for remote communications have been implemented. This issue tracks the remaining TODO tests that need to be fixed or completed.
Completed ✅
All remaining TODO tests have been fixed.
1. Transport layer race condition test
File: packages/ocap-kernel/src/remotes/platform/transport.test.ts:1219
Implemented in PR #788 (kernel incarnation detection protocol).
2. E2E connection failure recovery test
File: packages/nodejs/test/e2e/remote-comms.test.ts:267
Fixed by restructuring the test to queue the recovery message while the peer is down (triggering reconnection logic) rather than after the peer restarts.
Already Implemented ✅
The following failure scenarios are covered by existing tests:
Unit Tests (~3,500+ lines)
transport.test.ts: Rate limiting, connection limits, reconnection, stale peer cleanup
reconnection-lifecycle.test.ts: Backoff calculations, retry exhaustion, non-retryable errors
RemoteHandle.test.ts: ACK protocol, retransmission, crash recovery, queue limits
E2E Tests (~900 lines in remote-comms.test.ts)
- Kernel restart survival
- Reconnection with exponential backoff
- Connection to non-existent peer (graceful failure)
- Message queueing when offline
- Queue limit enforcement (MAX_QUEUE = 200)
- Multiple simultaneous peer reconnections
- Intentional disconnect handling
- Promise rejection on remote give-up
- Promise resolution after reconnection
- Connection failure and recovery (fixed)
Acceptance Criteria
Overview
Most failure tests for remote communications have been implemented. This issue tracks the remaining TODO tests that need to be fixed or completed.
Completed ✅
All remaining TODO tests have been fixed.
1. Transport layer race condition test
File:
packages/ocap-kernel/src/remotes/platform/transport.test.ts:1219Implemented in PR #788 (kernel incarnation detection protocol).
2. E2E connection failure recovery test
File:
packages/nodejs/test/e2e/remote-comms.test.ts:267Fixed by restructuring the test to queue the recovery message while the peer is down (triggering reconnection logic) rather than after the peer restarts.
Already Implemented ✅
The following failure scenarios are covered by existing tests:
Unit Tests (~3,500+ lines)
transport.test.ts: Rate limiting, connection limits, reconnection, stale peer cleanupreconnection-lifecycle.test.ts: Backoff calculations, retry exhaustion, non-retryable errorsRemoteHandle.test.ts: ACK protocol, retransmission, crash recovery, queue limitsE2E Tests (~900 lines in
remote-comms.test.ts)Acceptance Criteria