# Real-server DNS restart comparison

Linux, server CLI surface, fresh data directory per commit, T3 Connect test stage, cloudflared 2026.10.4. No mocks or test-clock advancement.

For each checkout, install dependencies with `vp i`, load the provided test-stage environment, set `T3CODE_DEV_SEED=0`, then run:

```sh
node apps/server/src/bin.ts connect login --headless --base-dir "$DATA"
node apps/server/src/bin.ts connect link --headless --base-dir "$DATA"
cp /etc/resolv.conf "$RESOLVER"
sudo -n -E unshare -m --propagation private bash -c 'mount --bind "$RESOLVER" /etc/resolv.conf; exec node apps/server/src/bin.ts serve --host 127.0.0.1 --port "$PORT" --base-dir "$DATA"'
```

Export DATA, RESOLVER, and a distinct free PORT before running the namespace command. Complete headless login in the test-stage Clerk page. Confirm installation of the pinned real cloudflared. Wait for four registered tunnel connections and at least 35 seconds of connector uptime. Then run the same driver on each side:

```sh
sudo -n python3 record.py --data "$DATA" --resolver "$RESOLVER" --out "$CAPTURE" --side before --sha "$SHA"
```

The driver changes only the private mount's resolver to 192.0.2.1 and sends SIGTERM to the PID from the real app log. It records real log events and OS process exits for 235 seconds. Replacement connectors receive no signals and naturally exit after DNS discovery fails. Each run produced four ~50-second failing connector lifetimes, with no registrations by those connectors.

The public MP4s render this recorded log at its original timing, with the private source address redacted by render-redacted.py. They are log recordings, not screenshots of the web client. events.txt and events.ndjson contain the same captured events. No synthetic cloudflared messages were supplied to the app.

Base: b84f1019560cd1d646ff0f54be451b60668f1d30. Immediate restart gaps after failed discovery: 3, 4, 3, 2 milliseconds (log timestamps).

Head: 699f1385bf2eaf9663c201816bbe5bc51795eb67. Logged backoff: 1000, 2000, 4000, 8000 milliseconds; actual restart gaps approximately 1.01, 2.01, 4.02, 8.01 seconds.

Cleanup: restore the scratch resolver from /etc/resolv.conf, stop the server by its recorded PID, run `connect logout --base-dir "$DATA"` with test-stage environment to revoke each relay environment, and remove the scratch data and checkouts.
