The CTO view · TrustedRouter Field Manual
Leadership

The CTO view

History, velocity, risk register, and a 30/60/90-day plan.

Video 13 The CTO view · Timeline, velocity, team, codebase health, risks and the 30/60/90 plan.

Snapshot taken 2026-10-19 at main @ 778120494. Everything here comes from read-only git / gh queries and repository docs. No production system was touched. Raw numbers: 11-stats.json.

TL;DR

  • Age: 5.5 months. The first commit, "TrustedRouter alpha control plane", landed 2026-05-03. The project dropped its alpha label the same day.
  • Scale: 3,213 commits, 1,711 merged PRs, ~194k LOC of Python in src/, ~343k LOC of Python tests, a ~20k LOC Go fast-path service and a set of TLA+ proofs. It runs live on three clouds (GCP primary, plus AWS and Azure as standalone deployments).
  • Team: effectively one founder-engineer (Joseph Perla, 76% of commits). He drives a fleet of AI coding agents: 741 merged PRs come from codex/* branches and 51 from fable/*. A second human (Jasmine Lee, front-end/site work) joined in September 2026. A pricing bot makes 17% of all commits.
  • Velocity: about 600 commits and about 400 merged PRs a month, with commits spread across all 24 hours. That is agent-paced, not human-paced.
  • Biggest risks: bus factor of 1. Money-path complexity (async settle "shadow v2", 110 source files and ~26k LOC of evidence machinery). Spanner contention, the source of most incidents. A large multi-cloud cost footprint for a single operator.
  • Moat: hardware attestation (Confidential Space / Nitro / SEV-SNP) plus public BUSL source. Anyone can verify that the running binary matches the repo.

1. Timeline

Dates are inferred from commit messages and the history of key files.

timeline
    title TrustedRouter (quill-router) — 2026
    May 2026 : 05-03 First commit, production the same day (GCP Cloud Run + Confidential Space gateway, Spanner ledger, BYOK, OAuth, MetaMask sign-in)
             : 05-07 Auto-deploy to Cloud Run on push to main
             : 05-09/10 Multi-region Stage 0 (nam6 Spanner, us-east4, Bigtable), AWS Nitro image-fetch, Cloudflare LB
             : 05-11 Provider wave (Parasail, Lightning AI, GMI) and hourly price-refresh bot
    Jun 2026 : 06-22 x402 stablecoin funding
             : Chat playground and SEO model pages
    Jul 2026 : 07-03 Relicense Apache-2.0 → BUSL-1.1 (TrustedOS page the same day)
             : 07-03 Durable settle outbox design
             : 07-26 Storage ports, conformance suite, ClickHouse analytics proof
    Aug 2026 : 08-05/06 AWS (Nitro + Fargate) and Azure (SEV-SNP + Container Apps) own control planes live
             : ClickHouse 3-zone replicated cluster, Parquet archive, rollups
             : Peak month — 833 commits, 575 merged PRs
    Sep 2026 : 09-05..09-26 Spanner incident cluster (CPU, shard contention, grant storm)
             : 09-11 Enterprise Token Exchange launch; 09-20 regional Token Exchange sites
             : 09-14 LightningRouter (BTC Lightning USD funding, isolated infra)
             : 09-21 Polyphemus catalog / selector billing
             : Jasmine Lee joins (site and design)
    Oct 2026 : 10-03 Fast admission + batched settlement design approved (Go fastpath, TLA+)
             : 10-10..10-18 Async-settle shadow incidents; shadow v2 evidence policy (10-11)
             : 10-18 Bedrock provider merged
             : 10-19 Shadow v2 opt-in pins for probe workspace (design §15.8 step 5)
Diagram source
timeline
    title TrustedRouter (quill-router) — 2026
    May 2026 : 05-03 First commit, production the same day (GCP Cloud Run + Confidential Space gateway, Spanner ledger, BYOK, OAuth, MetaMask sign-in)
             : 05-07 Auto-deploy to Cloud Run on push to main
             : 05-09/10 Multi-region Stage 0 (nam6 Spanner, us-east4, Bigtable), AWS Nitro image-fetch, Cloudflare LB
             : 05-11 Provider wave (Parasail, Lightning AI, GMI) and hourly price-refresh bot
    Jun 2026 : 06-22 x402 stablecoin funding
             : Chat playground and SEO model pages
    Jul 2026 : 07-03 Relicense Apache-2.0 → BUSL-1.1 (TrustedOS page the same day)
             : 07-03 Durable settle outbox design
             : 07-26 Storage ports, conformance suite, ClickHouse analytics proof
    Aug 2026 : 08-05/06 AWS (Nitro + Fargate) and Azure (SEV-SNP + Container Apps) own control planes live
             : ClickHouse 3-zone replicated cluster, Parquet archive, rollups
             : Peak month — 833 commits, 575 merged PRs
    Sep 2026 : 09-05..09-26 Spanner incident cluster (CPU, shard contention, grant storm)
             : 09-11 Enterprise Token Exchange launch; 09-20 regional Token Exchange sites
             : 09-14 LightningRouter (BTC Lightning USD funding, isolated infra)
             : 09-21 Polyphemus catalog / selector billing
             : Jasmine Lee joins (site and design)
    Oct 2026 : 10-03 Fast admission + batched settlement design approved (Go fastpath, TLA+)
             : 10-10..10-18 Async-settle shadow incidents; shadow v2 evidence policy (10-11)
             : 10-18 Bedrock provider merged
             : 10-19 Shadow v2 opt-in pins for probe workspace (design §15.8 step 5)

Milestone table

Date Milestone Evidence
2026-05-03 First commit; "Drop alpha framing — TrustedRouter is production now" a0e42330c
2026-05-07 GitHub Actions auto-deploys the control plane to Cloud Run commit log
2026-05-09 Multi-region Stage 0: nam6 Spanner, Bigtable, us-east4 commit log
2026-06-22 x402 stablecoin funding commit log
2026-07-03 Relicense to BUSL-1.1. Earlier code stays Apache-2.0; each version converts to Apache-2.0 after 4 years 8155ac666, README
2026-07-26 Storage behind ports, conformance suite, ClickHouse proof (#288/#289) commit log
2026-08-06 AWS and Azure control-plane independence live docs/storage-portability/HANDOFF.md
2026-09-11 Enterprise Token Exchange (#1163) commit log
2026-09-14 LightningRouter (#1175) commit log
2026-10-03 Fast admission / batched settlement design approved (v25), with TLA+ specs docs/design/fast-admission-and-batched-settlement.md
2026-10-11 Async settle shadow evidence policy v2 docs/design/async-settle-shadow-v2.md
2026-10-19 Shadow v2 §15.8 step 5 deployed (#1853) HEAD

2. Velocity

xychart-beta
    title "Commits per month (Oct = through the 19th)"
    x-axis ["May", "Jun", "Jul", "Aug", "Sep", "Oct*"]
    y-axis "Commits" 0 --> 900
    bar [401, 424, 395, 833, 555, 605]
    line [6, 79, 251, 575, 415, 385]
Diagram source
xychart-beta
    title "Commits per month (Oct = through the 19th)"
    x-axis ["May", "Jun", "Jul", "Aug", "Sep", "Oct*"]
    y-axis "Commits" 0 --> 900
    bar [401, 424, 395, 833, 555, 605]
    line [6, 79, 251, 575, 415, 385]

Bars show commits. The line shows merged PRs.

Month Commits Merged PRs Joseph Pricing bot Jasmine Dependabot
2026-05 401 6 206 195 – –
2026-06 424 79 378 46 – –
2026-07 395 251 348 47 – –
2026-08 833 575 651 171 – 11
2026-09 555 415 449 62 42 2
2026-10* 605 385 417 22 166 –

Observations: - The workflow moved from direct pushes (May) to a PR-per-change workflow (July onward). Only 191 merge commits exist; most PRs are squash-merged. - October is on pace for about 1,000 commits, the highest month yet: 207 commits in the last 7 days. - Commit hours: every hour from 00:00 to 23:00 local time has 47 to 190 commits. Agents work around the clock and the founder reviews and merges. - Active days: 166 of 170 calendar days.


3. Team and contributors

Contributor Commits Share Role
Joseph Perla 2,449 76.2% Founder/CEO-CTO. Approves every design ("Joseph selected…", "approved by Joseph"). Default is to deploy what merges
trustedrouter-pricing-bot 543 16.9% Hourly price/catalog refresh. Commits straight to main
Jasmine Lee 208 6.5% Front-end, design, Token Exchange sites, homepage. Two git identities (190 + 18)
dependabot[bot] 13 0.4% Dependency bumps. 10 dependabot PRs sit open, the oldest from 2026-08-31

AI agents as a workforce. Merged-PR branch prefixes: codex/ 741, fix/ 114, fastpath/ 80, fable/ 51, feat/ 39, async-settle/ 36. Design docs record adversarial review rounds by "Codex and Fable". AGENTS.md is written for agents first. In practice the engineering org is one human architect plus several agent reviewers and implementers.

Bus factor: 1. Joseph is the sole approver of money-path design, the holder of production credentials (README points at his local key file), and the author of 76% of the code. Jasmine's work stays mostly within sites/, the homepage and templates.


4. Codebase size and health

LOC by language (tracked files, wc -l)

Language LOC Notes
Python 618,435 tests 343k · src 194k · scripts 60k · clickhouse 9k · experiments 7k · proofs 3k
JSON 270,072 Mostly provider catalogs (92 provider files) plus OpenRouter snapshot
Markdown 57,641 46 design docs, 25 incident reports, runbooks
Go 54,518 fastpath/ (fast admission). 19.7k src / 34.8k tests
HTML (Jinja) 25,356 Server-rendered console and marketing
Shell 23,685 Deploy/rollout (scripts/deploy/rollout.sh is config-as-code)
JavaScript / TS / CSS 17.6k / 4.3k / 15.2k Frontend, e2e (Playwright)
Terraform / SQL 1.9k / 1.9k infra/ (Spanner, Cloud Armor, LB)

Tracked files: 3,814. Workflows: 28. TLA+ models in proofs/ (AuditorCommit, AutoRefillHandoff, and others).

Test-to-code ratio

  • Python: 1.77 lines of test per line of source (886 test files vs 533 source files).
  • Go: 1.77 to 1 as well.
  • CI gates: ruff check, mypy (strict gate), pytest with at least 70% coverage, plus conformance suites against memory, Postgres and Spanner-PG, and a sharded proof_oracle differential suite (more than 1 hour).

Largest source modules

File LOC Smell
storage_postgres.py 7,869 One backend implements a ~97-method Store Protocol
storage_gcp.py 7,406 Spanner backend. 3rd most churned file
dashboard.py 6,590 UI god-module. Churned in 141 commits in 90 days
routes/internal/gateway.py 6,062 The hot path (authorize/settle). Churned in 141 commits in 90 days
catalog_data.py 4,456 Catalog logic and data
storage.py 4,103 STORE module-global proxy (issue #333)
routes/public.py 3,727
synthetic/probes.py 3,341

Async-settle footprint: 110 files and ~25.9k LOC in src/ matching async_settle*, most of it async_settle_shadow_v2_* evidence, gate and certificate machinery. That is about 13% of all source code, spent proving a settlement change that is still in shadow.

Hot files (last 90 days)

All authors: the top 30 are all catalog JSON (openrouter_snapshot.json 303 commits, each provider_models/*.json about 250 to 300), driven by the hourly pricing bot.

Humans and agents, non-test:

File Commits (90d)
routes/internal/gateway.py 141
dashboard.py 141
storage_gcp.py 140
config.py 134
scripts/deploy/rollout.sh 119
static/og/providers/manifest.json 112
storage_postgres.py 105
routes/public.py 102
catalog_data.py 100
storage.py 96
store_protocol.py 77
.github/workflows/deploy.yml 68

Reading: churn concentrates in the money/hot path (gateway, storage) and in config/deploy. Those are the highest-risk files and also the most edited.


5. Open work

38 open PRs (12 drafts). Themes: - New providers / catalog (about 12): Hixtube, Regolo, CoralBricks, NextBit EU, Verda, Redpill/Meta/General Compute/Infomaniak, Poolside, Fortanix-on-Azure. - Routing correctness: context-window-aware routing (#1800); tool/response_format capability filtering (#1798). - Money path / async settlement: regional Bigtable settlement journal (#1403, dormant), stage C/D admission (#1296, #1055), idempotent-replay key-hold leak (#1239), fastpath renewal-lock release (#1844). - Infra: control LB URL map into Terraform (#1862). - Dependabot backlog: 10 PRs, the oldest from 2026-08-31 (actions/checkout 4→7, setup-gcloud 2→3, psycopg, google-cloud-storage 3.x).

30 open issues (only 15 were ever closed through Issues; most work is tracked in PRs and design docs). Notable: - #402 _client_ip trusts the first X-Forwarded-For. Spoofable rate-limit identity (open since 2026-08-02). - #334 Spanner is 99.97% garbage: 5.4M dead rows plus 9.4M live rows with no TTL. - #333 Inject the store instead of using the STORE module global (test pollution; once broke 136 tests). - #128 Hot-tenant shard-0 counter-row lock contention (root cause of settle latency). - #850 Deploy pipeline starves under merge pressure (each run defers to a newer main and still reports success). - #1178 Repository security coverage gap. #1720 CI Postgres image rate-limited by ECR. - Freshness alarms left open: #817 ClickHouse archive, #638 AWS-EU analytics drain, #630 client telemetry. - Multi-cloud lag: #1272 retirements not yet promoted to AWS/Azure; #1825 Azure peer-status stall.


6. Incidents (25 write-ups, 2026-09-05 → 2026-10-18)

Cluster Count Examples Pattern
Spanner contention / CPU 7 09-06 operator LIKE searches on tr_entities.body. 09-08 legacy billing shard contention. 09-24 overrun rollup scan. 09-25 credit rebalance convoy. 09-26 regional ledger grant storm (94–96% aborts, authorize p50 0.1 s → 3.7 s fleet-wide). 10-11 commit-latency minute Hot rows, unbounded scans, retry amplification
Async-settle shadow 8 10-10 regional read deadline, SDK reset, shutdown, source revision, Spanner budget. 10-11 budget follow-up. 10-13 missing health alerts. 10-18 settlelog shutdown The evidence/shadow system itself produces incidents
Settlement correctness 3 09-05 shared trace ID blocked multi-call settle. 09-30 provider service-tier settlement. 10-04 starter-credit fragmentation Edge cases in money accounting
Provider / config 3 10-03 provider configuration. 10-05 provider recovery. 10-04 gateway authorization Upstream variance
Platform 4 09-24 us-east4 Cloud Run start stall (33/42 instances failed probes). 10-11 OAuth invalid code → 500. 10-15 one container's Spanner DeadlineExceeded (unresolved). 10-18 fastpath lease lock contention

Write-ups are thorough. They separate confirmed causes from open questions, keep tenant data out, and refuse to overclaim fixes. That is a strong engineering culture. The incident rate, about 1 every 2 days in the last 6 weeks, is the headline concern.


7. Design docs in flight (docs/design/, 46 files)

Program Status Docs
Async settle shadow v2 Amended 2026-10-11 → rounds 2–7. §15.8 activation steps executing (step 5 deployed 10-19) async-settle-shadow-v2*.md (14 files), async-settle-outbox-v1, durable-settle-outbox
Fast admission + batched settlement ("100T tokens/month") Approved v25 → v42+. Go fastpath/ spike, TLA+ model-checked. Pilot and production-rollout docs exist fast-admission-*.md (8 files)
Billing simplification Retire JSON credit ledger, typed counters, dual-system deletion, credit and key-usage row sharding 5 docs
Data/analytics ClickHouse HA, request tagging, provider latency probe
Trust / security BYOK AAD v2 migration (with attestations JSON), trust-tier incremental
Product OAuth scopes and app economy, x402 stablecoin funding, Polyphemus 1.0, model capabilities, company affiliations
Ops Two-cloud rollouts, catalog refreshes, provider retirements

8. Synthesis

Architecture strengths

  1. Verifiable trust boundary. The prompt path (api.trustedrouter.com) terminates TLS inside attested enclaves (GCP Confidential Space, AWS Nitro, Azure SEV-SNP/MAA). The control plane never sees prompts, and the public repo matches the measured image digest. That is a real, demonstrable differentiator.
  2. Storage behind a Protocol, with an executable contract. tests/conformance/ runs memory, Postgres and Spanner-PG. One PostgresStore covers Aurora DSQL, Cosmos/Citus and Spanner-PG.
  3. Multi-cloud as independent deployments. Identity federates but credits do not, which avoids a cross-cloud ledger.
  4. Formal rigor on money. TLA+ specs, differential proof_oracle tests and conformance tests are required for any reserve/settle/refund change.
  5. Ops as code. Env vars live in rollout.sh, Terraform covers Spanner and Cloud Armor, prod smoke runs on every push, and a trust-drift workflow checks the published image.
  6. Analytics separated from OLTP. ClickHouse (3-zone, Keeper, Parquet archive with 7-year retention) offloads Spanner.

Tech debt and risk register

# Risk Likelihood Impact Notes / mitigation
R1 Bus factor = 1 (founder holds design authority, credentials, deploy habit) High Critical Document credential custody, add a second on-call and approver for money code, keep a break-glass runbook
R2 Money-path complexity: two settle systems (legacy + async shadow), 110 shadow files, fastpath in Go High High Freeze new shadow surface area. Set a dated exit criterion to cut over or delete. Cap evidence code
R3 Spanner hot-row contention / retry storms (7 incidents, #128, #334 garbage) High High Land row sharding and the fast-admission leases. Add TTL/GC for dead rows. Enforce bounded-query linting
R4 Ship-on-merge with 400+ PRs/month, mostly agent-authored High High #850 shows the deploy pipeline can report success it did not achieve. Add canary/bake gates and protect money files with CODEOWNERS
R5 Spoofable client IP for rate limits (#402) Medium Medium Trust only the LB-appended XFF hop
R6 Multi-cloud drift (AWS/Azure lag on retirements; Azure peer stall; AWS-EU analytics drain) Medium Medium Single release train across clouds. Per-cloud freshness SLOs
R7 Cost sprawl: Spanner Enterprise Plus nam6 (1k–10k PU autoscale, 5 replica locations), 3-zone ClickHouse ×clouds, Bigtable, enclaves on 3 clouds, Cloudflare Medium High FinOps review. The nam6→nam7 option is documented. Consider whether Azure/AWS traffic justifies always-on footprints
R8 God modules (gateway.py 6k, dashboard.py 6.6k, storage_* 7–8k) with highest churn High Medium Split along the Store Protocol and route boundaries. Fix the STORE global (#333)
R9 Catalog/pricing correctness at scale (92 providers, hourly bot to main, held-price issues #1383, Perplexity fixed-fee #1700) Medium Medium Billing mispricing is direct money loss. Keep the hold-for-review gate
R10 Dependency rot (10 dependabot PRs open since August) Medium Low/Med Batch-merge weekly
R11 Unresolved prod anomalies (10-15 container DeadlineExceeded; EU ClickHouse disconnects #1654) Medium Medium Track to closure
R12 License/legal (BUSL may deter OSS contribution; the claim boundary must stay honest) Low Medium Keep the "never claim" list from founder interview workflow

Cost drivers (qualitative; no billing data was queried)

  • Spanner: Enterprise Plus, nam6 multi-region, 5 replica locations, autoscaled 1,000–10,000 PU (floor raised from 400→600→1,000 after the September CPU incidents). Likely the largest fixed line. Issue #334 says 99.97% of rows are garbage, so storage cost is inflated.
  • ClickHouse: three-zone replicated cluster with 500 GB SSD per replica on GCP, plus per-cloud instances and a GCS Parquet archive.
  • Compute: Cloud Run in several regions with warm minimum instances. Confidential Space VMs. AWS Nitro + Fargate. Azure SEV-SNP + Container Apps.
  • Bigtable (regional quota, analytics legacy) still runs alongside.
  • Upstream inference: pass-through COGS, offset by routing markup.

Strategic bets

  1. Attestation as the moat. The "OpenRouter-compatible, but verifiable" wedge, open BUSL code, nonce-challenged attestation, and the "Attestation is all you need" thesis. Defensible because competitors (OpenRouter, Portkey, Cloudflare AI GW, LiteLLM) cannot easily retrofit an enclave-terminated prompt path.
  2. Confidential/E2EE pools (min_privacy: confidential, fail-closed) and ZDR pools. Privacy is the product, not a feature flag.
  3. Token Exchange (enterprise and regional landing sites). Moves up-market toward a compute marketplace.
  4. Alternative payment rails: x402 stablecoins, Lightning (LightningRouter), Adyen/PayPal/Stripe. These reach agents and crypto-native buyers.
  5. SDK and app ecosystem: JS (@lore-hex/trusted-router) and Python (trusted-router-py) SDKs, "Sign in with TrustedRouter", OAuth scopes and app economy, a one-prompt migration for coding agents.
  6. Scale bet: fast admission and batched settlement designed for 100T tokens/month. This builds for a scale far beyond current load and must be paced against R2.
  7. Breadth: 92 provider catalogs, image/video/TTS/transcription, task models (ScaleDown), Polyphemus.

9. 30/60/90-day plan for a new technical leader

Days 0–30: Learn, stabilize, de-risk the person

  • Read AGENTS.md, docs/storage-portability/HANDOFF.md, docs/spanner-reliability.md, the 25 incident docs, and both in-flight design programs.
  • Run the three CI gates and the conformance suites locally. Shadow one full deploy and one incident.
  • Bus-factor actions: inventory every credential and its owner. Get second-person access to GCP, AWS, Azure, Cloudflare, Stripe and the domain registrars. Write a break-glass runbook.
  • Put money-path files under CODEOWNERS requiring a human approver (gateway, storage, settle, billing).
  • Close the quick security debt: #402 XFF spoofing, #1178. Merge the dependabot backlog.
  • Baseline metrics: incident rate, authorize p50/p99, settle error rate, Spanner CPU and aborts, cloud spend by line item.

Days 31–60: Reduce risk in the money path and the database

  • With Joseph, set a written exit criterion and date for async-settle shadow v2: cut over or delete. Freeze new evidence-machinery surface area.
  • Land row sharding (#128, credit/key-usage sharding designs) and Spanner garbage cleanup with TTL (#334). Target zero Spanner-contention incidents for 30 days.
  • Fix deploy-pipeline honesty (#850) and add a bake/canary stage for gateway changes.
  • Start decomposing gateway.py, dashboard.py and the STORE global (#333) behind the existing Protocol.
  • FinOps pass: Spanner PU floor vs. actual load, ClickHouse sizing per cloud, warm-instance counts, the value of Bigtable after the ClickHouse cutover.

Days 61–90: Scale the team and the bets

  • Hire or contract one senior backend/SRE engineer for the money path and on-call. Set up a two-person on-call rotation.
  • Define the agent-workforce policy: which paths agents may merge unreviewed, and which need human differential review.
  • Decide fast-admission rollout pacing against real traffic growth, not the 100T design ceiling.
  • Publish SLOs per cloud (availability, attestation freshness, analytics freshness) and align AWS/Azure on the same release train.
  • Strategy review with the founder: rank Token Exchange, payment rails, the SDK ecosystem and provider breadth by revenue evidence from the CRM loop, then cut or defer the weakest.

Method notes

  • Commit counts come from git log on main (all history). Merged PR counts come from gh pr list --state merged. Emails are redacted and only names are shown.
  • LOC comes from wc -l on tracked files (no cloc/tokei available), so it includes blank and comment lines.
  • Churn is the number of commits touching a file since 2026-07-21. The "human" view excludes the pricing bot and tests/.
  • Cost statements are qualitative, from repo docs and Terraform. No billing or production data was queried.