# Deterministic synthetic client path simulation

This is **synthetic model output, not measured roaming or multi-hop T2
performance**. The [default JSON trace](client-path-synthetic-default.json)
contains every generated client packet and is labeled `synthetic: true`.

Run the actual Go model used by the tests:

```sh
go run ./tools/clientpath-sim -seed 20261128 \
  -duration-us 2000000 -interval-us 10000 -handoff-at-us 1000000 \
  -roam-pause-us 80000 -hop-delay-us 1000 -jitter-us 100 \
  -capacity-mbps 1000 -queue-packets 64 -roam-buffer-packets 64 \
  -output /tmp/client-path.json
```

The model emits one 1500-byte packet every 10 ms for two seconds. Before the
handoff, packets use one synthetic wireless hop. During an assumed 80 ms
handoff pause, packets wait in a finite client buffer. Afterwards they use
two synthetic hops. Each hop has a finite FIFO, capacity-limited service,
1 ms nominal one-way delay and seeded ±0.1 ms propagation jitter. It does
not simulate QSDK association, RF attenuation, airtime, retransmissions,
roaming policy, or real client forwarding.

| Synthetic phase | Packets delivered | p50 model latency | p95 model latency |
| --- | ---: | ---: | ---: |
| One hop | 100/100 | 1.014 ms | 1.101 ms |
| Handoff buffer | 8/8 | 42.241 ms | 82.035 ms |
| Two hops | 92/92 | 2.032 ms | 2.144 ms |

Change `-capacity-mbps`, `-queue-packets`, or `-roam-buffer-packets` to make
queue or handoff drops visible. Reusing a seed and configuration reproduces
the same packet trace; changing the seed changes jitter. These values are
model assumptions. A physical client, a third router for a real two-hop
route, and synchronized source-bound packet capture are required to
calibrate or qualify field roaming and hop latency.
