---
id: connection-and-sync/007
title: The fault-injection harness and the soak
epic: connection-and-sync
state: done
priority: 2
blocked_by: []
estimate: M
created: 2026-08-18
updated: 2026-08-19
claimed_by: null
claimed_at: null
delivers: []
review_artifact: land-of-lor/docs/handoff/connection-and-sync/007-fault-harness-and-soak.md
---

## What to do

- `test/helpers/faultProxy.ts`: a TCP/WebSocket proxy between the real Godot client and the
  real director / world in tests, with knobs — drop client→server, drop server→client,
  blackhole both (half-open), delay, RST without a close frame — so 001–003's scenarios also
  run against the real server, not only the fake Area.
- `npm run soak` (opt-in, minutes): N headless clients walking, portal-hopping, being cut and
  restored by the proxy; asserts no client ends STALLED / DEAD without a report, positions
  converge, at most one body per account, presence settles to zero, no zombie peers, no Area
  shut down under a live peer.
- Cover the review's uncovered list: half-open self-takeover; kicks vs the Godot client;
  same-tick coalescing; the `NOT_HELLO` steady state; refcount leaks; director socket dying
  while playing; world exit with peers attached; control drop / snapshot wedge; portal limbo.
- `game/README.md`: the phone checklist (indicator, report, the exact APK-then-browser repro).

## Definition of done

The proxy-backed tests and the soak are green in `npm test` / `npm run soak`; the checklist is
in the README.

## Where the work lands

`land-of-lor/game/director/test/`, `game/README.md`.