# R10: Delayed 5s nonzero failure

Before [e9236274a3](https://git.cafe/pingdotgg/t3code/commit/e9236274a3a6e0c731a7df4092db1e686f039068); after [63e44670dd](https://git.cafe/pingdotgg/t3code/commit/63e44670dd1d222cf63619d5e02415f2a9fd3bc2).

Before run: `/tmp/lead-24640-r1/capture/2026-10-27T14-25-49.277Z-before-R10`. After run: `/tmp/lead-24640-r1/capture/2026-10-27T14-25-49.271Z-after-R10`.

Environment: fs-31 Linux x86_64, Node v26.12.1; no viewport/theme/DPR/font scaling. Fresh per-run app databases. Same RPC fixture on each side. Native sidecars compiled with isolated Rust 1.99.1 where used.

Before times out near 1s. After reaches exit 7 at 5s and applies the duration floor to failure, giving about 20s idle. Known busy state is retained.

Wrapper timings exclude Python startup and stream drain. Acquisition timings use the real terminal.posixProcessTableSnapshot trace span. An idle gap is END→next START, never start-to-start. Before delay=min(1000×2^failureCount,60000)ms; after delay=min(max(1000×2^failureCount,4×measured fallback acquisition),60000)ms. Native-failed production ticks increment failureCount even when fallback succeeds; successful absent-supplier harness ticks reset it. Native requests and terminal processing can add overhead.

| Event | Before ([e9236274a3](https://git.cafe/pingdotgg/t3code/commit/e9236274a3a6e0c731a7df4092db1e686f039068)) | After ([63e44670dd](https://git.cafe/pingdotgg/t3code/commit/63e44670dd1d222cf63619d5e02415f2a9fd3bc2)) | Δ |
|---|---|---|---|
| Fallback query 1 | R10-seed, background; shim START 2026-10-27T14:26:00.384Z (mono 921749507637479); END 2026-10-27T14:26:00.435Z (mono 921749558803733); 51.2ms, exit 0; acquisition 2026-10-27T14:26:00.214Z→2026-10-27T14:26:00.444Z, 230.7ms | R10-seed, background; shim START 2026-10-27T14:25:59.340Z (mono 921748463415684); END 2026-10-27T14:25:59.387Z (mono 921748510678726); 47.3ms, exit 0; acquisition 2026-10-27T14:25:59.274Z→2026-10-27T14:25:59.396Z, 121.5ms | Timeout → exit 7 at 5s, ~20s idle |
| Fallback query 2 | R10-failure, background; shim START 2026-10-27T14:26:02.490Z (mono 921751613061572); END 2026-10-27T14:26:03.461Z (mono 921752584215438); 971.2ms, signal 15; acquisition 2026-10-27T14:26:02.448Z→2026-10-27T14:26:03.468Z, 1019.7ms | R10-failure, background; shim START 2026-10-27T14:26:01.450Z (mono 921750573534695); END 2026-10-27T14:26:06.451Z (mono 921755573860728); 5000.3ms, exit 7; acquisition 2026-10-27T14:26:01.399Z→2026-10-27T14:26:06.458Z, 5059.3ms | Measured duration/result above |
| Fallback query 3 | R10-failure, background; shim START 2026-10-27T14:26:07.510Z (mono 921756633073263); END 2026-10-27T14:26:08.479Z (mono 921757602442451); 969.4ms, signal 15; acquisition 2026-10-27T14:26:07.470Z→2026-10-27T14:26:08.488Z, 1017.7ms | R10-failure, background; shim START 2026-10-27T14:26:26.744Z (mono 921775866888818); END 2026-10-27T14:26:31.744Z (mono 921780867361177); 5000.5ms, exit 7; acquisition 2026-10-27T14:26:26.701Z→2026-10-27T14:26:31.755Z, 5054.2ms | Measured duration/result above |
| Background completion→next-query gaps | R10-seed→R10-failure: shim gap 2.054s, acquisition gap 2.004s<br>R10-failure→R10-failure: shim gap 4.049s, acquisition gap 4.002s | R10-seed→R10-failure: shim gap 2.063s, acquisition gap 2.003s<br>R10-failure→R10-failure: shim gap 20.293s, acquisition gap 20.243s | Timeout → exit 7 at 5s, ~20s idle |
| Terminal event 1 | 2026-10-27T14:26:00.452Z `fixture-thread-a/term-0` activity, seq=5, busy=True, label=`fixture-child` | 2026-10-27T14:25:59.400Z `fixture-thread-a/term-0` activity, seq=6, busy=True, label=`fixture-child` | Compare identity/sequence; subscriptions deduplicated |
| Terminal event 2 | 2026-10-27T14:26:08.750Z `fixture-thread-a/term-0` closed, seq=6 | 2026-10-27T14:26:32.022Z `fixture-thread-a/term-0` closed, seq=7 | Compare identity/sequence; subscriptions deduplicated |
| Peak all fallback queries | 1 | 1 | Independent closeIdle may overlap one background query |
| Peak background fallback queries | 1 | 1 | Independent closeIdle may overlap one background query |

## Before scripted milestones and final observation states
```json
[
  {
    "kind": "control",
    "utc": "2026-10-27T14:25:49.479Z",
    "mono_ns": "921738602669191",
    "ms": 199.815578,
    "phase": "R10",
    "mode": "fail",
    "delay": 5000
  },
  {
    "kind": "server-ready",
    "utc": "2026-10-27T14:25:59.059Z",
    "mono_ns": "921748182525187",
    "ms": 9779.678136
  },
  {
    "kind": "rpc-connected",
    "utc": "2026-10-27T14:25:59.205Z",
    "mono_ns": "921748328788575",
    "ms": 9925.939099
  },
  {
    "kind": "control",
    "utc": "2026-10-27T14:25:59.362Z",
    "mono_ns": "921748485708374",
    "ms": 10082.853679,
    "phase": "R10-seed",
    "mode": "valid",
    "delay": 0
  },
  {
    "kind": "child-ready",
    "utc": "2026-10-27T14:25:59.478Z",
    "mono_ns": "921748601286158",
    "ms": 10198.431052,
    "threadId": "fixture-thread-a",
    "terminalId": "term-0",
    "childPid": 3401799,
    "marker": "READY_R10_0"
  },
  {
    "kind": "control",
    "utc": "2026-10-27T14:26:00.563Z",
    "mono_ns": "921749686014240",
    "ms": 11283.159003,
    "phase": "R10-failure",
    "mode": "fail",
    "delay": 5000
  },
  {
    "kind": "scenario-complete",
    "utc": "2026-10-27T14:26:08.741Z",
    "mono_ns": "921757864225816",
    "ms": 19461.370519
  },
  {
    "kind": "cleanup-start",
    "utc": "2026-10-27T14:26:08.868Z",
    "mono_ns": "921757991758657",
    "ms": 19588.905935,
    "pids": [
      3400140,
      3400142,
      3401796,
      3401799
    ],
    "ptyPids": [
      3401796,
      3401799
    ]
  },
  {
    "kind": "cleanup-end",
    "utc": "2026-10-27T14:26:10.970Z",
    "mono_ns": "921760093001726",
    "ms": 21690.153854,
    "survivorsBeforeFinalKill": [],
    "remaining": []
  }
]
```
Metadata snapshots taken before and after driver cleanup:
```json
[
  {
    "kind": "state",
    "utc": "2026-10-27T14:26:00.562Z",
    "mono_ns": "921749685749583",
    "ms": 11282.895599,
    "terminals": [
      {
        "threadId": "fixture-thread-a",
        "terminalId": "term-0",
        "cwd": "/tmp/lead-24640-r1/capture/2026-10-27T14-25-49.277Z-before-R10",
        "worktreePath": null,
        "status": "running",
        "pid": 3401796,
        "exitCode": null,
        "exitSignal": null,
        "hasRunningSubprocess": true,
        "label": "fixture-child",
        "updatedAt": "2026-10-27T14:26:00.446Z"
      }
    ]
  },
  {
    "kind": "state",
    "utc": "2026-10-27T14:26:08.741Z",
    "mono_ns": "921757864142589",
    "ms": 19461.288415,
    "terminals": [
      {
        "threadId": "fixture-thread-a",
        "terminalId": "term-0",
        "cwd": "/tmp/lead-24640-r1/capture/2026-10-27T14-25-49.277Z-before-R10",
        "worktreePath": null,
        "status": "running",
        "pid": 3401796,
        "exitCode": null,
        "exitSignal": null,
        "hasRunningSubprocess": true,
        "label": "fixture-child",
        "updatedAt": "2026-10-27T14:26:00.446Z"
      }
    ]
  },
  {
    "kind": "state",
    "utc": "2026-10-27T14:26:08.852Z",
    "mono_ns": "921757975369312",
    "ms": 19572.515187,
    "terminals": []
  }
]
```

## After scripted milestones and final observation states
```json
[
  {
    "kind": "control",
    "utc": "2026-10-27T14:25:49.479Z",
    "mono_ns": "921738601948539",
    "ms": 205.455799,
    "phase": "R10",
    "mode": "fail",
    "delay": 5000
  },
  {
    "kind": "server-ready",
    "utc": "2026-10-27T14:25:58.275Z",
    "mono_ns": "921747398650623",
    "ms": 9002.160177
  },
  {
    "kind": "rpc-connected",
    "utc": "2026-10-27T14:25:58.416Z",
    "mono_ns": "921747539605853",
    "ms": 9143.116359
  },
  {
    "kind": "control",
    "utc": "2026-10-27T14:25:58.558Z",
    "mono_ns": "921747681121735",
    "ms": 9284.627462,
    "phase": "R10-seed",
    "mode": "valid",
    "delay": 0
  },
  {
    "kind": "child-ready",
    "utc": "2026-10-27T14:25:58.705Z",
    "mono_ns": "921747828460440",
    "ms": 9431.966258,
    "threadId": "fixture-thread-a",
    "terminalId": "term-0",
    "childPid": 3401348,
    "marker": "READY_R10_0"
  },
  {
    "kind": "control",
    "utc": "2026-10-27T14:25:59.505Z",
    "mono_ns": "921748628312447",
    "ms": 10231.818014,
    "phase": "R10-failure",
    "mode": "fail",
    "delay": 5000
  },
  {
    "kind": "scenario-complete",
    "utc": "2026-10-27T14:26:32.009Z",
    "mono_ns": "921781132260937",
    "ms": 42735.767015
  },
  {
    "kind": "cleanup-start",
    "utc": "2026-10-27T14:26:32.148Z",
    "mono_ns": "921781271738255",
    "ms": 42875.249132,
    "pids": [
      3400139,
      3400141,
      3401325,
      3401348
    ],
    "ptyPids": [
      3401325,
      3401348
    ]
  },
  {
    "kind": "cleanup-end",
    "utc": "2026-10-27T14:26:34.284Z",
    "mono_ns": "921783407518755",
    "ms": 45011.031865,
    "survivorsBeforeFinalKill": [],
    "remaining": []
  }
]
```
Metadata snapshots taken before and after driver cleanup:
```json
[
  {
    "kind": "state",
    "utc": "2026-10-27T14:25:59.505Z",
    "mono_ns": "921748628081895",
    "ms": 10231.589305,
    "terminals": [
      {
        "threadId": "fixture-thread-a",
        "terminalId": "term-0",
        "cwd": "/tmp/lead-24640-r1/capture/2026-10-27T14-25-49.271Z-after-R10",
        "worktreePath": null,
        "status": "running",
        "pid": 3401325,
        "exitCode": null,
        "exitSignal": null,
        "hasRunningSubprocess": true,
        "label": "fixture-child",
        "updatedAt": "2026-10-27T14:25:59.398Z"
      }
    ]
  },
  {
    "kind": "state",
    "utc": "2026-10-27T14:26:32.009Z",
    "mono_ns": "921781131998805",
    "ms": 42735.554566,
    "terminals": [
      {
        "threadId": "fixture-thread-a",
        "terminalId": "term-0",
        "cwd": "/tmp/lead-24640-r1/capture/2026-10-27T14-25-49.271Z-after-R10",
        "worktreePath": null,
        "status": "running",
        "pid": 3401325,
        "exitCode": null,
        "exitSignal": null,
        "hasRunningSubprocess": true,
        "label": "fixture-child",
        "updatedAt": "2026-10-27T14:25:59.398Z"
      }
    ]
  },
  {
    "kind": "state",
    "utc": "2026-10-27T14:26:32.124Z",
    "mono_ns": "921781247186979",
    "ms": 42850.695972,
    "terminals": []
  }
]
```

## Behaviour difference
Timeout → exit 7 at 5s, ~20s idle
Raw UTC/monotonic RPC, query, signal, metadata, warnings, and cleanup records are in the paired transcripts. PID, randomly generated script terminal suffix, database path, UTC, sequence batching, and scheduler jitter naturally vary between fresh runs. No visual comparison is applicable.