{
  "schemaVersion": 1,
  "source": "pipeline",
  "project": "Migrating T3 Code to Rust",
  "updatedAt": "2026-12-06T00:50:07.312Z",
  "repo": {
    "upstream": "pingdotgg/t3code",
    "fork": "OmarAlex24/t3code",
    "branch": "feat/rust-migration",
    "commit": "46846cbb44"
  },
  "current": {
    "phase": "F1",
    "wave": "1B"
  },
  "phases": [
    {
      "id": "F0",
      "status": "done",
      "weight": 5,
      "commit": "67dbd4629f",
      "summary": "Cargo workspace, optional sccache, rust-lld, TypeScript golden fixtures and a migrated statev2.sqlite to test against.",
      "deliverables": [
        {
          "title": "Cargo workspace at rust/",
          "status": "done"
        },
        {
          "title": "Builds with or without sccache",
          "status": "done"
        },
        {
          "title": "Golden fixtures captured from the TypeScript server",
          "status": "done"
        },
        {
          "title": "statev2.sqlite migrated",
          "status": "done"
        }
      ]
    },
    {
      "id": "F1",
      "status": "in_progress",
      "weight": 30,
      "commit": "46846cbb44",
      "summary": "Contracts, shared crypto and pure helpers, and SQLite are ported and passed adversarial review 1A; the WebSocket RPC layer (1B) is next.",
      "waves": [
        {
          "id": "1A",
          "title": "Contracts, shared, SQLite + adversarial review 1A (2 P0, 8 P1 closed)",
          "status": "done",
          "tickets": [
            {
              "id": "F1-01",
              "title": "Branded IDs and base schemas",
              "status": "done",
              "worker": "pi-1",
              "crate": "t3-contracts",
              "golden": {
                "passed": 3338,
                "total": 3338
              },
              "tests": {
                "passed": 29,
                "total": 29
              },
              "commit": "94013dd92f",
              "goldenFixtures": [
                "contracts/base_schemas.json"
              ],
              "telemetry": {
                "engine": "pi",
                "model": "Qwen4-35B-A3B-Splash-DFlash2",
                "thinking": "low",
                "attempts": 1,
                "turns": 57,
                "toolCalls": 61,
                "inputTokens": 86290,
                "outputTokens": 55308,
                "reasoningTokens": 27408,
                "cacheReadTokens": 3265472,
                "promptCacheHitRatio": 0.974,
                "wallSeconds": 1477,
                "circuitBreakerTripped": false
              },
              "escalation": null,
              "rustLinesAdded": 1313
            },
            {
              "id": "F1-02",
              "title": "Relay JWT, desktop tokens, DPoP",
              "status": "done",
              "worker": "pi-2",
              "crate": "t3-shared::crypto",
              "golden": {
                "passed": 177,
                "total": 177
              },
              "tests": {
                "passed": 22,
                "total": 22
              },
              "commit": "1a83c99778",
              "goldenFixtures": [
                "wire/crypto.json"
              ],
              "telemetry": {
                "engine": "pi",
                "model": "Qwen4-35B-A3B-Splash-DFlash2",
                "thinking": "low",
                "attempts": 1,
                "turns": 59,
                "toolCalls": 70,
                "inputTokens": 99495,
                "outputTokens": 60421,
                "reasoningTokens": 35480,
                "cacheReadTokens": 3873504,
                "promptCacheHitRatio": 0.975,
                "wallSeconds": 1674,
                "circuitBreakerTripped": false
              },
              "escalation": null,
              "rustLinesAdded": 1431
            },
            {
              "id": "F1-03",
              "title": "Deduped bodies, ID table, socket frames, changed files, endpoints, atomic write",
              "status": "done",
              "worker": "pi-3",
              "crate": "t3-shared::pure",
              "golden": {
                "passed": 679,
                "total": 679
              },
              "tests": {
                "passed": 14,
                "total": 14
              },
              "commit": "5fd7433f81",
              "goldenFixtures": [
                "wire/shared_pure.json"
              ],
              "telemetry": {
                "engine": "pi",
                "model": "Qwen4-35B-A3B-Splash-DFlash2",
                "thinking": "low",
                "attempts": 1,
                "turns": 94,
                "toolCalls": 104,
                "inputTokens": 162708,
                "outputTokens": 73353,
                "reasoningTokens": 32044,
                "cacheReadTokens": 5392320,
                "promptCacheHitRatio": 0.971,
                "wallSeconds": 1978,
                "circuitBreakerTripped": false
              },
              "escalation": {
                "by": "coordinator",
                "kind": "review-fix",
                "lines": 13,
                "summary": "resolve_symlink_target swallowed every read_link error; now only NotFound/EINVAL mean not-a-link, matching symlink.ts"
              },
              "rustLinesAdded": 1661
            },
            {
              "id": "F1-04",
              "title": "SQLite worker, PRAGMAs, migrator, schema inspection",
              "status": "done",
              "worker": "pi-4",
              "crate": "t3-sqlite",
              "golden": {
                "passed": 379,
                "total": 379
              },
              "tests": {
                "passed": 18,
                "total": 18
              },
              "commit": "d0cf979f14",
              "goldenFixtures": [
                "sqlite/schema_reference.json",
                "sqlite/reference_statev2.sqlite"
              ],
              "telemetry": {
                "engine": "pi",
                "model": "Qwen4-35B-A3B-Splash-DFlash2",
                "thinking": "low",
                "attempts": 1,
                "turns": 35,
                "toolCalls": 44,
                "inputTokens": 46822,
                "outputTokens": 26081,
                "reasoningTokens": 12793,
                "cacheReadTokens": 1046208,
                "promptCacheHitRatio": 0.957,
                "wallSeconds": 850,
                "circuitBreakerTripped": false
              },
              "escalation": null,
              "rustLinesAdded": 839
            },
            {
              "id": "R1A-A",
              "title": "Review 1A fixes: DateTimeUtc V8 parity, newtype ergonomics",
              "status": "done",
              "worker": "pi-1",
              "crate": "t3-contracts",
              "commit": "770e461988",
              "telemetry": {
                "engine": "pi",
                "model": "Qwen4-35B-A3B-Splash-DFlash2",
                "thinking": "low",
                "attempts": 1,
                "turns": 14,
                "toolCalls": 15,
                "inputTokens": 27782,
                "outputTokens": 13642,
                "reasoningTokens": 6184,
                "cacheReadTokens": 274112,
                "promptCacheHitRatio": 0.908,
                "wallSeconds": 389,
                "circuitBreakerTripped": false
              },
              "rustLinesAdded": 233,
              "escalation": {
                "by": "coordinator",
                "kind": "review-fix",
                "lines": 10,
                "summary": "V8 legacy year window (0..99) for date-only + Z, found by a 161k-input differential fuzz against V8"
              }
            },
            {
              "id": "R1A-B",
              "title": "Review 1A fixes: relay JWT typ (P0), DPoP max age, id table -0, atomic write, changed files, endpoints",
              "status": "done",
              "worker": "pi-2",
              "crate": "t3-shared",
              "commit": "46846cbb44",
              "telemetry": {
                "engine": "pi",
                "model": "Qwen4-35B-A3B-Splash-DFlash2",
                "thinking": "low",
                "attempts": 1,
                "turns": 98,
                "toolCalls": 103,
                "inputTokens": 68828,
                "outputTokens": 34522,
                "reasoningTokens": 11565,
                "cacheReadTokens": 3714112,
                "promptCacheHitRatio": 0.982,
                "wallSeconds": 706,
                "circuitBreakerTripped": false
              },
              "rustLinesAdded": 283,
              "escalation": {
                "by": "coordinator",
                "kind": "test-fix",
                "lines": 3,
                "summary": "non-UTF-8 symlink regression test now uses raw 0xFF bytes and a '..' hop; fails on the old lossy implementation"
              }
            },
            {
              "id": "R1A-C",
              "title": "Review 1A fixes: SQLite lookup errors (P0), V2 preview migration reconcile",
              "status": "done",
              "worker": "pi-3",
              "crate": "t3-sqlite",
              "commit": "3528628e20",
              "telemetry": {
                "engine": "pi",
                "model": "Qwen4-35B-A3B-Splash-DFlash2",
                "thinking": "low",
                "attempts": 1,
                "turns": 27,
                "toolCalls": 29,
                "inputTokens": 36181,
                "outputTokens": 15727,
                "reasoningTokens": 5233,
                "cacheReadTokens": 620800,
                "promptCacheHitRatio": 0.945,
                "wallSeconds": 437,
                "circuitBreakerTripped": false
              },
              "rustLinesAdded": 458,
              "escalation": null
            }
          ]
        },
        {
          "id": "1B",
          "title": "RPC framing and contracts",
          "status": "pending",
          "tickets": [
            {
              "id": "F1-05",
              "title": "RPC framing and contracts (Wave 1B)",
              "status": "pending",
              "crate": "t3-rpc"
            }
          ]
        },
        {
          "id": "1C",
          "title": "Server shell",
          "status": "pending",
          "tickets": [
            {
              "id": "F1-06",
              "title": "Server shell (Wave 1C)",
              "status": "pending",
              "crate": "t3-server"
            }
          ]
        }
      ]
    },
    {
      "id": "F2",
      "status": "pending"
    },
    {
      "id": "F3",
      "status": "pending"
    },
    {
      "id": "F4",
      "status": "pending"
    },
    {
      "id": "F5",
      "status": "pending"
    }
  ],
  "workers": [
    {
      "id": "pi-1",
      "model": "Qwen4-35B-A3B",
      "runtime": "pi",
      "accelerator": "Splash DFlash2",
      "local": true,
      "costPerToken": 0
    },
    {
      "id": "pi-2",
      "model": "Qwen4-35B-A3B",
      "runtime": "pi",
      "accelerator": "Splash DFlash2",
      "local": true,
      "costPerToken": 0
    },
    {
      "id": "pi-3",
      "model": "Qwen4-35B-A3B",
      "runtime": "pi",
      "accelerator": "Splash DFlash2",
      "local": true,
      "costPerToken": 0
    },
    {
      "id": "pi-4",
      "model": "Qwen4-35B-A3B",
      "runtime": "pi",
      "accelerator": "Splash DFlash2",
      "local": true,
      "costPerToken": 0
    }
  ],
  "metrics": {
    "rustTests": {
      "passed": 83,
      "total": 83
    },
    "goldenVectors": {
      "passed": 4573,
      "total": 4573
    },
    "localShare": 0.98
  },
  "cadence": {
    "nightlyEveryHours": 3,
    "driftEveryHours": 3,
    "lastNightlyAt": null,
    "lastDriftCheckAt": null,
    "upstreamBehind": null
  },
  "totals": {
    "rustTestsPassing": 83,
    "rustTestBinaries": 7,
    "goldenFixtureFiles": 5,
    "goldenFixtureFilesVerified": 5,
    "goldenCasesVerified": 4573,
    "rustLinesInCrates": 6250,
    "rustLinesByPiWorkers": 6218,
    "rustLinesByCoordinator": 126,
    "piShareOfRustLines": 0.98
  },
  "telemetry": {
    "engine": "pi + Qwen4-35B-A3B (Splash, local)",
    "workers": {
      "F1-01": {
        "attempts": 1,
        "turns": 57,
        "toolCalls": 61,
        "inputTokens": 86290,
        "outputTokens": 55308,
        "cacheReadTokens": 3265472,
        "reasoningTokens": 27408,
        "wallSeconds": 1477,
        "modelMs": 1448059,
        "lastExitCode": 0,
        "cacheHitRatio": 0.974
      },
      "F1-02": {
        "attempts": 1,
        "turns": 59,
        "toolCalls": 70,
        "inputTokens": 99495,
        "outputTokens": 60421,
        "cacheReadTokens": 3873504,
        "reasoningTokens": 35480,
        "wallSeconds": 1674,
        "modelMs": 1640335,
        "lastExitCode": 0,
        "cacheHitRatio": 0.975
      },
      "F1-03": {
        "attempts": 1,
        "turns": 94,
        "toolCalls": 104,
        "inputTokens": 162708,
        "outputTokens": 73353,
        "cacheReadTokens": 5392320,
        "reasoningTokens": 32044,
        "wallSeconds": 1978,
        "modelMs": 1846627,
        "lastExitCode": 0,
        "cacheHitRatio": 0.971
      },
      "F1-04": {
        "attempts": 1,
        "turns": 35,
        "toolCalls": 44,
        "inputTokens": 46822,
        "outputTokens": 26081,
        "cacheReadTokens": 1046208,
        "reasoningTokens": 12793,
        "wallSeconds": 850,
        "modelMs": 827038,
        "lastExitCode": 0,
        "cacheHitRatio": 0.957
      },
      "R1A-A": {
        "attempts": 1,
        "turns": 14,
        "toolCalls": 15,
        "inputTokens": 27782,
        "outputTokens": 13642,
        "cacheReadTokens": 274112,
        "reasoningTokens": 6184,
        "wallSeconds": 389,
        "modelMs": 372973,
        "lastExitCode": 0,
        "cacheHitRatio": 0.908
      },
      "R1A-B": {
        "attempts": 1,
        "turns": 98,
        "toolCalls": 103,
        "inputTokens": 68828,
        "outputTokens": 34522,
        "cacheReadTokens": 3714112,
        "reasoningTokens": 11565,
        "wallSeconds": 706,
        "modelMs": 653889,
        "lastExitCode": 0,
        "cacheHitRatio": 0.982
      },
      "R1A-C": {
        "attempts": 1,
        "turns": 27,
        "toolCalls": 29,
        "inputTokens": 36181,
        "outputTokens": 15727,
        "cacheReadTokens": 620800,
        "reasoningTokens": 5233,
        "wallSeconds": 437,
        "modelMs": 416429,
        "lastExitCode": 0,
        "cacheHitRatio": 0.945
      }
    },
    "passes": {
      "wave-1a": {
        "tickets": 4,
        "attempts": 4,
        "turns": 245,
        "toolCalls": 279,
        "inputTokens": 395315,
        "outputTokens": 215163,
        "reasoningTokens": 107725,
        "cacheReadTokens": 13577504,
        "workerWallSecondsSum": 5979,
        "waveWallSeconds": 1978,
        "circuitBreakerTrips": 0
      },
      "review-1a": {
        "tickets": 3,
        "attempts": 3,
        "turns": 139,
        "toolCalls": 147,
        "inputTokens": 132791,
        "outputTokens": 63891,
        "reasoningTokens": 22982,
        "cacheReadTokens": 4609024,
        "workerWallSecondsSum": 1532,
        "waveWallSeconds": 706,
        "circuitBreakerTrips": 0
      }
    },
    "totals": {
      "tickets": 7,
      "attempts": 7,
      "turns": 384,
      "toolCalls": 426,
      "inputTokens": 528106,
      "outputTokens": 279054,
      "reasoningTokens": 130707,
      "cacheReadTokens": 18186528,
      "workerWallSecondsSum": 7511,
      "waveWallSeconds": 2684,
      "circuitBreakerTrips": 0
    },
    "escalations": [
      {
        "ticket": "F1-03",
        "lines": 13,
        "reason": "review fix (symlink error handling)"
      },
      {
        "ticket": "R1A-A",
        "lines": 10,
        "reason": "V8 legacy year window for date-only + Z"
      },
      {
        "ticket": "R1A-B",
        "lines": 3,
        "reason": "non-UTF-8 symlink test used valid UTF-8"
      }
    ],
    "sccache": {
      "afterCargoCleanFullGate": {
        "compileRequests": 278,
        "executed": 209,
        "cacheHits": 207,
        "cacheMisses": 0,
        "hitRate": 1,
        "cacheSizeMiB": 154
      }
    }
  },
  "review": {
    "id": "adversarial-1a",
    "status": "closed",
    "p0Closed": 2,
    "p1Closed": 8,
    "closedIn": [
      "770e461988",
      "46846cbb44",
      "3528628e20",
      "b25cfebe02",
      "a0bd99f453"
    ]
  },
  "toolchain": {
    "rustc": "1.97.1",
    "linker": "rust-lld (rustc default on x86_64-unknown-linux-gnu)",
    "rustcWrapper": "optional: sccache via rust/scripts/worker-env.sh when installed (not in rust/.cargo/config.toml)",
    "parallelWorkers": {
      "max": 4,
      "cargoBuildJobs": 2,
      "sharedSccacheDir": "~/.cache/sccache",
      "privateTargetDirs": "~/.cache/t3-rust-target/<lane>"
    }
  }
}
