{
  "commit": "0bc993ac09be75c679c7c3a3c9ddbf9a4024477d",
  "environment": "Linux; Node 26.12.1; real T3 server from source; isolated fresh database; loopback WebSocket RPC; real PTY at 100 columns x 30 rows; no model turns",
  "instrumentation": "JSON.stringify wrapper counts terminal output Chunk frames and records call stacks; Buffer.byteLength wrapper observes size accounting; wrappers forward original arguments and return values unchanged. This is not a timing benchmark.",
  "workload": "seq 1 100000; printf completion marker; withhold ACKs for 1 second, observe again after 500 ms, then release ACKs",
  "stats": {
    "measurementSerializations": 20,
    "transportSerializations": 20,
    "examples": {
      "transportSerializations": "Error\n    at JSON.stringify (file://<instrumentation>/trace.mjs:11:25)\n    at Object.encode (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/rpc/RpcSerialization.js:83:30)\n    at Object.write (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/rpc/RpcServer.js:1138:32)\n    at Object.send (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/rpc/RpcServer.js:1194:36)\n    at file://<checkout>/apps/server/src/terminal/OutputProtocol.ts:83:31\n    at ~effect/Effect/evaluate (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:747:12)\n    at FiberImpl.runLoop (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:486:97)\n    at FiberImpl.evaluate (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:425:23)\n    at AsyncResource.runInAsyncScope (node:async_hooks:226:14)\n    at FiberImpl.evaluate (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:414:29)",
      "measurementSerializations": "Error\n    at JSON.stringify (file://<instrumentation>/trace.mjs:11:25)\n    at file://<checkout>/apps/server/src/terminal/OutputProtocol.ts:91:53\n    at ~effect/Effect/evaluate (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:747:12)\n    at FiberImpl.runLoop (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:486:97)\n    at FiberImpl.evaluate (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:425:23)\n    at AsyncResource.runInAsyncScope (node:async_hooks:226:14)\n    at FiberImpl.evaluate (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:414:29)\n    at Array.<anonymous> (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:846:17)\n    at Latch.flushWaiters (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:2652:17)\n    at Latch.openUnsafe (file://<checkout>/node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/effect.js:2664:10)"
    },
    "byteLengthCallsFromOutputProtocol": 429
  },
  "runtime": [
    {
      "step": "Create synthetic project and thread through real RPC",
      "project": {
        "_tag": "Exit",
        "requestId": "1",
        "exit": {
          "_tag": "Success",
          "value": {
            "id": "proof-project",
            "title": "Terminal output proof",
            "workspaceRoot": "<workspace>",
            "repositoryIdentity": null,
            "faviconPath": null,
            "projectIcon": null,
            "defaultModelSelection": null,
            "defaultThreadEnvMode": null,
            "autoPull": false,
            "scripts": [],
            "pinnedAt": null,
            "archivedAt": null,
            "createdAt": "2026-11-12T22:15:11.306Z",
            "updatedAt": "2026-11-12T22:15:11.306Z",
            "deletedAt": null
          }
        }
      },
      "thread": {
        "_tag": "Exit",
        "requestId": "2",
        "exit": {
          "_tag": "Success",
          "value": {
            "sequence": 2
          }
        }
      }
    },
    {
      "step": "Attach real PTY through server WebSocket RPC",
      "response": {
        "_tag": "Chunk",
        "requestId": "3",
        "values": [
          {
            "type": "snapshot",
            "snapshot": {
              "threadId": "proof-terminal",
              "terminalId": "term-1",
              "cwd": "<workspace>",
              "worktreePath": null,
              "status": "running",
              "pid": 52117,
              "history": "",
              "exitCode": null,
              "exitSignal": null,
              "label": "Terminal 1",
              "updatedAt": "2026-11-12T22:15:11.393Z",
              "sequence": 1,
              "cols": 100,
              "rows": 30
            }
          }
        ]
      }
    },
    {
      "step": "Run seq 1 100000",
      "response": {
        "_tag": "Exit",
        "requestId": "4",
        "exit": {
          "_tag": "Success",
          "value": null
        }
      }
    },
    {
      "step": "Withhold ACKs, observe stalled delivery, then resume",
      "chunksWithoutAck": 8,
      "outputEventsWhilePaused": 8,
      "additionalEventsDuringSecondObservation": 0
    },
    {
      "step": "Output received",
      "outputEvents": 406,
      "outputBytes": 689187,
      "containsFinalNumber": true,
      "containsCompletionMarker": true,
      "tail": "\r\n99994\r\n99995\r\n99996\r\n99997\r\n99998\r\n99999\r\n100000\r\n\r\nDONE_SEQUENCE\r\n\u001b[?2004h\u001b[32m[(no branch)]\u001b[0m:\u001b[34m<workspace>\u001b[0m$ "
    },
    {
      "step": "Inspect complete numeric output",
      "numericLines": 100000,
      "allNumbersInOrder": true
    }
  ]
}