# C2-C3 before runtime recording

Revision: [53bcb9af7a](https://git.cafe/pingdotgg/t3code/commit/53bcb9af7a37dd0b4df11a7d6fa0106e9e5b7356)

Environment: Linux-6.1.102-x86_64-with-glibc2.39, Node v26.13.0. Production-runtime harness, synthetic config and stub connector. Real CloudManagedEndpointRuntime and Node spawner (passive exit-result observer). Not a real Cloudflare tunnel.

A/B: NodeRuntime.runMain, group signal. C2/C3: Effect.runPromise host intentionally survives parent-only OS signals, explicit runtime scope closure.

Stub registration is an age-based model only: <2000ms stop takes 2300ms, otherwise 15ms. “past-registering-window” is synthetic, never Cloudflare readiness. Runner gates use events, not guessed readiness sleeps. The predecessor/backoff/stub timers are deliberate fixture behavior.

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

## Measured result

```json
{
  "row": "C2-C3",
  "side": "before",
  "sha": "53bcb9af7a37dd0b4df11a7d6fa0106e9e5b7356",
  "stopMs": null,
  "failure": null,
  "output": "/tmp/lead-33628-r1/capture-1/C2-C3-before-20261110T013024.256893Z",
  "scriptSha256": {
    "driver.ts": "ec3fc57d6aae729c9d28d06370977a052e66acf71e633e9786dd552b091ee423",
    "cloudflared-stub.sh": "d6bece305c6bdc22b6b9511fc2e5210801777f54445f659e9d242f1732ad5f99",
    "cloudflared-stub.mjs": "4f0cb55a5a434d6a0c2148455c58683eba0f8d81993785ff34ffca3503e780df",
    "runner.py": "88a0c74d1385c4454291076b74a7c8a8ba4ab4a7ec06e337be788f5d23c5c402",
    "run.sh": "dc4d7379c91708d38ae3a6d3db279e254b71ad67901cd3e703addc66248fd879"
  },
  "recoveryRequests": [
    {
      "timestamp": "2026-11-10T01:30:32.398Z",
      "source": "driver",
      "event": "recovery-request",
      "phase": "C3-fresh",
      "count": 1,
      "config": {
        "providerKind": "cloudflare_tunnel",
        "connectorToken": "synthetic-token",
        "tunnelId": "tunnel-1"
      }
    }
  ],
  "listeners": [
    {
      "timestamp": "2026-11-10T01:30:25.783Z",
      "source": "driver",
      "event": "listeners",
      "phase": "before-build",
      "identities": {
        "SIGINT": [
          1
        ],
        "SIGTERM": [
          2
        ]
      },
      "counts": {
        "SIGINT": 1,
        "SIGTERM": 1
      },
      "baselineRestored": true
    },
    {
      "timestamp": "2026-11-10T01:30:25.829Z",
      "source": "driver",
      "event": "listeners",
      "phase": "C2-no-signal:after-build",
      "identities": {
        "SIGINT": [
          1
        ],
        "SIGTERM": [
          2
        ]
      },
      "counts": {
        "SIGINT": 1,
        "SIGTERM": 1
      },
      "baselineRestored": true
    },
    {
      "timestamp": "2026-11-10T01:30:28.034Z",
      "source": "driver",
      "event": "listeners",
      "phase": "C2-no-signal:after-close",
      "identities": {
        "SIGINT": [
          1
        ],
        "SIGTERM": [
          2
        ]
      },
      "counts": {
        "SIGINT": 1,
        "SIGTERM": 1
      },
      "baselineRestored": true
    },
    {
      "timestamp": "2026-11-10T01:30:28.039Z",
      "source": "driver",
      "event": "listeners",
      "phase": "C3-signalled:after-build",
      "identities": {
        "SIGINT": [
          1
        ],
        "SIGTERM": [
          2
        ]
      },
      "counts": {
        "SIGINT": 1,
        "SIGTERM": 1
      },
      "baselineRestored": true
    },
    {
      "timestamp": "2026-11-10T01:30:30.220Z",
      "source": "driver",
      "event": "listeners",
      "phase": "C3-signalled:after-close",
      "identities": {
        "SIGINT": [
          1
        ],
        "SIGTERM": [
          2
        ]
      },
      "counts": {
        "SIGINT": 1,
        "SIGTERM": 1
      },
      "baselineRestored": true
    },
    {
      "timestamp": "2026-11-10T01:30:30.223Z",
      "source": "driver",
      "event": "listeners",
      "phase": "C3-fresh:after-build",
      "identities": {
        "SIGINT": [
          1
        ],
        "SIGTERM": [
          2
        ]
      },
      "counts": {
        "SIGINT": 1,
        "SIGTERM": 1
      },
      "baselineRestored": true
    },
    {
      "timestamp": "2026-11-10T01:30:34.566Z",
      "source": "driver",
      "event": "listeners",
      "phase": "C3-fresh:after-close",
      "identities": {
        "SIGINT": [
          1
        ],
        "SIGTERM": [
          2
        ]
      },
      "counts": {
        "SIGINT": 1,
        "SIGTERM": 1
      },
      "baselineRestored": true
    }
  ],
  "scopeStops": [
    {
      "timestamp": "2026-11-10T01:30:28.034Z",
      "source": "driver",
      "event": "explicit-scope-close-end",
      "phase": "C2-no-signal",
      "stopMs": 43,
      "signals": 0,
      "recoveryCount": 0
    },
    {
      "timestamp": "2026-11-10T01:30:30.219Z",
      "source": "driver",
      "event": "explicit-scope-close-end",
      "phase": "C3-signalled",
      "stopMs": 25,
      "signals": 2,
      "recoveryCount": 0
    },
    {
      "timestamp": "2026-11-10T01:30:34.566Z",
      "source": "driver",
      "event": "explicit-scope-close-end",
      "phase": "C3-fresh",
      "stopMs": 26,
      "signals": 2,
      "recoveryCount": 1
    }
  ],
  "relayCounts": {
    "Relay client process started; waiting for tunnel connection": 4,
    "Relay client exited; restarting": 1,
    "Relay client stopped": 4,
    "Relay client is crash-looping; delaying restart": 0
  },
  "exitResults": [
    {
      "timestamp": "2026-11-10T01:30:32.386Z",
      "source": "driver",
      "event": "child-exit-observed",
      "pid": 1534992,
      "exitCode": 1
    }
  ]
}
```

## Runner milestones

```text
{"timestamp": "2026-11-10T01:30:24.272+00:00", "source": "runner", "event": "environment", "row": "C2-C3", "side": "before", "sha": "53bcb9af7a37dd0b4df11a7d6fa0106e9e5b7356", "os": "Linux-6.1.102-x86_64-with-glibc2.39", "node": "v26.13.0", "harness": "real CloudManagedEndpointRuntime + real Node spawner with passive exit observer + stub cloudflared; not a real Cloudflare tunnel", "attribution": "AI-assisted; verified with the tests and tools listed above.", "slowMs": 0}
{"timestamp": "2026-11-10T01:30:24.273+00:00", "source": "runner", "event": "spawned-driver", "pid": 1534690, "pgid": 1534690}
{"timestamp": "2026-11-10T01:30:25.844+00:00", "source": "runner", "event": "gate-satisfied", "gate": "C2-no-signal runtime built", "observed": {"timestamp": "2026-11-10T01:30:25.844Z", "source": "driver", "event": "phase-ready", "phase": "C2-no-signal"}}
{"timestamp": "2026-11-10T01:30:27.990+00:00", "source": "runner", "event": "gate-satisfied", "gate": "C2-no-signal original beyond synthetic registering window", "observed": {"timestamp": "2026-11-10T01:30:27.989Z", "source": "stub", "event": "file-line", "line": "{\"timestamp\":\"2026-11-10T01:30:27.988Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1534952,\"attempt\":1,\"ageMs\":2102,\"syntheticOnly\":true}", "record": {"timestamp": "2026-11-10T01:30:27.988Z", "source": "stub", "event": "past-registering-window", "pid": 1534952, "attempt": 1, "ageMs": 2102, "syntheticOnly": true}}}
{"timestamp": "2026-11-10T01:30:27.990+00:00", "source": "runner", "event": "send-driver-command", "command": "close:C2-no-signal"}
{"timestamp": "2026-11-10T01:30:28.034+00:00", "source": "runner", "event": "gate-satisfied", "gate": "C2-no-signal explicitly closed", "observed": {"timestamp": "2026-11-10T01:30:28.034Z", "source": "driver", "event": "phase-closed", "phase": "C2-no-signal"}}
{"timestamp": "2026-11-10T01:30:28.049+00:00", "source": "runner", "event": "gate-satisfied", "gate": "C3-signalled runtime built", "observed": {"timestamp": "2026-11-10T01:30:28.049Z", "source": "driver", "event": "phase-ready", "phase": "C3-signalled"}}
{"timestamp": "2026-11-10T01:30:30.193+00:00", "source": "runner", "event": "gate-satisfied", "gate": "C3-signalled original beyond synthetic registering window", "observed": {"timestamp": "2026-11-10T01:30:30.192Z", "source": "stub", "event": "file-line", "line": "{\"timestamp\":\"2026-11-10T01:30:30.192Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1534960,\"attempt\":2,\"ageMs\":2103,\"syntheticOnly\":true}", "record": {"timestamp": "2026-11-10T01:30:30.192Z", "source": "stub", "event": "past-registering-window", "pid": 1534960, "attempt": 2, "ageMs": 2103, "syntheticOnly": true}}}
{"timestamp": "2026-11-10T01:30:30.193+00:00", "source": "runner", "event": "send-parent-only-signal", "pid": 1534690, "signal": "SIGINT"}
{"timestamp": "2026-11-10T01:30:30.193+00:00", "source": "runner", "event": "gate-satisfied", "gate": "host receipt of SIGINT", "observed": {"timestamp": "2026-11-10T01:30:30.193Z", "source": "driver", "event": "host-signal-received", "signal": "SIGINT", "signals": 1}}
{"timestamp": "2026-11-10T01:30:30.193+00:00", "source": "runner", "event": "send-parent-only-signal", "pid": 1534690, "signal": "SIGTERM"}
{"timestamp": "2026-11-10T01:30:30.193+00:00", "source": "runner", "event": "gate-satisfied", "gate": "host receipt of SIGTERM", "observed": {"timestamp": "2026-11-10T01:30:30.193Z", "source": "driver", "event": "host-signal-received", "signal": "SIGTERM", "signals": 2}}
{"timestamp": "2026-11-10T01:30:30.194+00:00", "source": "runner", "event": "host-survived-both-signals", "explanation": "Effect.runPromise lifecycle host intentionally keeps running; not NodeRuntime signal shutdown"}
{"timestamp": "2026-11-10T01:30:30.194+00:00", "source": "runner", "event": "send-driver-command", "command": "close:C3-signalled"}
{"timestamp": "2026-11-10T01:30:30.220+00:00", "source": "runner", "event": "gate-satisfied", "gate": "C3-signalled explicitly closed", "observed": {"timestamp": "2026-11-10T01:30:30.220Z", "source": "driver", "event": "phase-closed", "phase": "C3-signalled"}}
{"timestamp": "2026-11-10T01:30:30.229+00:00", "source": "runner", "event": "gate-satisfied", "gate": "C3-fresh runtime built", "observed": {"timestamp": "2026-11-10T01:30:30.229Z", "source": "driver", "event": "phase-ready", "phase": "C3-fresh"}}
{"timestamp": "2026-11-10T01:30:32.374+00:00", "source": "runner", "event": "gate-satisfied", "gate": "C3-fresh original beyond synthetic registering window", "observed": {"timestamp": "2026-11-10T01:30:32.374Z", "source": "stub", "event": "file-line", "line": "{\"timestamp\":\"2026-11-10T01:30:32.374Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1534992,\"attempt\":3,\"ageMs\":2104,\"syntheticOnly\":true}", "record": {"timestamp": "2026-11-10T01:30:32.374Z", "source": "stub", "event": "past-registering-window", "pid": 1534992, "attempt": 3, "ageMs": 2104, "syntheticOnly": true}}}
{"timestamp": "2026-11-10T01:30:32.375+00:00", "source": "runner", "event": "gate-satisfied", "gate": "stub attempt 3 started", "observed": {"timestamp": "2026-11-10T01:30:30.271Z", "source": "stub", "event": "file-line", "line": "{\"timestamp\":\"2026-11-10T01:30:30.271Z\",\"source\":\"stub\",\"event\":\"started\",\"pid\":1534992,\"attempt\":3,\"ageMs\":1}", "record": {"timestamp": "2026-11-10T01:30:30.271Z", "source": "stub", "event": "started", "pid": 1534992, "attempt": 3, "ageMs": 1}}}
{"timestamp": "2026-11-10T01:30:32.375+00:00", "source": "runner", "event": "send-child-only-signal", "pid": 1534992, "signal": "SIGUSR1", "purpose": "controlled nonzero exit 1, no server signal"}
{"timestamp": "2026-11-10T01:30:32.398+00:00", "source": "runner", "event": "gate-satisfied", "gate": "fresh runtime ordinary crash recovery after previous layer was signalled and closed", "observed": {"timestamp": "2026-11-10T01:30:32.398Z", "source": "driver", "event": "recovery-request", "phase": "C3-fresh", "count": 1, "config": {"providerKind": "cloudflare_tunnel", "connectorToken": "synthetic-token", "tunnelId": "tunnel-1"}}}
{"timestamp": "2026-11-10T01:30:34.539+00:00", "source": "runner", "event": "gate-satisfied", "gate": "fresh runtime replacement observed", "observed": {"timestamp": "2026-11-10T01:30:34.539Z", "source": "stub", "event": "file-line", "line": "{\"timestamp\":\"2026-11-10T01:30:34.538Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1535020,\"attempt\":4,\"ageMs\":2102,\"syntheticOnly\":true}", "record": {"timestamp": "2026-11-10T01:30:34.538Z", "source": "stub", "event": "past-registering-window", "pid": 1535020, "attempt": 4, "ageMs": 2102, "syntheticOnly": true}}}
{"timestamp": "2026-11-10T01:30:34.540+00:00", "source": "runner", "event": "send-driver-command", "command": "close:C3-fresh"}
{"timestamp": "2026-11-10T01:30:34.566+00:00", "source": "runner", "event": "gate-satisfied", "gate": "C3-fresh explicitly closed", "observed": {"timestamp": "2026-11-10T01:30:34.566Z", "source": "driver", "event": "phase-closed", "phase": "C3-fresh"}}
{"timestamp": "2026-11-10T01:30:34.566+00:00", "source": "runner", "event": "gate-satisfied", "gate": "all lifecycle phases complete", "observed": {"timestamp": "2026-11-10T01:30:34.566Z", "source": "driver", "event": "lifecycle-complete", "recoveryCount": 1, "signals": 2}}
{"timestamp": "2026-11-10T01:30:34.613+00:00", "source": "runner", "event": "lifecycle-host-stopped", "returncode": 0}
{"timestamp": "2026-11-10T01:30:34.622+00:00", "source": "runner", "event": "tracked-process-group-cleanup", "members": []}
```

## Driver and forwarded timestamped relay/stub events

```text
{"timestamp":"2026-11-10T01:30:25.781Z","source":"driver","event":"actual-node-version","node":"v26.13.0","executable":"/home/ubuntu/.local/share/vite-plus/js_runtime/node/26.13.0/bin/node"}
{"timestamp":"2026-11-10T01:30:25.783Z","source":"driver","event":"listeners","phase":"before-build","identities":{"SIGINT":[1],"SIGTERM":[2]},"counts":{"SIGINT":1,"SIGTERM":1},"baselineRestored":true}
{"timestamp":"2026-11-10T01:30:25.829Z","source":"driver","event":"listeners","phase":"C2-no-signal:after-build","identities":{"SIGINT":[1],"SIGTERM":[2]},"counts":{"SIGINT":1,"SIGTERM":1},"baselineRestored":true}
{"timestamp":"2026-11-10T01:30:25.841Z","source":"driver","event":"real-child-spawned","pid":1534952}
[01:30:25.841] INFO (#1): Relay client process started; waiting for tunnel connection {
  pid: 1534952,
  source: 'path',
  version: '2026.10.4',
  protocol: 'auto',
  tunnelId: 'tunnel-1',
  tunnelName: undefined
}
{"timestamp":"2026-11-10T01:30:25.844Z","source":"driver","event":"connector-applied","phase":"C2-no-signal","status":{"status":"running","providerKind":"cloudflare_tunnel","pid":1534952,"tunnelId":"tunnel-1"}}
{"timestamp":"2026-11-10T01:30:25.844Z","source":"driver","event":"phase-ready","phase":"C2-no-signal"}
{"timestamp":"2026-11-10T01:30:25.848Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client process started; waiting for tunnel connection\",{\"pid\":1534952,\"source\":\"path\",\"version\":\"2026.10.4\",\"protocol\":\"auto\",\"tunnelId\":\"tunnel-1\"}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:25.841Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#1\"}"}
{"timestamp":"2026-11-10T01:30:25.887Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:25.886Z\",\"source\":\"stub\",\"event\":\"started\",\"pid\":1534952,\"attempt\":1,\"ageMs\":1}"}
{"timestamp":"2026-11-10T01:30:27.989Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:27.988Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1534952,\"attempt\":1,\"ageMs\":2102,\"syntheticOnly\":true}"}
{"timestamp":"2026-11-10T01:30:27.991Z","source":"driver","event":"command-received","command":"close:C2-no-signal"}
{"timestamp":"2026-11-10T01:30:27.991Z","source":"driver","event":"explicit-scope-close-start","phase":"C2-no-signal","signals":0,"recoveryCount":0}
{"timestamp":"2026-11-10T01:30:28.008Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:28.007Z\",\"source\":\"stub\",\"event\":\"stop-signal\",\"pid\":1534952,\"attempt\":1,\"ageMs\":2121,\"signal\":\"SIGTERM\",\"delayMs\":15,\"state\":\"past-registering-window\"}"}
{"timestamp":"2026-11-10T01:30:28.024Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:28.023Z\",\"source\":\"stub\",\"event\":\"exit\",\"pid\":1534952,\"attempt\":1,\"ageMs\":2137,\"exitCode\":0}"}
[01:30:28.032] INFO (#1): Relay client stopped { pid: 1534952 }
{"timestamp":"2026-11-10T01:30:28.034Z","source":"driver","event":"explicit-scope-close-end","phase":"C2-no-signal","stopMs":43,"signals":0,"recoveryCount":0}
{"timestamp":"2026-11-10T01:30:28.034Z","source":"driver","event":"listeners","phase":"C2-no-signal:after-close","identities":{"SIGINT":[1],"SIGTERM":[2]},"counts":{"SIGINT":1,"SIGTERM":1},"baselineRestored":true}
{"timestamp":"2026-11-10T01:30:28.034Z","source":"driver","event":"phase-closed","phase":"C2-no-signal"}
{"timestamp":"2026-11-10T01:30:28.037Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client stopped\",{\"pid\":1534952}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:28.032Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#1\"}"}
{"timestamp":"2026-11-10T01:30:28.039Z","source":"driver","event":"listeners","phase":"C3-signalled:after-build","identities":{"SIGINT":[1],"SIGTERM":[2]},"counts":{"SIGINT":1,"SIGTERM":1},"baselineRestored":true}
{"timestamp":"2026-11-10T01:30:28.047Z","source":"driver","event":"real-child-spawned","pid":1534960}
[01:30:28.047] INFO (#1): Relay client process started; waiting for tunnel connection {
  pid: 1534960,
  source: 'path',
  version: '2026.10.4',
  protocol: 'auto',
  tunnelId: 'tunnel-1',
  tunnelName: undefined
}
{"timestamp":"2026-11-10T01:30:28.049Z","source":"driver","event":"connector-applied","phase":"C3-signalled","status":{"status":"running","providerKind":"cloudflare_tunnel","pid":1534960,"tunnelId":"tunnel-1"}}
{"timestamp":"2026-11-10T01:30:28.049Z","source":"driver","event":"phase-ready","phase":"C3-signalled"}
{"timestamp":"2026-11-10T01:30:28.051Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client process started; waiting for tunnel connection\",{\"pid\":1534960,\"source\":\"path\",\"version\":\"2026.10.4\",\"protocol\":\"auto\",\"tunnelId\":\"tunnel-1\"}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:28.047Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#1\"}"}
{"timestamp":"2026-11-10T01:30:28.090Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:28.090Z\",\"source\":\"stub\",\"event\":\"started\",\"pid\":1534960,\"attempt\":2,\"ageMs\":1}"}
{"timestamp":"2026-11-10T01:30:30.192Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:30.192Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1534960,\"attempt\":2,\"ageMs\":2103,\"syntheticOnly\":true}"}
{"timestamp":"2026-11-10T01:30:30.193Z","source":"driver","event":"host-signal-received","signal":"SIGINT","signals":1}
{"timestamp":"2026-11-10T01:30:30.193Z","source":"driver","event":"host-signal-received","signal":"SIGTERM","signals":2}
{"timestamp":"2026-11-10T01:30:30.194Z","source":"driver","event":"command-received","command":"close:C3-signalled"}
{"timestamp":"2026-11-10T01:30:30.194Z","source":"driver","event":"explicit-scope-close-start","phase":"C3-signalled","signals":2,"recoveryCount":0}
{"timestamp":"2026-11-10T01:30:30.196Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:30.196Z\",\"source\":\"stub\",\"event\":\"stop-signal\",\"pid\":1534960,\"attempt\":2,\"ageMs\":2107,\"signal\":\"SIGTERM\",\"delayMs\":15,\"state\":\"past-registering-window\"}"}
{"timestamp":"2026-11-10T01:30:30.212Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:30.212Z\",\"source\":\"stub\",\"event\":\"exit\",\"pid\":1534960,\"attempt\":2,\"ageMs\":2123,\"exitCode\":0}"}
[01:30:30.217] INFO (#1): Relay client stopped { pid: 1534960 }
{"timestamp":"2026-11-10T01:30:30.219Z","source":"driver","event":"explicit-scope-close-end","phase":"C3-signalled","stopMs":25,"signals":2,"recoveryCount":0}
{"timestamp":"2026-11-10T01:30:30.220Z","source":"driver","event":"listeners","phase":"C3-signalled:after-close","identities":{"SIGINT":[1],"SIGTERM":[2]},"counts":{"SIGINT":1,"SIGTERM":1},"baselineRestored":true}
{"timestamp":"2026-11-10T01:30:30.220Z","source":"driver","event":"phase-closed","phase":"C3-signalled"}
{"timestamp":"2026-11-10T01:30:30.221Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client stopped\",{\"pid\":1534960}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:30.217Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#1\"}"}
{"timestamp":"2026-11-10T01:30:30.223Z","source":"driver","event":"listeners","phase":"C3-fresh:after-build","identities":{"SIGINT":[1],"SIGTERM":[2]},"counts":{"SIGINT":1,"SIGTERM":1},"baselineRestored":true}
{"timestamp":"2026-11-10T01:30:30.228Z","source":"driver","event":"real-child-spawned","pid":1534992}
[01:30:30.228] INFO (#1): Relay client process started; waiting for tunnel connection {
  pid: 1534992,
  source: 'path',
  version: '2026.10.4',
  protocol: 'auto',
  tunnelId: 'tunnel-1',
  tunnelName: undefined
}
{"timestamp":"2026-11-10T01:30:30.229Z","source":"driver","event":"connector-applied","phase":"C3-fresh","status":{"status":"running","providerKind":"cloudflare_tunnel","pid":1534992,"tunnelId":"tunnel-1"}}
{"timestamp":"2026-11-10T01:30:30.229Z","source":"driver","event":"phase-ready","phase":"C3-fresh"}
{"timestamp":"2026-11-10T01:30:30.230Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client process started; waiting for tunnel connection\",{\"pid\":1534992,\"source\":\"path\",\"version\":\"2026.10.4\",\"protocol\":\"auto\",\"tunnelId\":\"tunnel-1\"}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:30.228Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#1\"}"}
{"timestamp":"2026-11-10T01:30:30.271Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:30.271Z\",\"source\":\"stub\",\"event\":\"started\",\"pid\":1534992,\"attempt\":3,\"ageMs\":1}"}
{"timestamp":"2026-11-10T01:30:32.374Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:32.374Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1534992,\"attempt\":3,\"ageMs\":2104,\"syntheticOnly\":true}"}
{"timestamp":"2026-11-10T01:30:32.375Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:32.375Z\",\"source\":\"stub\",\"event\":\"controlled-crash\",\"pid\":1534992,\"attempt\":3,\"ageMs\":2105,\"exitCode\":1}"}
{"timestamp":"2026-11-10T01:30:32.386Z","source":"driver","event":"child-exit-observed","pid":1534992,"exitCode":1}
[01:30:32.387] INFO (#137): Relay client stopped { pid: 1534992 }
[01:30:32.388] WARN (#137): Relay client exited; restarting {
  pid: 1534992,
  exitCode: 1,
  tunnelId: 'tunnel-1',
  tunnelName: undefined
}
{"timestamp":"2026-11-10T01:30:32.395Z","source":"driver","event":"real-child-spawned","pid":1535020}
[01:30:32.395] INFO (#137): Relay client process started; waiting for tunnel connection {
  pid: 1535020,
  source: 'path',
  version: '2026.10.4',
  protocol: 'auto',
  tunnelId: 'tunnel-1',
  tunnelName: undefined
}
{"timestamp":"2026-11-10T01:30:32.398Z","source":"driver","event":"recovery-request","phase":"C3-fresh","count":1,"config":{"providerKind":"cloudflare_tunnel","connectorToken":"synthetic-token","tunnelId":"tunnel-1"}}
{"timestamp":"2026-11-10T01:30:32.399Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client stopped\",{\"pid\":1534992}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:32.387Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#137\"}"}
{"timestamp":"2026-11-10T01:30:32.399Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client exited; restarting\",{\"pid\":1534992,\"exitCode\":1,\"tunnelId\":\"tunnel-1\"}],\"level\":\"WARN\",\"timestamp\":\"2026-11-10T01:30:32.388Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#137\"}"}
{"timestamp":"2026-11-10T01:30:32.399Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client process started; waiting for tunnel connection\",{\"pid\":1535020,\"source\":\"path\",\"version\":\"2026.10.4\",\"protocol\":\"auto\",\"tunnelId\":\"tunnel-1\"}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:32.395Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#137\"}"}
{"timestamp":"2026-11-10T01:30:32.437Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:32.436Z\",\"source\":\"stub\",\"event\":\"started\",\"pid\":1535020,\"attempt\":4,\"ageMs\":0}"}
{"timestamp":"2026-11-10T01:30:34.539Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:34.538Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1535020,\"attempt\":4,\"ageMs\":2102,\"syntheticOnly\":true}"}
{"timestamp":"2026-11-10T01:30:34.540Z","source":"driver","event":"command-received","command":"close:C3-fresh"}
{"timestamp":"2026-11-10T01:30:34.540Z","source":"driver","event":"explicit-scope-close-start","phase":"C3-fresh","signals":2,"recoveryCount":1}
{"timestamp":"2026-11-10T01:30:34.543Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:34.543Z\",\"source\":\"stub\",\"event\":\"stop-signal\",\"pid\":1535020,\"attempt\":4,\"ageMs\":2107,\"signal\":\"SIGTERM\",\"delayMs\":15,\"state\":\"past-registering-window\"}"}
{"timestamp":"2026-11-10T01:30:34.559Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:34.558Z\",\"source\":\"stub\",\"event\":\"exit\",\"pid\":1535020,\"attempt\":4,\"ageMs\":2122,\"exitCode\":0}"}
[01:30:34.565] INFO (#1): Relay client stopped { pid: 1535020 }
{"timestamp":"2026-11-10T01:30:34.566Z","source":"driver","event":"explicit-scope-close-end","phase":"C3-fresh","stopMs":26,"signals":2,"recoveryCount":1}
{"timestamp":"2026-11-10T01:30:34.566Z","source":"driver","event":"listeners","phase":"C3-fresh:after-close","identities":{"SIGINT":[1],"SIGTERM":[2]},"counts":{"SIGINT":1,"SIGTERM":1},"baselineRestored":true}
{"timestamp":"2026-11-10T01:30:34.566Z","source":"driver","event":"phase-closed","phase":"C3-fresh"}
{"timestamp":"2026-11-10T01:30:34.566Z","source":"driver","event":"lifecycle-complete","recoveryCount":1,"signals":2}
{"timestamp":"2026-11-10T01:30:34.567Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client stopped\",{\"pid\":1535020}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:34.565Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#1\"}"}
{"timestamp":"2026-11-10T01:30:34.567Z","source":"driver","event":"process-exit","code":0,"recoveryCount":1,"signals":2}
```

## Full raw relay-client log

```text
{"message":["Relay client process started; waiting for tunnel connection",{"pid":1534952,"source":"path","version":"2026.10.4","protocol":"auto","tunnelId":"tunnel-1"}],"level":"INFO","timestamp":"2026-11-10T01:30:25.841Z","annotations":{},"spans":{},"fiberId":"#1"}
{"message":["Relay client stopped",{"pid":1534952}],"level":"INFO","timestamp":"2026-11-10T01:30:28.032Z","annotations":{},"spans":{},"fiberId":"#1"}
{"message":["Relay client process started; waiting for tunnel connection",{"pid":1534960,"source":"path","version":"2026.10.4","protocol":"auto","tunnelId":"tunnel-1"}],"level":"INFO","timestamp":"2026-11-10T01:30:28.047Z","annotations":{},"spans":{},"fiberId":"#1"}
{"message":["Relay client stopped",{"pid":1534960}],"level":"INFO","timestamp":"2026-11-10T01:30:30.217Z","annotations":{},"spans":{},"fiberId":"#1"}
{"message":["Relay client process started; waiting for tunnel connection",{"pid":1534992,"source":"path","version":"2026.10.4","protocol":"auto","tunnelId":"tunnel-1"}],"level":"INFO","timestamp":"2026-11-10T01:30:30.228Z","annotations":{},"spans":{},"fiberId":"#1"}
{"message":["Relay client stopped",{"pid":1534992}],"level":"INFO","timestamp":"2026-11-10T01:30:32.387Z","annotations":{},"spans":{},"fiberId":"#137"}
{"message":["Relay client exited; restarting",{"pid":1534992,"exitCode":1,"tunnelId":"tunnel-1"}],"level":"WARN","timestamp":"2026-11-10T01:30:32.388Z","annotations":{},"spans":{},"fiberId":"#137"}
{"message":["Relay client process started; waiting for tunnel connection",{"pid":1535020,"source":"path","version":"2026.10.4","protocol":"auto","tunnelId":"tunnel-1"}],"level":"INFO","timestamp":"2026-11-10T01:30:32.395Z","annotations":{},"spans":{},"fiberId":"#137"}
{"message":["Relay client stopped",{"pid":1535020}],"level":"INFO","timestamp":"2026-11-10T01:30:34.565Z","annotations":{},"spans":{},"fiberId":"#1"}
```

## Full raw stub log

```text
{"timestamp":"2026-11-10T01:30:25.886Z","source":"stub","event":"started","pid":1534952,"attempt":1,"ageMs":1}
{"timestamp":"2026-11-10T01:30:27.988Z","source":"stub","event":"past-registering-window","pid":1534952,"attempt":1,"ageMs":2102,"syntheticOnly":true}
{"timestamp":"2026-11-10T01:30:28.007Z","source":"stub","event":"stop-signal","pid":1534952,"attempt":1,"ageMs":2121,"signal":"SIGTERM","delayMs":15,"state":"past-registering-window"}
{"timestamp":"2026-11-10T01:30:28.023Z","source":"stub","event":"exit","pid":1534952,"attempt":1,"ageMs":2137,"exitCode":0}
{"timestamp":"2026-11-10T01:30:28.090Z","source":"stub","event":"started","pid":1534960,"attempt":2,"ageMs":1}
{"timestamp":"2026-11-10T01:30:30.192Z","source":"stub","event":"past-registering-window","pid":1534960,"attempt":2,"ageMs":2103,"syntheticOnly":true}
{"timestamp":"2026-11-10T01:30:30.196Z","source":"stub","event":"stop-signal","pid":1534960,"attempt":2,"ageMs":2107,"signal":"SIGTERM","delayMs":15,"state":"past-registering-window"}
{"timestamp":"2026-11-10T01:30:30.212Z","source":"stub","event":"exit","pid":1534960,"attempt":2,"ageMs":2123,"exitCode":0}
{"timestamp":"2026-11-10T01:30:30.271Z","source":"stub","event":"started","pid":1534992,"attempt":3,"ageMs":1}
{"timestamp":"2026-11-10T01:30:32.374Z","source":"stub","event":"past-registering-window","pid":1534992,"attempt":3,"ageMs":2104,"syntheticOnly":true}
{"timestamp":"2026-11-10T01:30:32.375Z","source":"stub","event":"controlled-crash","pid":1534992,"attempt":3,"ageMs":2105,"exitCode":1}
{"timestamp":"2026-11-10T01:30:32.436Z","source":"stub","event":"started","pid":1535020,"attempt":4,"ageMs":0}
{"timestamp":"2026-11-10T01:30:34.538Z","source":"stub","event":"past-registering-window","pid":1535020,"attempt":4,"ageMs":2102,"syntheticOnly":true}
{"timestamp":"2026-11-10T01:30:34.543Z","source":"stub","event":"stop-signal","pid":1535020,"attempt":4,"ageMs":2107,"signal":"SIGTERM","delayMs":15,"state":"past-registering-window"}
{"timestamp":"2026-11-10T01:30:34.558Z","source":"stub","event":"exit","pid":1535020,"attempt":4,"ageMs":2122,"exitCode":0}
```

