# B1 after runtime recording

Revision: [e039e17308](https://git.cafe/pingdotgg/t3code/commit/e039e17308b32c280903c5dd4cd82f2457e0d8f0)

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": "B1",
  "side": "after",
  "sha": "e039e17308b32c280903c5dd4cd82f2457e0d8f0",
  "stopMs": 66,
  "failure": null,
  "output": "/tmp/lead-33628-r1/capture-1/B1-after-20261110T013006.222703Z",
  "scriptSha256": {
    "driver.ts": "ec3fc57d6aae729c9d28d06370977a052e66acf71e633e9786dd552b091ee423",
    "cloudflared-stub.sh": "d6bece305c6bdc22b6b9511fc2e5210801777f54445f659e9d242f1732ad5f99",
    "cloudflared-stub.mjs": "4f0cb55a5a434d6a0c2148455c58683eba0f8d81993785ff34ffca3503e780df",
    "runner.py": "88a0c74d1385c4454291076b74a7c8a8ba4ab4a7ec06e337be788f5d23c5c402",
    "run.sh": "dc4d7379c91708d38ae3a6d3db279e254b71ad67901cd3e703addc66248fd879"
  },
  "recoveryRequests": [
    {
      "timestamp": "2026-11-10T01:30:07.917Z",
      "source": "driver",
      "event": "recovery-request",
      "phase": "ordinary",
      "count": 1,
      "config": {
        "providerKind": "cloudflare_tunnel",
        "connectorToken": "synthetic-token",
        "tunnelId": "tunnel-1"
      }
    }
  ],
  "listeners": [
    {
      "timestamp": "2026-11-10T01:30:07.821Z",
      "source": "driver",
      "event": "listeners",
      "phase": "before-build",
      "identities": {
        "SIGINT": [
          1
        ],
        "SIGTERM": [
          2
        ]
      },
      "counts": {
        "SIGINT": 1,
        "SIGTERM": 1
      },
      "baselineRestored": true
    },
    {
      "timestamp": "2026-11-10T01:30:07.850Z",
      "source": "driver",
      "event": "listeners",
      "phase": "ordinary:after-build",
      "identities": {
        "SIGINT": [
          1,
          3,
          4
        ],
        "SIGTERM": [
          2,
          3,
          4
        ]
      },
      "counts": {
        "SIGINT": 3,
        "SIGTERM": 3
      },
      "baselineRestored": false
    }
  ],
  "scopeStops": [],
  "relayCounts": {
    "Relay client process started; waiting for tunnel connection": 2,
    "Relay client exited; restarting": 1,
    "Relay client stopped": 2,
    "Relay client is crash-looping; delaying restart": 0
  },
  "exitResults": [
    {
      "timestamp": "2026-11-10T01:30:07.909Z",
      "source": "driver",
      "event": "child-exit-observed",
      "pid": 1533970,
      "exitCode": 1
    }
  ]
}
```

## Runner milestones

```text
{"timestamp": "2026-11-10T01:30:06.248+00:00", "source": "runner", "event": "environment", "row": "B1", "side": "after", "sha": "e039e17308b32c280903c5dd4cd82f2457e0d8f0", "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:06.250+00:00", "source": "runner", "event": "spawned-driver", "pid": 1533911, "pgid": 1533911}
{"timestamp": "2026-11-10T01:30:07.864+00:00", "source": "runner", "event": "gate-satisfied", "gate": "runtime applied; no server signal", "observed": {"timestamp": "2026-11-10T01:30:07.863Z", "source": "driver", "event": "driver-ready", "row": "B1"}}
{"timestamp": "2026-11-10T01:30:07.899+00:00", "source": "runner", "event": "gate-satisfied", "gate": "stub attempt 1 started", "observed": {"timestamp": "2026-11-10T01:30:07.899Z", "source": "stub", "event": "file-line", "line": "{\"timestamp\":\"2026-11-10T01:30:07.898Z\",\"source\":\"stub\",\"event\":\"started\",\"pid\":1533970,\"attempt\":1,\"ageMs\":0}", "record": {"timestamp": "2026-11-10T01:30:07.898Z", "source": "stub", "event": "started", "pid": 1533970, "attempt": 1, "ageMs": 0}}}
{"timestamp": "2026-11-10T01:30:07.899+00:00", "source": "runner", "event": "send-child-only-signal", "pid": 1533970, "signal": "SIGUSR1", "purpose": "controlled nonzero exit 1, no server signal"}
{"timestamp": "2026-11-10T01:30:07.917+00:00", "source": "runner", "event": "gate-satisfied", "gate": "ordinary crash recovery request", "observed": {"timestamp": "2026-11-10T01:30:07.917Z", "source": "driver", "event": "recovery-request", "phase": "ordinary", "count": 1, "config": {"providerKind": "cloudflare_tunnel", "connectorToken": "synthetic-token", "tunnelId": "tunnel-1"}}}
{"timestamp": "2026-11-10T01:30:10.049+00:00", "source": "runner", "event": "gate-satisfied", "gate": "replacement observed and aged beyond synthetic registering window", "observed": {"timestamp": "2026-11-10T01:30:10.048Z", "source": "stub", "event": "file-line", "line": "{\"timestamp\":\"2026-11-10T01:30:10.047Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1533977,\"attempt\":2,\"ageMs\":2103,\"syntheticOnly\":true}", "record": {"timestamp": "2026-11-10T01:30:10.047Z", "source": "stub", "event": "past-registering-window", "pid": 1533977, "attempt": 2, "ageMs": 2103, "syntheticOnly": true}}}
{"timestamp": "2026-11-10T01:30:10.049+00:00", "source": "runner", "event": "ordinary-crash-recovered-before-server-signal"}
{"timestamp": "2026-11-10T01:30:10.049+00:00", "source": "runner", "event": "send-group-signal", "pid": 1533911, "pgid": 1533911, "signal": "SIGTERM"}
{"timestamp": "2026-11-10T01:30:10.115+00:00", "source": "runner", "event": "backend-stopped", "stopMs": 66, "returncode": 130}
{"timestamp": "2026-11-10T01:30:10.122+00:00", "source": "runner", "event": "tracked-process-group-cleanup", "members": []}
```

## Driver and forwarded timestamped relay/stub events

```text
{"timestamp":"2026-11-10T01:30:07.818Z","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:07.821Z","source":"driver","event":"listeners","phase":"before-build","identities":{"SIGINT":[1],"SIGTERM":[2]},"counts":{"SIGINT":1,"SIGTERM":1},"baselineRestored":true}
{"timestamp":"2026-11-10T01:30:07.850Z","source":"driver","event":"listeners","phase":"ordinary:after-build","identities":{"SIGINT":[1,3,4],"SIGTERM":[2,3,4]},"counts":{"SIGINT":3,"SIGTERM":3},"baselineRestored":false}
{"timestamp":"2026-11-10T01:30:07.860Z","source":"driver","event":"real-child-spawned","pid":1533970}
[01:30:07.861] INFO (#1): Relay client process started; waiting for tunnel connection {
  pid: 1533970,
  source: 'path',
  version: '2026.10.4',
  protocol: 'auto',
  tunnelId: 'tunnel-1',
  tunnelName: undefined
}
{"timestamp":"2026-11-10T01:30:07.863Z","source":"driver","event":"connector-applied","phase":"ordinary","status":{"status":"running","providerKind":"cloudflare_tunnel","pid":1533970,"tunnelId":"tunnel-1"}}
{"timestamp":"2026-11-10T01:30:07.863Z","source":"driver","event":"driver-ready","row":"B1"}
{"timestamp":"2026-11-10T01:30:07.881Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client process started; waiting for tunnel connection\",{\"pid\":1533970,\"source\":\"path\",\"version\":\"2026.10.4\",\"protocol\":\"auto\",\"tunnelId\":\"tunnel-1\"}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:07.861Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#1\"}"}
{"timestamp":"2026-11-10T01:30:07.899Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:07.898Z\",\"source\":\"stub\",\"event\":\"started\",\"pid\":1533970,\"attempt\":1,\"ageMs\":0}"}
{"timestamp":"2026-11-10T01:30:07.901Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:07.899Z\",\"source\":\"stub\",\"event\":\"controlled-crash\",\"pid\":1533970,\"attempt\":1,\"ageMs\":1,\"exitCode\":1}"}
{"timestamp":"2026-11-10T01:30:07.909Z","source":"driver","event":"child-exit-observed","pid":1533970,"exitCode":1}
[01:30:07.911] INFO (#29): Relay client stopped { pid: 1533970 }
[01:30:07.912] WARN (#29): Relay client exited; restarting {
  pid: 1533970,
  exitCode: 1,
  tunnelId: 'tunnel-1',
  tunnelName: undefined
}
{"timestamp":"2026-11-10T01:30:07.916Z","source":"driver","event":"real-child-spawned","pid":1533977}
[01:30:07.916] INFO (#29): Relay client process started; waiting for tunnel connection {
  pid: 1533977,
  source: 'path',
  version: '2026.10.4',
  protocol: 'auto',
  tunnelId: 'tunnel-1',
  tunnelName: undefined
}
{"timestamp":"2026-11-10T01:30:07.917Z","source":"driver","event":"recovery-request","phase":"ordinary","count":1,"config":{"providerKind":"cloudflare_tunnel","connectorToken":"synthetic-token","tunnelId":"tunnel-1"}}
{"timestamp":"2026-11-10T01:30:07.918Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client stopped\",{\"pid\":1533970}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:07.911Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#29\"}"}
{"timestamp":"2026-11-10T01:30:07.918Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client exited; restarting\",{\"pid\":1533970,\"exitCode\":1,\"tunnelId\":\"tunnel-1\"}],\"level\":\"WARN\",\"timestamp\":\"2026-11-10T01:30:07.912Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#29\"}"}
{"timestamp":"2026-11-10T01:30:07.918Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client process started; waiting for tunnel connection\",{\"pid\":1533977,\"source\":\"path\",\"version\":\"2026.10.4\",\"protocol\":\"auto\",\"tunnelId\":\"tunnel-1\"}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:07.916Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#29\"}"}
{"timestamp":"2026-11-10T01:30:07.945Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:07.944Z\",\"source\":\"stub\",\"event\":\"started\",\"pid\":1533977,\"attempt\":2,\"ageMs\":1}"}
{"timestamp":"2026-11-10T01:30:10.048Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:10.047Z\",\"source\":\"stub\",\"event\":\"past-registering-window\",\"pid\":1533977,\"attempt\":2,\"ageMs\":2103,\"syntheticOnly\":true}"}
{"timestamp":"2026-11-10T01:30:10.049Z","source":"driver","event":"host-signal-received","signal":"SIGTERM","signals":1}
{"timestamp":"2026-11-10T01:30:10.050Z","source":"driver","event":"shutdown-started","recoveryCount":1}
{"timestamp":"2026-11-10T01:30:10.051Z","source":"driver","event":"predecessor-finalizer-start","delayMs":0,"recoveryCount":1}
{"timestamp":"2026-11-10T01:30:10.051Z","source":"driver","event":"predecessor-finalizer-end-relay-next","recoveryCount":1}
{"timestamp":"2026-11-10T01:30:10.055Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:10.049Z\",\"source\":\"stub\",\"event\":\"stop-signal\",\"pid\":1533977,\"attempt\":2,\"ageMs\":2105,\"signal\":\"SIGTERM\",\"delayMs\":15,\"state\":\"past-registering-window\"}"}
{"timestamp":"2026-11-10T01:30:10.055Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:10.055Z\",\"source\":\"stub\",\"event\":\"repeat-stop-signal\",\"pid\":1533977,\"attempt\":2,\"ageMs\":2111,\"signal\":\"SIGTERM\"}"}
{"timestamp":"2026-11-10T01:30:10.065Z","source":"stub","event":"file-line","line":"{\"timestamp\":\"2026-11-10T01:30:10.064Z\",\"source\":\"stub\",\"event\":\"exit\",\"pid\":1533977,\"attempt\":2,\"ageMs\":2120,\"exitCode\":0}"}
[01:30:10.072] INFO (#1): Relay client stopped { pid: 1533977 }
{"timestamp":"2026-11-10T01:30:10.075Z","source":"relay","event":"file-line","line":"{\"message\":[\"Relay client stopped\",{\"pid\":1533977}],\"level\":\"INFO\",\"timestamp\":\"2026-11-10T01:30:10.072Z\",\"annotations\":{},\"spans\":{},\"fiberId\":\"#1\"}"}
{"timestamp":"2026-11-10T01:30:10.075Z","source":"driver","event":"process-exit","code":130,"recoveryCount":1,"signals":1}
```

## Full raw relay-client log

```text
{"message":["Relay client process started; waiting for tunnel connection",{"pid":1533970,"source":"path","version":"2026.10.4","protocol":"auto","tunnelId":"tunnel-1"}],"level":"INFO","timestamp":"2026-11-10T01:30:07.861Z","annotations":{},"spans":{},"fiberId":"#1"}
{"message":["Relay client stopped",{"pid":1533970}],"level":"INFO","timestamp":"2026-11-10T01:30:07.911Z","annotations":{},"spans":{},"fiberId":"#29"}
{"message":["Relay client exited; restarting",{"pid":1533970,"exitCode":1,"tunnelId":"tunnel-1"}],"level":"WARN","timestamp":"2026-11-10T01:30:07.912Z","annotations":{},"spans":{},"fiberId":"#29"}
{"message":["Relay client process started; waiting for tunnel connection",{"pid":1533977,"source":"path","version":"2026.10.4","protocol":"auto","tunnelId":"tunnel-1"}],"level":"INFO","timestamp":"2026-11-10T01:30:07.916Z","annotations":{},"spans":{},"fiberId":"#29"}
{"message":["Relay client stopped",{"pid":1533977}],"level":"INFO","timestamp":"2026-11-10T01:30:10.072Z","annotations":{},"spans":{},"fiberId":"#1"}
```

## Full raw stub log

```text
{"timestamp":"2026-11-10T01:30:07.898Z","source":"stub","event":"started","pid":1533970,"attempt":1,"ageMs":0}
{"timestamp":"2026-11-10T01:30:07.899Z","source":"stub","event":"controlled-crash","pid":1533970,"attempt":1,"ageMs":1,"exitCode":1}
{"timestamp":"2026-11-10T01:30:07.944Z","source":"stub","event":"started","pid":1533977,"attempt":2,"ageMs":1}
{"timestamp":"2026-11-10T01:30:10.047Z","source":"stub","event":"past-registering-window","pid":1533977,"attempt":2,"ageMs":2103,"syntheticOnly":true}
{"timestamp":"2026-11-10T01:30:10.049Z","source":"stub","event":"stop-signal","pid":1533977,"attempt":2,"ageMs":2105,"signal":"SIGTERM","delayMs":15,"state":"past-registering-window"}
{"timestamp":"2026-11-10T01:30:10.055Z","source":"stub","event":"repeat-stop-signal","pid":1533977,"attempt":2,"ageMs":2111,"signal":"SIGTERM"}
{"timestamp":"2026-11-10T01:30:10.064Z","source":"stub","event":"exit","pid":1533977,"attempt":2,"ageMs":2120,"exitCode":0}
```

