# S4: Download headers timeout

Service harness, not a live update. The same runtime-driver.mjs invokes the real ServerSelfUpdate.make and pinned-runtime implementation from each checkout, with a synthetic HttpClient and a launcher that must never be called. Node v26.12.1 on Linux x64; no viewport or theme. Effect TestClock starts at 0 ms independently for each fixture.

Sequence on both sides: 0 ms start request and hold headers; advance to 59,000 ms and confirm still pending; advance to 60,000 ms; observe request interruption, failure, cleanup, and no handoff. Virtual time is explicitly advanced, not a wall-clock measurement.

## Before

Revision: [4c361199f4](https://git.cafe/pingdotgg/t3code/commit/4c361199f47f6ea32a2c14835df392640d0f7c63)

```jsonl
{"virtualMs": 0, "event": "update-start", "targetVersion": "1.1.0", "clock": "Effect TestClock; starts at 0; real service implementation"}
{"virtualMs": 0, "event": "progress", "stage": "downloading"}
{"virtualMs": 0, "event": "request-start", "asset": "SHA256SUMS", "url": "https://github.com/pingdotgg/t3code/releases/download/v1.1.0/SHA256SUMS"}
{"virtualMs": 0, "event": "headers-stalled", "finished": false}
{"virtualMs": 59000, "event": "clock-advanced-59s", "finished": false}
{"virtualMs": 60000, "event": "request-cancelled-on-timeout"}
{"virtualMs": 60000, "event": "update-failed", "reason": "Could not prepare t3@1.1.0.", "message": "Server update failed: Could not prepare t3@1.1.0.", "causeStep": "downloading the t3 release checksums (timed out)"}
{"virtualMs": 60000, "event": "cleanup-and-handoff", "stagingAndVersions": [], "processCalls": 0, "launcherCalls": 0}
```

## After

Revision: [53d9b7c289](https://git.cafe/pingdotgg/t3code/commit/53d9b7c2892601b6b9999f97f2db5b3cbf272746)

```jsonl
{"virtualMs": 0, "event": "update-start", "targetVersion": "1.1.0", "clock": "Effect TestClock; starts at 0; real service implementation"}
{"virtualMs": 0, "event": "progress", "stage": "downloading"}
{"virtualMs": 0, "event": "request-start", "asset": "SHA256SUMS", "url": "https://github.com/pingdotgg/t3code/releases/download/v1.1.0/SHA256SUMS"}
{"virtualMs": 0, "event": "headers-stalled", "finished": false}
{"virtualMs": 59000, "event": "clock-advanced-59s", "finished": false}
{"virtualMs": 60000, "event": "request-cancelled-on-timeout"}
{"virtualMs": 60000, "event": "update-failed", "reason": "Could not prepare t3@1.1.0 while downloading the t3 release checksums (timed out) (from github.com).", "message": "Server update failed: Could not prepare t3@1.1.0 while downloading the t3 release checksums (timed out) (from github.com).", "causeStep": "downloading the t3 release checksums (timed out)", "downloadHost": "github.com"}
{"virtualMs": 60000, "event": "cleanup-and-handoff", "stagingAndVersions": [], "processCalls": 0, "launcherCalls": 0}
```

AI-assisted; verified with the tests and tools listed above.
