Experiential Labs platform · final report · 2026-11-22 · PR #2980 open, not merged · nothing in staging or production
Platform Data Plan
The Platform Data Plan is twenty decisions, D1 to D20, about where the platform keeps its data and how it keeps serving when a store fails. It covers observability, the wallet, capture, retention, the Helicone move and Postgres restarts. All twenty are built, in one pull request, and tested on a preview environment. This page reports what was built, how it was tested, how it ships, and which decisions are still yours.
The in-depth analysis, every measurement and the reasoning behind each design live in the companion page, observability-architecture.html (for example its "Adversarial performance rounds" section). This page is the summary you act on.
CloudflareMemoryDBPostgresClickHouseS3
Summary
Where it stands
One pull request. Everything is in GitHub #2980, branch obs-data-plan, head 79479dfd80 (round 12). At 16fa66ead2 (2026-11-22, 21:55 UTC) it changed 1,453 files against main, added about 241,600 lines and added 72 Postgres migrations.
Not merged. It carries the do-not-merge label until you approve it. Nothing of it runs in staging or production.
CI. Every check passed on f7cd3b5bbe (31 checks). The later heads pass every check that has finished; on 79479dfd80 CI is still finishing, with the integration tests last. GitHub reports #2980 as mergeable with main.
What the preview proved. The preview ran #2980's code and migrations, but it deployed them with main's deploy layout, because the isolated preview controller and its deploy script always come from main. Most results stand: of 172 claim rows audited, 103 still hold, 46 were not yet proven on the PR's layout when audited, and 23 held only because of a step applied by hand. Not yet proven: the background units, the dashboard edge, the writeback app and queue-age autoscaling; the Helicone webhook worker and the separate Helicone response cache; direct announce latency; and the 3,900 s gateway startup budget. Upload processing on the control plane, also unproven at audit time, has since been verified on the preview (round 12). See What the preview could not test and card 38.
Your decisions. 26 cards need your call, one is partial, and 4 need a confirmation. They are under Decisions, "Your call" first.
Headline results
Each number below was measured, either on the preview or on a local copy of the stack, as marked. The full table is under Proof.
0 errorson 3,060 requests while Postgres restarted 11 times and was unreachable 459 of 615 s. Money exact. (preview) Needed a manual step The requests ran on the stand-in model lane, whose server, ingress, certificate, network policies and secrets were applied by hand with kubectl and aws.
Exactly onceA gateway worker force-killed in a 90 s wallet outage: 3,766 attempts, 3,766 settle receipts, the spool drained within 7 s of recovery. (preview) Needed a manual step The calls ran on the hand-built stand-in model lane.
20 ms to 11 msmedian gateway latency compared with main, because the per-request Postgres reads are gone. A 5 MB prompt: 31 s to about 150 ms. (local)
405 to 4,802 spans/scapture pipeline throughput on one ClickHouse CPU (11.9x). Ingest reaches 13,146 spans/s on three control servers. (local; preview) Needed a manual step The control plane was scaled to three servers by hand.
2.8 s to 0.1 s30-day text search over 50 million requests in one org: 100 to 210 ms on 1 thread, 46 to 93 ms on 4. (local)
35 min to 21 stime until a live prompt is searchable under 120 req/s of load (10 of 10 checks). (preview) Not yet proven on the PR's layout The usage export ran inside the control servers, not in the PR's background unit.
Why we built this
One Postgres database did every job. It held the money history, the catalog, accounts, capture pointers, audit and analytics-shaped tables, 1,336 GB in all. Every customer request also read it. So any heavy job on that database became an API outage for everyone. The incidents of November 5, 9, 10, 11, 12 and 13 all trace back to pressure on it.
Other flaws made this worse. Capture refused customer requests when storing a copy was slow (up to about 24,000 an hour on November 5). Big tables had no lifetime. Queues retried forever, so failures stayed hidden. The table below lists each flaw, its evidence and the decision that removes it.
Flaw
Evidence
What we learn
Removed by
One Postgres does every job
A 1,336 GB database holds money history, catalog, auth, capture pointers, audit and analytics-shaped tables. The incidents of November 5, 9, 10, 11, 12 and 13 all trace back to pressure on this one database: vacuum, a heavy query, connection exhaustion and row-lock convoys.
A shared database turns any heavy job into everyone's outage. Isolation has to be designed in; tuning cannot add it later.
D1, D3, D4, D5
Hidden synchronous dependencies
The capture buffer waited on a Supabase Storage upload, which commits a Postgres row. Every request checked the model chain in Postgres. last_used is throttled to once a minute per key, but the update still runs inline on the request thread. Readiness pinged Postgres. Promotion grants and plan caps still read Postgres on every request.
A dependency nobody drew on the diagram is the one that takes production down. Every request-path call has to be listed and justified.
D1, D2
Tables with no lifetime
None of these has retention: audit_log (311 GB), gateway_attempts (238 GB) and chain receipts (67 GB). storage.objects carried 10.7 million dead rows.
Unbounded tables slow every vacuum, scan and restart until one of them tips over.
D3
Reads that sum raw rows while someone waits
Admin Telemetry scanned every organization's raw ClickHouse events with FINAL and timed out. Admin directory pages took 8 s summing ledger tables. Model pages made 22 to 24 database calls each.
The rule "read a rollup, never the raw window" existed, but it was enforced only for tenant usage reads. A rule that is not enforced everywhere decays.
D4, D5
Queues without a shelf or an age alarm
Hundreds of captures were stuck in metadata_pending from November 6 and retried forever, with backoff capped at 5 minutes. One bad ClickHouse outbox row could freeze Spend. An appeal pipeline was dead for 9 days before anyone noticed. Wallet drift is logged, not paged.
Retry-forever hides failures. The signal that matters is the age of the oldest item.
D9
Fail-closed side jobs
Capture refused customer requests because storing a copy was slow: up to about 24,000 an hour on November 5, and 123 requests from 76 organizations on November 9.
A side job may refuse a customer only when a stronger written promise requires it.
D2
Limits per process, load per fleet
30 control-plane pods used up the pooler's 225 sessions. The autoscaler watched idle CPU while requests queued for 18 s. One busy organization fell 17 to 55 minutes behind on a shared receipt stream.
Budgets must be fleet-wide and checked before a deploy. Isolation must be per organization wherever one tenant can saturate a shared path.
D6, D11
Shared deploy units
One edge app serves both /v1 and the dashboard. The ledger writeback has run as its own Deployment since November 11, but it still shares the control-plane app's configuration, release and rollback.
Things that fail differently should deploy separately.
D11
Release and repository process carried by people
Merge holds were coordinated by chat. Recovery broke when main moved. 3,900 stale manual CI jobs broke a listing. On November 10 there were 144 open merge requests, and 66 of them had already landed. Migration versions collided.
Process that depends on everyone remembering fails at the busiest moment. Automate the guard, or remove the need for it.
D17
Built but never switched on
The S3 and SQS Terraform was merged but never applied. A capture mirror had never run. A Fargate capture service was built and left at zero tasks.
A merge is not a launch.
Principle 7, D17
Monitoring that missed money
Writeback lag had no alert until November 11, and wallet drift still has none.
Monitor what money depends on as closely as the API.
D6, D9
A dependency crash that only a real restart showsupdated 2026-11-18
In the first preview restart rehearsal (2026-11-18), every psycopg-based Python service (gateway worker, control plane, capture ETL, project worker) segfaulted about 5 s after Postgres came back, in both runs. A 41 s outage became 65 to 88 s of customer errors, and the restarting fleet hit the database a second time. The cause was psycopg 3.3.4 crashing when the Supavisor pooler greets a client without connection settings. Unit tests and outage tests that pointed the pool at a dead port never showed it. Fixed by upgrading to psycopg 3.3.8 in #3046, live in production since 15:58Z on 2026-11-18.
A failure path that only runs during a real outage has to be exercised by a real outage. Simulated failures test our code, not our dependencies.
D16 (rehearsed restarts)
Secrets in chat
The Supabase JWT secret, Cloudflare tokens and R2 keys were exposed in conversations on November 10, and a GitLab token needs rotation.
Credentials need a path that never passes through a chat.
D18
The rules the design follows
Every decision follows from these seven rules. If a future change is unclear, apply them first.
A customer request waits only on the provider and one fast, durable store. No Postgres read or write, no object upload and no analytics query sits on the request path. Everything else happens afterwards, from a durable queue. The few flows that still touch Postgres are listed by name in D1.
Each store does one job. MemoryDB holds live money, limits and blocks. Postgres holds the permanent record of money, accounts, keys and configuration. ClickHouse answers every list, total, trace and search. S3 holds bodies and media. A read has one home.
Every handoff uses one outbox primitive. Each item has an idempotent receiver, a parked state, a replay command and an alarm on the age of its oldest item. Nothing retries forever, and nothing is lost without being counted.
Every wait is bounded, and every shed is visible. Reads have a deadline, pools have a size, queues and streams have a memory budget, and recovery is paced with jitter. Every refusal and every dropped capture is counted. Scaling follows the real bottleneck (queue age, database wait), not CPU.
Tables have a lifetime, and data has an erasure path. Every table gets a retention rule on the day it is created. Every copy of customer content, including derived data such as search text, spans and tag scores, is reachable by one erasure job.
Money fails closed, and side jobs fail open. A request that cannot be priced and limited correctly is refused. A request whose only problem is that a copy cannot be stored is served, and the loss is counted.
Built is not live. A change is done when production shows it working: the resource exists, the switch is on, the metric moved. Every plan item ends with a production check.
What we built
The system in brief
Customers send model requests to our gateway on /v1, using the OpenAI and Anthropic APIs. Cloudflare sits in front of it. For each request the gateway checks the API key, takes a hold on the organization's balance, calls the model provider, settles the charge and records the request. People and agents read that record through the dashboard (a web app and a control plane API).
The platform uses four stores, and after this plan each does one job:
MemoryDB (AWS's durable Valkey service) is the live wallet: balances, holds, limits and blocks.
Postgres (Supabase) is the permanent record of money, accounts, keys and configuration.
ClickHouse is the analytics database. It answers every list, chart, trace and search.
S3 holds request bodies and media.
The diagram shows the system as built in #2980. Solid arrows are writes or requests. Dotted arrows are reads.
flowchart LR
subgraph Callers
APP["Customer apps and agents OpenAI, Anthropic SDKs trace fields in headers"]
HEL["Helicone customers, unchanged oai/anthropic/gateway/ai-gateway .helicone.ai hosts and SDKs"]
OTEL["Agent frameworks OpenTelemetry, Langfuse SDKs"]
PEOPLE["People: Requests, sessions, traces, Quality, Settings"]
AGENT["Agents debugging API, explabs-traces CLI, MCP"]
end
CF["Cloudflare our hosts and Helicone's US hosts"]
APP --> CF
HEL --> CF
OTEL --> CF
PEOPLE --> CF
AGENT --> CF
subgraph Serving["Serving (EKS)"]
EV1["/v1 edge Helicone host routing, target allowlist, EU stays on Helicone"]
GW["Gateway workers key snapshot, chain, catalog, Helicone key index in memory"]
end
subgraph Dashboard["Dashboard (EKS)"]
EDB["Dashboard /api edge span ingest relay"]
WEB["Web app"]
CTL["Control plane deadline-bounded DB pool"]
end
subgraph Workers["Workers (EKS, scaled on queue age)"]
WB["Ledger writeback"]
TAGW["Trace tags worker"]
DSW["Dataset runs"]
HWH["Helicone webhooks"]
JOBS["Jobs: partitions, retention sweep"]
end
CF --> EV1 --> GW
CF --> WEB --> EDB --> CTL
CF --> EDB
GW -->|"dispatch"| PROV["Providers and our GPUs"]
GW <-->|"deny set, limits, holds, settles"| MDB[("MemoryDB wallet, 64 slots, deny facts")]
GW <-->|"{hc:* only"| HC[("Helicone response cache same cluster, scoped user")]
GW -->|"disk segments, every 2 s or 16 MiB"| RAW[("S3 raw, 7 days")]
CTL -->|"span batches"| RAW
RAW -->|"segment event"| Q[["SQS + DLQ"]]
Q --> ETL["Capture ETL on Fargate live erasure epoch, per-org KMS key, dedupe in org, tool spans"]
ETL --> OBS[("S3 observability one object per request")]
ETL -->|"batched inserts"| CHW[("ClickHouse write compute requests, spans, sessions, request_text, rollups")]
ETL -->|"tag jobs"| TQ[["Tag queue"]] --> TAGW
TAGW -->|"judge via org's system key"| EV1
TAGW --> CHW
DSW -->|"runs via /v1"| EV1
MDB -->|"receipts, 72 streams"| WB
WB --> PG[("Postgres primary money, keys, config; partitioned copies, 120-day window")]
PG -->|"credit feed, deny facts"| MDB
PG -->|"usage outbox"| CHW
PG -.->|"replication"| REP[("Read replica")]
CHW -.-> CHR[("ClickHouse read compute")]
CTL -.->|"lists, sessions, traces, search, trace SQL"| CHR
CTL -.->|"allowlisted dashboard reads"| REP
CTL -.->|"writes, everything else"| PG
CTL -.->|"one body after authorization"| OBS
JOBS --> PG
JOBS -.->|"expiry and erasure"| OBS
HWH -->|"signed webhooks"| EXT["Customer endpoints"]
As built in PR #2980, which is not merged. For a known key on a plain model chain, the request path ends at MemoryDB and the in-memory raw segment, and touches neither Postgres nor ClickHouse. It still touches Postgres in five named cases (D1): protected model chains outside a planned maintenance window (about 52% of production traffic), Responses continuations the outage cache does not hold, keys a worker first sees during a Postgres outage, pods starting during an outage, and new blocks during an outage. A block such as a quarantine, ban or revoked key reaches MemoryDB through the same feed as credits, and the wallet script enforces it.
Store
Holds
Never holds
MemoryDB
Live balances, holds, spend caps, promotion credit and its period baseline, plan allotment counters, rate-limit counters, the deny set (quarantine, ban, spend lock, revoked keys), and receipts in transit
History, bodies, configuration
Postgres primary
The permanent money record, receipt dedupe keys (never expired), accounts, organizations, keys, permissions, catalog and configuration. Request and attempt rows are kept for 120 days, for settlement, reconciliation and disputes only.
Bodies, customer lists and charts, anything read only in aggregate
Read replica
An allowlist of dashboard and admin read routes
Writes, read-after-write, money or admission reads
ClickHouse
usage_events with session and trace fields, sessions, spans ordered by organization and session, request_text, rollups, spend_facts
Anything that must be transactional with money
S3 raw bucket
Batched capture segments and span batches as written, 7 days, in the deployment's own region
Anything customers read
S3 observability bucket
One object per request at captures/<org>/<day>/<request>, chunks deduplicated within one organization only, encrypted with the organization's own key, retention per organization
Content of zero-data-retention requests; chunks shared between organizations
The rest of this section goes area by area. Each area says what the part is, what we built, which decisions it implements and the key proof. The proof is summarized; Proof has the full tables. "Merged" below means merged into the PR branch, not into main.
The work was done by 14 parallel workstreams, each in its own worktree with fixed file ownership. Each kept a decision log with the reason for every choice, which is in the companion page platform-build-decisions.html, one section per workstream.
1. The request path off Postgres, and restart safety
Implements D1, D16, and the restart parts of D11
What it is. The request path is everything a customer request waits on between arriving at /v1 and getting its answer. Before this plan, it read Postgres on every request: the key check, the model chain, the last_used update, readiness, promotion grants and plan caps. So every Postgres incident became an API incident. A Postgres restart, even a planned one, meant errors for customers.
What we built. The gateway now holds what it needs in memory, and Postgres is read only when something changes.
Keys in memory. API keys, permissions, the catalog, prices, promotions and model-chain revisions live in the gateway's memory. The key snapshot measured 132 bytes per key at 1 million keys, with a 0.8 microsecond lookup. It is delta-polled every 2 s from a trigger-fed change table.
Unknown keys. The first sight of a key costs one database read. Concurrent misses for one key share that read. Unknown keys get a 10 s negative cache, which a key mint clears, and reads are capped at 100 a second per worker.
Model chains. Plain chain revisions read nothing per request. Protected chains (about 52% of production traffic) still write a receipt per request. In an outage they get a retryable 503, unless a planned maintenance window is open.
Smaller moves.last_used is flushed every 60 s, off the request thread. Readiness depends only on the catalog. A failed price or plan read refuses the request; it never switches to the Postgres ledger in mid-flight.
One outage bound. During a Postgres outage, every cache serves for at most 60 minutes. One constant, OUTAGE_SERVE_STALE_SECONDS = 3600 in explabs/outage_bound.py, sets it for every path, and a test fails if a path uses its own number. (On 2026-11-20 the code still used 15 minutes for keys and grants; that is fixed.)
Bounded database calls. Every request-path database call gives up after 0.75 s. One silent call trips the breaker at once. Errors answer 503 with Retry-After. One shared "database did not answer" check counts Supabase's Cloudflare 52x pages and HTML 5xx bodies as an outage, not only PostgREST errors.
Pods during an outage. A pod that starts while Postgres is down waits alive instead of crash-looping. A pod that never served exits within 20 s. Not yet proven on the PR's layout The preview used main's startup check (about 5 minutes), so the 3,900 s budget that lets a pod wait out a 60-minute outage never applied.
Planned maintenance window. An operator opens a 1 to 30 minute window before a restart. Postgres refuses every chain change until it ends, and pods serve protected chains from what they last read. It replaced a MemoryDB "witness" design that was built, reviewed twice and dropped as too complex (nine migrations, an open failure case, a 61-minute release freeze if MemoryDB is lost).
Responses conversations in an outage. Continued conversations (previous_response_id) keep recent state in each worker's memory and, during an outage only, spill to the Helicone cache cluster, then copy into Postgres after. See card 25.
New organizations. A brand-new org's first request gets 2 s and one retry for its first load, and connections idle 30 s or more are checked before use. Before this, about half of new orgs failed their first call.
Pacing after recovery. The write-back after an outage runs at an adaptive, capped rate. Reloads are spread across pods. Outage refusals are recorded after recovery.
What still needs Postgres during an outage. Protected chains outside a window; Responses continuations the cache does not hold; keys a worker first sees during the outage; pods starting during the outage (they wait, not ready); and new blocks (they are written to MemoryDB first, see the wallet area). Reseller keys, video, batches and the first wallet seed of a new organization still read Postgres per request and fail closed, with a clear error.
A crash only a real restart could show. In the first restart rehearsal (2026-11-18), every psycopg-based Python service segfaulted about 5 s after Postgres came back. A 41 s outage became 65 to 88 s of customer errors. The cause was psycopg 3.3.4 crashing when the Supavisor pooler greets a client without connection settings. The upgrade to psycopg 3.3.8 (#3046) has been live in production since 15:58 UTC on 2026-11-18.
Proof.
Median gateway latency dropped from 20 ms on main to 11 ms. CPU per request stayed about the same (about 7 ms). A 5 MB prompt takes about 150 ms instead of 31 s. (local)
Postgres down 10 minutes: 746 errors of 3,956 before, 0 of 3,956 after, money exact. (local)
On the preview, 11 Postgres restarts left it unreachable about 459 of 615 s (longest 74 s): 0 errors on 3,060 requests and on span uploads, money exact (3,285 rows). Needed a manual step The requests ran on the hand-built stand-in model lane.
The restart rehearsals of 2026-11-18 reached 0 errors on known keys through 46 s and 70 s cuts, then through 11 back-to-back restarts with Postgres down 525 of 604 s. Details under Database restarts.
Protected chains, locally (flow 12): 1,527 of 1,527 requests served through a 40 s cut inside a window.
New org's first call: 16 of 30 failed before; 8 of 8 succeeded after, through the real "Create key" route (0.4 to 1.0 s). (preview) Needed a manual step The test orgs were marked verified with hand SQL.
2. The wallet and money
Implements D6, the block half of D1, and the money pages of D9
What it is. The wallet is where the platform keeps each organization's live balance, holds and limits. Before a paid model call, the gateway takes a hold on the balance; after the call, it settles the real charge. The wallet runs in MemoryDB, which acknowledges a write only after its multi-AZ log has it, so it is durable, not a cache. Postgres keeps the permanent record: a ledger writeback copies each settle receipt into it.
Why MemoryDB. We measured three backends with the same wallet logic, from us-west-2: MemoryDB, Cloudflare Durable Objects and celld. All three were correct (0 mismatches in about 4,500 calls, 0 drift under races and faults). MemoryDB was the only one fast enough for the request path: hold p99 3.9 ms, against 396 ms and 45 ms. A hot organization at 500 req/s had p99 8.7 ms, against 6,549 ms (43% refused) and 172 ms. Cost per month: $946, $1,447 and $238. The full table is under D6.
What we built.
64 fixed slots. Organizations are hashed onto 64 slots. Each slot carries its organizations' wallet keys and one receipt stream, so the Lua scripts stay atomic. A directory and forwarding markers support moving an org between slots. One-org moves froze 49 to 97 ms idle and 58 to 225 ms under load. A redesigned move pre-copies while serving, then freezes only the last changes: 28 to 35 ms with about 900 open holds at 100 req/s, 0 refused, 0 drift (the first design froze a busy org for 6.6 s).
Blocks in the wallet. Quarantine, ban, spend lock and revoked keys are enforced inside the reserve script, fed by triggers on every writer, within 10 s even with Postgres down. Operators' block routes write MemoryDB first and Postgres second, every time.
A memory budget. The receipt streams are budgeted at 4.8 GB: a 60-minute outage at 150 req/s with 4,460-byte receipts. MemoryDB runs with noeviction.
A wallet outage is contained per request. If MemoryDB does not answer, platform-funded requests get a fast, retryable 503; money fails closed. A background prober pings MemoryDB every second during an outage, so no customer request is ever the test call. Every wallet, limiter and promotion call is bounded at 0.5 s on its own thread pool.
Readiness and boot do not depend on the wallet. A gateway worker stays in service during a wallet outage, and a worker that starts during one boots and serves everything that does not need the wallet.
Deferred charges. If a charge cannot be recorded within 2 s, the answer goes back to the caller and the charge is retried in the background for up to 5 minutes. The hold taken before the call stays until then, so an org can never overspend, and a retry can never charge twice.
A durable spool for deferred charges. Each deferred charge, and the request's own final record, is also written to a Postgres table. The ledger writeback replays it exactly once if the worker dies. Before, a worker dying in a wallet outage could lose up to 64 charges (about $0.30 to $32). An alarm fires if a saved charge waits over 10 minutes.
Rebuild. A scripted rebuild of the wallet from Postgres, rehearsed: 0 lost writes, 0 drift. 363 unit and Valkey tests.
Proof.
90 s wallet cut on the preview: both workers stayed in service (184 samples, 0 not-ready, 0 restarts). The slowest successful call took 0.36 s. 1,868 calls equal 1,868 records. Needed a manual step Money was counted on the hand-built stand-in model lane.
Forced kill of a worker holding a spooled charge: each attempt was charged exactly once (3,766 attempts, 3,766 settle receipts, 135,576,000 nano-USD; wallet equals Postgres equals what callers were told). The spool emptied under 7 s after recovery. A replacement worker started inside the cut with 0 restarts. (preview) Needed a manual step The calls ran on the hand-built stand-in model lane, and the spool was replayed by main's writeback service inside the control app, not by the PR's separate writeback app.
Wallet errors during cuts are retryable 503s on wallet lanes only, p95 0.34 s. In round 2 they were 429s to every organization, and model listings failed too. (preview)
A managed MemoryDB failover refused every organization for 14.1 s (measured on real MemoryDB). Card 9 asks how many shards to run.
3. The capture pipeline
Implements D2 and D19
What it is. Capture stores a copy of a request's prompt and response, when the organization allows it. That copy powers request previews, search, session views and tag scoring. Before this plan, each capture was a Supabase Storage upload, which writes a Postgres row. So Postgres speed became a customer-facing limit: capture refused up to about 24,000 requests an hour on November 5, and 123 requests from 76 organizations on November 9.
What we built.
Segments, not uploads. Each gateway pod appends captures to a segment file on its own disk. A 64 MiB body costs under 8 MiB of memory. The segment is sealed every 1 s (gateway) or 2 s (control plane), or at 16 MiB, and uploaded to our raw S3 bucket, where it stays 7 days. Every record carries its consent and zero-data-retention verdict.
A full buffer drops the copy, not the customer. The request is still served. Its capture becomes a metadata-only record, counted and alarmed per tier. Only traffic under a written retention contract is refused when its capture cannot be kept.
Two queues. S3 announces gateway segments on the raw queue and span-ingest segments on a separate control queue. Each has its own consumer (8 slots for gateway captures, 2 workers for spans), dead-letter queue and alarms. A listing sweep finds segments a queue missed. The writer can also announce a segment itself (behind a switch), with the S3 notification kept as a backstop.
The capture ETL runs on Fargate. It writes one object per request to the observability bucket, encrypted with the organization's own KMS-wrapped key. Chunks are shared only inside one organization. It writes one ClickHouse insert per segment, with a group commit across workers; span batches are grouped at most 5,000 spans and 4 MiB. It has its own read budget, so it never competes with customers' reads.
Erasure reaches every copy. Each organization has an erasure epoch. The ETL checks it live before decoding, so a segment still in S3, SQS or the dead-letter queue cannot recreate deleted content. One job removes both buckets (old S3 versions included), the dead-letter queue, ClickHouse text, spans, tag scores, session summaries and frozen Helicone webhook payloads. Deleting the org's key makes backups unreadable within 7 days.
Searchable text. The step that makes captured text searchable runs 8 workers with batched writes. A stored request whose usage row exists is inferred at once; otherwise it waits 10 s, doubling. A re-announced segment the ledger already holds is skipped. The in-memory park of span messages is deleted (it only moved the cliff). At the last build report, the raw consumer was being taught to forward control messages that reach the wrong queue.
Sliced rebuilds. Session summaries fold from per-trace parts (ClickHouse migration 0053). A first full rebuild of an existing session runs 500 traces per statement and writes its marker last; the longest statement took 3.3 s, against 103 to 126 s as one statement.
Why. Batched segments take Postgres off the capture path and cut the new S3 and SQS bill from about $3.5k a month to about $0.7k. The two queues exist because one queue let a span backlog block gateway captures: on the preview, none was stored for over an hour.
Proof.
ETL throughput on one ClickHouse CPU: 405 to 4,802 spans/s on an empty table (11.9x), 333 to about 2,100 spans/s with 1.5 million spans stored. The cause was the loader splitting each segment's writes by API key, at about 0.2 s per write. (local)
A live prompt became searchable in under 21 s in 10 of 10 checks under 120 req/s; before the fixes it waited over 35 minutes. (preview) Not yet proven on the PR's layout The search waits on the usage row, and the usage export ran inside the control servers (scaled to three by hand), not in the PR's background unit.
Capture to stored on an idle preview: p50 4.3 s, p95 5.8 s measured. The 1 s seal plus direct announcement is modeled at p95 3.82 s, not yet measured end to end (card 35). Not yet proven on the PR's layout Direct announce never ran on the preview: main's controller sets no announce switch and main's provisioning grants no queue send permission. The measured path is the S3 notification, p95 5.8 s.
No capture was lost in the wallet, ClickHouse and Postgres outage tests. 335 requests waited up to 9 minutes for their pointer while their Postgres row arrived late; all were stored, encrypted. (preview)
715 Python tests, pgTAP 28 of 28, Terraform 4 of 4 per root.
4. Observability storage and reads
Implements D3, D4, D5 and D8
What it is. Every list, chart, session, trace and search in Observability reads ClickHouse. Postgres keeps only point lookups (a key, an org, a setting) and the money record. Before, reads summed raw rows while someone waited: Admin Telemetry timed out scanning every org's events, admin directory pages took 8 s, and model pages made 22 to 24 database calls each.
What we built in ClickHouse.
Requests ordered by organization and time. One spans table ordered by organization, session and time. Session and trace summaries folded from per-trace parts. A request_text table with a token text index for search. Production runs ClickHouse 26.6.1.2455, which meets the search gate (26.2 or later).
No FINAL anywhere: writers keep one row per record. A lint fails on FINAL and on raw aggregation in request-path reads, with no baseline left. The eight older raw-row reads moved onto quarter-hour rollups, equal to the event answers across five time zones and a DST change.
Every customer read carries its organization's quota key, and a test fails any read path without it. Signed-in users also get a per-user read limit. The number of reads one user runs at once is a setting (default 2; production sets 4 once reads have their own compute).
A history import copies each production org's past requests into the new table before it takes over.
What we built in Postgres.
Lifetimes. Monthly partitioned copies of requests, attempts and the audit log are built beside the live tables, with statement-level triggers and a chunked backfill. A month drops only after per-day ClickHouse parity, a 30-day detach hold, and (for audit) a verified S3 export. There are no foreign keys into partitioned tables. Chain receipts stay unpartitioned, because their lookups carry no time. Card D asks whether to replace the copy with a simpler forward-only design.
Read replica routing. An allowlist of read routes, read-your-writes, a 5 s lag fallback capped by rate, then labelled stale reads. No replica exists in any environment yet, so this routing is untested against one.
Bounded access. The control plane's database access carries a deadline header, a 5 s borrow cap and a 503 database_busy. Postgres calls per Requests page dropped from 11 to 14 to 2. 70 pgTAP and 113 Python tests.
Proof.
30-day search over 50 million requests in one org: 2.8 s to 100 to 210 ms on 1 thread, 46 to 93 ms on 4. Search with filters: 3.4 s to 0.45 s. Search inside one trace: 549 to 71 ms. (local)
Requests list with a key filter, 50 million rows: 4.9 s to 0.75 s on 1 thread, 0.26 to 0.35 s on 4. Traces list: 690 ms to 15 ms. (local)
Session summary per write: 2.8 to 3.1 million rows read (21 to 64 s) to about 37,000 rows (p50 330 ms).
History import: 73 to 195 rows/s on the preview to about 10,000 rows/s, so 10 million rows take about 20 minutes instead of about 35 hours.
Request drawer: 14 database calls and 403 ms to 4 calls and 293 ms. (preview)
Earlier, on 5 million requests in one org: first page 47 ms median, cost sort 681 ms, a 5,000-request session 124 ms, search 128 to 543 ms, session list 38 ms.
Still open: the Requests list on a large org. At 1.2 million rows on the busy 1-vCPU preview ClickHouse (2026-11-21) it was over target (p95 2.8 to 9.1 s), and that test has not been re-run since the fixes above. See Known gaps.
5. The Observability and Quality pages
Implements D7, D10 and D20
What it is. Observability is where a customer sees their traffic: each request, the session it belongs to, the agent trace around it, search and usage charts. Quality is where they judge it: tags a judge model scores, human and programmatic scores, review queues and datasets. Customers moved from single calls to agents, so the pages center on sessions and traces, not only on single requests.
What we built.
One Requests table at /observability/requests. Every filter is in the URL. It has frozen-window paging, live rows, saved views, export (CSV or JSONL) and a short preview of what was asked and answered on each row, with a hover card. Red means only that the request failed. Previews never show prompts to read-only admin keys.
Grouping and drill-down. Group by session, prompt or conversation. A session view with a timeline and a conversation tab, built from an NDJSON skeleton in a worker. A trace tree. Org-wide search.
A drawer per request with the stored body, the attempts, a cost breakdown and the reason a request cost nothing. A failed request shows its reason and provider attempts first.
An availability endpoint.GET /api/orgs/{org}/observability/availability tells each page which features have data. A page hides a feature and says why instead of showing an empty column.
Quality. Org-owned tags (up to 32, the decision API's question limit), one judge call per span for all its tags, session tags after 10 quiet minutes, sampling, budgets and webhooks. A scores API (human, programmatic and judge scores), review queues, "add trace to dataset" with JSONL export, and priced dataset runs through the gateway. Judge calls run through a named, system-managed key in the customer's own org that expires every 15 minutes, so the org's data controls apply (card 4).
A calmer top bar. The Requests top bar went from 11 controls on two lines to one row: a view switch, one search with filters, a time range, and the rest in icons and a More menu.
For agents. A trace API, a read-only trace SQL scoped to the caller's org by query rewriting (75 escape attempts refused), a CLI (explabs-traces) and an MCP server. They are not yet installable by customers (card 13).
Proof.
A completeness check on 2026-11-22 matched 40 planned capabilities against the code, the docs (English and Japanese) and the preview. Almost all are built, wired, documented and working. The gaps are listed under Known gaps and card 37.
UX walk on the preview, as owner, member and support admin, in light, dark and phone widths: finding why a request failed went from 5 clicks to 2; tab stops without a visible focus ring went from 4 to 0; export takes 2 clicks, and a 202-line CSV arrived 1.8 s after the click.
Speed: Requests page JavaScript 176 KB to 83 KB gzip. Data controls first data 2.31 s to 1.30 s. Session page 1.57 s to 1.18 s, trace page 1.59 s to 0.70 s, API Keys 1.25 s to 0.55 s (desktop, warm). A failed request's reason on a phone: 1.8 to 3.9 s to 0.81 to 0.84 s.
A 5,000-request session draws in 186 to 228 ms in the browser (1.4 s at 4x slower CPU and 50 Mbit/s); first rows 241 to 410 ms.
Tag starvation guard: with customers asking 100 judge calls a second, our own content review still held 24.0 a second (6.9 without the guard). pgTAP 26 of 26, 170 Python tests for tags; 5,237 Python tests for the trace API, ingest, CLI, MCP, scores and datasets.
6. Ingest: OpenTelemetry, Langfuse and local capture
Implements D7 and the ingest parts of D11
What it is. Gateway traffic is only half the picture. Tool calls and custom steps happen in the customer's own code, which our gateway cannot see. So customers can also send traces directly: by OpenTelemetry (OTLP), or through a Langfuse-compatible endpoint, so an existing Langfuse setup only changes its host. Ingest writes those spans into the same capture pipeline as gateway traffic, and the gateway's own spans add exact tokens, cost and fallback data.
What we built.
POST /v1/traces (OTLP) and /api/public/ingestion plus /api/public/otel/v1/traces (Langfuse). Trace context comes from headers first, then body metadata. Customer session ids are stored raw; cache keys stay hashed. Spans can also be exported to the customer's own Langfuse.
Fair admission per organization at the edge. Each organization gets 8 in-flight ingest requests. Past a 64 budget only organizations below their fair share get in, with a 96 ceiling, and refusals are fast 429 or 503 answers with Retry-After.
The organization comes from an authenticated answer, never a header. The edge has no database credential. It learns which organization a credential belongs to from the worker's answer, carried as an HMAC token under the existing edge-worker signing key. The map is capped at 200,000 entries and forgets an entry after 10 minutes. Random keys go into their own 10,000-entry table, so a flood cannot evict real organizations.
Cold start. Requests of a new key wait up to 250 ms for its first answer instead of being refused: 480 of 480 succeed, against 8 of 480 before. (local)
Cheaper writes. Langfuse scores are one ClickHouse write per batch; they were one insert each, about 250 ms, inside the request. The control plane caps in-flight ingest per process at 32 (64 for a quiet organization).
Storage-off organizations. Their traces keep structure and timing with no text.
Proof.
At 50 requests a second, span ingest p50 went from 13.9 s to 0.48 s. At 4x overload, goodput stayed at capacity (46.4 req/s, against 24.3) with no client timeouts (6,861 before). (preview) Not yet proven on the PR's layout Ingest went through main's shared /v1 edge and control servers that also ran the background work.
During another organization's flood, quiet organizations went from 34% 503s to none (p95 22.3 s to 1.34 s). (preview) Not yet proven on the PR's layout Measured on main's shared /v1 edge, not on the PR's dashboard edge, which carries ingest in the PR's layout.
One control server tops out at about 3,500 to 4,000 spans/s. Three reach 13,146 spans/s (3.3x). A 10-minute run at 120 req/s on three servers: 9,432 spans/s, p95 0.59 s, 0.5% fast refusals. (preview) Needed a manual step The control plane was scaled from one to three servers by hand (kubectl scale, 15:56 to 16:19 UTC). Not yet proven on the PR's layout Those servers also ran the settle drain and usage export, which the PR moves to the background units.
Local capture reaches Observability (verified in round 12). The "Proxy traffic" button sets up exp capture, a local proxy on the customer's Mac. Its batches, trace uploads and the Langfuse and Braintrust pulls now go through the same span sink as OTLP and show up in Sessions and Traces (preview, 79479dfd80). The button is still platform-admin only; its name and who sees it are card 37.
7. Retention and storage controls
Implements D13, D14 and the table lifetimes of D3
What it is. Retention decides how long stored content is kept. Storage controls decide what is stored at all. Customers asked to control their data, and the buyers we want are buying control. Before this plan, three different eligibility checks disagreed about what may be stored.
What we built.
Customer expiry. An organization sets a default expiry, with overrides per key, project or tag, and a keep flag per session or request. The sweep re-reads the settings at delete time. Settings > Data controls shows retention, and the request drawer has Keep.
One eligibility verdict, with SQL and Python twins, moved into every reader. A consent record exists for every surface.
Tighten-only controls. Each key can follow the org or store nothing. Each request can store less through X-Explabs-Storage, never more. An unknown header value is refused with an error that names the valid values (it used to store nothing silently). Internal Clef keys store nothing. Uncensored models follow the live privacy policy.
An opt-in archive for our own use, behind a switch that is off. It excludes own-key, connected-plan, zero-data-retention, private-mode, Helicone and fixed-retention organizations, and erasure reaches it.
Postgres lifetimes. Requests and attempts are kept 120 days (the card-dispute lookback), the audit log 13 months in Postgres then exported to S3, and chain receipts 30 days. Receipt dedupe keys are never expired.
Waiting. Storing media (images, speech, transcription, video, embeddings) and Decisions content needs an engine release: engine PR experiential#1412 is open, not merged or released (card 12). The free-plan expiry switch waits on card 3. The archive opt-in is not yet in the customer docs.
Proof. In the security retest, do-not-store keys and per-request storage headers stored nothing, and a canary in a storage-off org's spans never reached trace SQL. 42 unit and 7 browser tests for the settings pages.
8. The Helicone move
Implements D12
What it is. We own Helicone (owner, November 16). The goal is that Helicone customers change nothing: same hosts, keys, headers, SDKs and API. Our gateway answers Helicone's hostnames behind Helicone's own DNS. One system of record keeps support and billing simple. Moving their data needs their contracts, so the data copy and the DNS switch wait for legal.
What we built.
Every Helicone host is routed in Helicone's own order. Anything we do not serve yet is relayed unchanged to Helicone, so nothing breaks while we catch up. EU hosts stay on Helicone's EU stack.
The target URL is picked from a provider allowlist only, so it cannot be used to reach internal servers. Only peppered hashes of Helicone keys are copied. A provider key sent on one request is used for that call only and never reaches captures, the raw bucket, the dead-letter queue or logs (tested through the real middleware).
All 51 Helicone headers have a decision, checked against Helicone's source. Moderation, LLM-security and token-limit headers are enforced; the differences from Helicone are listed under D12. Headers we do not serve are named in X-Explabs-Ignored-Headers, never dropped silently.
Helicone's REST queries work against our API, plus a sessions API Helicone never had. All 49 REST handlers were moved off the control plane's event loop: one slow key used to make a fast request wait 2,028 ms; now 3 ms.
Webhooks with HMAC signatures. Creating one applies the delivery transport's own destination rules, requires a sampleRate of 0 to 100, and allows at most 50 per organization.
Being added at the time of the last build report: the response cache, the prompt registry, PostHog forwarding, the users and properties endpoints, and per-property rate limits.
A history import that keeps the first 32 KB of text per request. Only organizations and keys are imported, so members cannot sign in yet (card 8).
Switched off until you and legal decide: the history copy and the DNS switch (cards 6 to 8).
Proof. 1,804 tests and pgTAP 23 of 23. An in-cluster host test passed on 2026-11-18. The Helicone hosts cannot be reached from outside the preview cluster, so that test was not re-run on 2026-11-22.
Not yet proven on the PR's layout Webhook delivery never ran on the preview: the delivery worker starts only in the background unit, which main's deploy script does not render. Only webhook create was exercised. The separate Helicone response cache was never provisioned on the preview either.
9. Security
Implements D18 and D19, and the security reviews of every area
What it is. Every new surface had to keep tenants apart, keep content out of reach of roles that should not see it, and survive hostile input. Separate agents that did not write the code attacked it: before the preview, on the preview on 2026-11-20, and in each round on 2026-11-22.
What we built and fixed. The two high findings before the preview were a crafted Host header that let anyone make the public /v1 edge call internal servers, and read-scoped admin keys that could read every org's captured prompts through 10 new routes. Both are fixed. Every finding since, with its fix, is in the table under Security retests.
Secrets (D18). The plan rotates everything exposed in chat: Cloudflare tokens and R2 keys first, the GitLab token next, and the Supabase JWT secret in an announced window kept apart from the D1 rollout. Operators share credentials only through the secret store. The rotations are production writes and have not run; they wait for your go.
10. Ops signals, alarms and rollout tooling
Implements D9, D11 and D17
What it is. The tools operators use to deploy this safely and to see when it breaks. Before this plan, queues retried forever (hundreds of captures were stuck from November 6, and an appeal pipeline was dead for 9 days before anyone noticed), wallet drift was only logged, and merge holds were coordinated by chat.
What we built.
One outbox primitive for every handoff: attempt counts, a parked state with the last error, audited replay, a storm guard and an oldest-age metric. One registry of queue rules and 12 alert rules. pgTAP 53 of 53.
Alarms as code. A new infra/ops-signals Terraform root replaces the hand-run alarm script. Every alarm root requires its paging topic and refuses an empty one. Wallet drift, parked receipts and the credit feed page through the database alert engine. New signals include a spooled charge older than 10 minutes and slow or failed first loads.
Separate deploy units. The /v1 edge and the dashboard edge are split. The ledger writeback, tag worker, jobs and Helicone webhooks are their own apps. Workers stay in EKS and scale on queue backlog (KEDA). A pooler budget guard counts every unit, Fargate tasks included. Audit events are never dropped (retry, then an fsynced spill and a page). Not yet proven on the PR's layout None of these units ran on the preview: main's controller and deploy script render none of them (card 38).
Release tooling. One typed list of release variables (scripts/ci/github/data_plane_release_env.py) feeds the GitHub production and staging workflows; 8 switches default off. A GitHub workflow validates the Terraform roots. D17's recovery by containment is ported to the GitHub workflows, with a merge hold, auto-close of landed PRs and a migration version allocator.
Rehearsal scripts for the Postgres restart and the MemoryDB game day, and a refusal of capture or tunnel domains as tenant endpoints.
Full test run: 22,564 passed in the deploy-units workstream, with 8 failures routed to their owners at the time; later gateway rounds ran 13,474 passing tests.
Proof: how we tested it
Building is not proof, so #2980 went through several layers of checking, each by agents that did not write the code:
CI on the PR: migrations on a fresh database, pgTAP, Python, web, the local stack, lock budgets, the request-path query budget and the deployed-build compatibility gate.
A requirements trace: every owner message from the planning conversation matched to the code. It found 15 gaps, fixed in three waves. The worst: the new Requests page would have shown an empty history on deploy (no backfill). Wave 1: the history backfill, per-key do-not-store leaking conversation state, a wrong header in the docs. Wave 2: seed data, capture backfill, the value tag and country filter, prompt and conversation grouping. Wave 3: the remaining Helicone gaps, a public CLI, wallet replay, engine media capture, rehearsals.
End to end on a dedicated EC2 stack: all 11 flows ran for real; 10 passed, and tag scoring stopped at the judge because no local provider accepts its strict format. It found 17 integration bugs, each fixed with a regression test: a ClickHouse migration that would have failed every deploy, the usage export stopping for good after minutes of traffic, every session read answering 500, tool spans never inferred, a new lane answering 500 and idle workers 503, per-key retention never matching, two segment writers destroying each other's files, no trace tag ever scoring live traffic, and every keep-flag re-stamp failing. Five smaller issues went to their owners. The suite is in docker/tests/obs_e2e; the protected-chain flow (flow 12) is not in CI yet.
Attacks on tenant isolation, money, load at 10x, privacy and erasure, and failure injection, first locally and then on the preview. Failure injection found two critical issues: the Helicone cache could fill the wallet's cluster and refuse every platform-funded request (the cache moves to its own evicting cluster), and dropping a column would have broken every write to the three partitioned tables (the dual-write was redesigned). It also fixed: MemoryDB out-of-memory is a retryable 503, the ETL pulls only what it can work, loops back off, and the sweep stops resending. The ETL deletes a message only after ClickHouse confirms.
The first preview deploys found two bugs, both fixed: every database client opened 32 sessions at creation (63 MB each), and ClickHouse schema errors parked good export rows. An adversarial pass at fc396d4f2 found four issues, all fixed.
Eight adversarial agents on 2026-11-22. They covered search and reads, the gateway hot path, ingest and capture, chaos (failures under load), security, web speed, UX and API clarity, and seed data. Each round: measure a baseline, compare at least two designs with numbers, build the winner, redeploy the preview, measure again. The full numbers and reasoning are in the companion page, "Adversarial performance rounds".
The preview is small on purpose: one edge pod, one control-plane process (one core), one ETL task, and a ClickHouse with 1 CPU, 2 GiB of memory and 10 GiB of disk, with no separate read compute. At idle that ClickHouse already used about 0.95 of its core. Every preview ClickHouse figure is a lower bound for production.
What the preview could not test
The preview ran the PR's code on main's deploy layout. The isolated preview controller runs from main. It builds #2980's images (Python, web, the Rust engine, and the ClickHouse and Postgres migrations), but it deploys them with main's scripts/porter/deploy_porter_apps.sh, main's helper scripts and main's preview provisioners. So #2980's changes to scripts/porter/ and scripts/preview/controller.py never reached the preview. We found this when uploads never reached Observability (see Round 12).
An audit sorted 172 claim rows from the rounds, the decision logs and both reports. 103 still hold: they depend on image code, or on parts main already deploys (segment capture, the preview capture ETL, the MemoryDB ledger with its writeback service inside the control app, the two-worker gateway fleet, the tag and dataset workers, Helicone host routing). 46 were not yet proven on the PR's layout when audited; upload processing on the control plane has since been verified on the preview at 79479dfd80 (round 12). 23 held only because of a step applied by hand. Deliberate fault injection (security-group cuts, pod kills, Postgres restarts) is the experiment itself and is not counted as a hand step.
Below, the affected claims carry one of two tags. Not yet proven on the PR's layout means the claim depends on a deploy or controller change that only #2980 makes. Needed a manual step means the claim held because someone changed the preview by hand. The numbers are kept; the tag says what they measured. Card 38 sets out how to prove the rest.
Results at a glance
Measure
Target
Before
After
/v1 errors during a Postgres outage
Zero for known keys
746 of 3,956 in a 10-minute outage (local)
0 of 3,956 (local); 0 of 3,060 with 459 s unreachable (preview) Needed a manual step The preview requests ran on the stand-in model lane, whose server, ingress, certificate, network policies and secrets were applied by hand with kubectl and aws.
Time from a quarantine, ban or key revoke to enforcement
Under 10 s, with or without Postgres
Up to 5 minutes from a stale snapshot
Within 0.3 s of the answer during an outage (preview rehearsal)
Hold latency (customers wait for the hold only)
Under 5 ms at p99
n/a
3.9 ms on real MemoryDB
Wallet drift after the backlog drains
Zero nano-dollars, paged otherwise
n/a
0 in every failure test
Median gateway latency
20 ms (main)
11 ms (local)
Captures dropped to metadata-only, per tier
Counted and alarmed; zero for contract-retention traffic
Captures refused customer requests (up to about 24,000 an hour)
None lost in any outage test (preview)
Capture pipeline, spans/s on 1 ClickHouse CPU
about 400
about 4,800 (empty) / 2,100 (1.5M stored) (local)
Trace ingest, 1 vs 3 control servers
4,029 spans/s
13,146 spans/s (3.3x, preview) Needed a manual step The control plane was scaled to three servers by hand (kubectl scale, 15:56 to 16:19 UTC). Not yet proven on the PR's layout Those servers also ran the settle drain and usage export, which the PR moves to the background units.
Live prompt searchable under 120 req/s
5 s after settling (live view)
35+ min (preview, morning)
under 21 s, 10 of 10 checks (preview) Not yet proven on the PR's layout The search waits on the usage row, and the usage export ran inside the control servers, not in the PR's background unit.
Live prompt searchable with a backlog
25+ min on the preview
3.4 s in the test (local)
Capture to stored, idle
Under 5 s
p50 4.3 s, p95 5.8 s measured on the S3-notification path (preview). With the 1 s seal and direct announce: p50 2.10 s, p95 3.82 s, a model built from preview stage timings. Not yet proven on the PR's layout Direct announce never ran: main's controller sets no announce switch and main's provisioning grants no queue send permission.
30-day search, 50M requests in one org
Under 1 s
2.8 s (phrase, 1.2M rows)
100 to 210 ms on 1 thread; 46 to 93 ms on 4 (local)
Requests list, key filter, 50M rows
First rows under 1 s
4.9 s
0.75 s on 1 thread; 0.26 to 0.35 s on 4 (local)
Postgres calls per Requests page
11 to 14
2
Request drawer
One body under 500 ms
14 database calls, 403 ms
4 calls, 293 ms (preview)
History import per production org
73 to 195 rows/s on the preview
about 10,000 rows/s; 10M rows in about 20 min
New org's first call
16 of 30 failed (preview)
8 of 8 succeeded through the real mint route (preview) Needed a manual step The test orgs were marked verified with hand SQL, not through a product path.
Wallet store cut off on the preview
4 server errors, 34 to 46% failing before any cut
0 server errors; errors only inside cuts, all retryable; money exact Needed a manual step Money was counted on the hand-built stand-in model lane.
Data controls page, first data
2.31 s
1.30 s
Session list (any sort); 5,000-request session
500 ms; 1.5 s
Sessions 30 days by cost p95 1.67 s on the 1-vCPU preview; a 5,000-request session draws in 186 to 228 ms in the browser
Oldest receipt waiting for Postgres, any organization
Under 60 s at p99
One busy org fell 17 to 55 minutes behind (before D6)
Not yet measured at production load
MemoryDB stream memory at the longest planned restart
Under its budget
Budget 4.8 GB, sized for a 60-minute outage at 150 req/s
Database wait in the control plane
Under 200 ms at p95
Not yet measured in production
Postgres size growth
Flat month over month after partition drops
Only measurable after the first drops in production
Oldest unprocessed item in any queue
Under its budget, paged otherwise
Alarms built; topics must exist in each environment
New S3, SQS and Fargate cost for captures
About $1k a month at today's volume
about $3.5k a month for unbatched uploads (estimate)
about $0.7k a month for S3 and SQS with batched segments (estimate)
The goal of these tests is the owner's ask: a database restart, or the failure of any store, must not hurt API traffic, and money must stay exact. "Money exact" means every served call has exactly one request row, the settled amount equals the usage.cost the client got, failed calls are charged 0, and the wallet's spend equals Postgres's.
Test
Result
Postgres, 11 restarts in 10 minutes, about 459 of 615 s unreachable, longest 74 s (preview, 2026-11-22)
0 errors on 3,060 stand-in-model requests and on span uploads. Money exact (3,285 rows, 112,692,400 nano-USD both ways). The database-outage signal fired for the whole outage. 45 continuations needed a resend, because the preview has no Helicone cache cluster to spill to. Needed a manual step The 3,060 requests ran on the hand-built stand-in model lane.
Postgres down 10 minutes (local)
746 errors of 3,956 before the fixes; 0 after, money exact. 596 of 603 span uploads had failed as bare 500s; 0 of 181 in the rerun.
ClickHouse down 3 min 52 s (preview)
0 errors of 4,026 requests; money exact; every queue drained. Not yet proven on the PR's layout The settle and usage queues were drained by the control servers, as in main's layout. The PR's background units, which take over that work and scale on queue age, never ran.
Wallet store cut: three 10 s cuts and one 35 s cut, one gateway server deleted mid-cut (preview, round 3)
Errors only inside the cuts, all retryable, none a server error. They stopped 2.5 s after recovery. Replacement server ready in 50 s. Money exact: 2,098 served calls = 2,098 rows. Needed a manual step The served calls ran on the hand-built stand-in model lane.
Wallet cuts again (preview, round 4)
/v1/models: 0 errors of 90 (25 x 429 before). Errors are retryable 503s on wallet lanes only, p95 0.34 s. First requests after 28 idle minutes: 0 errors (4 x 503 before). Money exact: 1,543 calls = 1,543 rows (Needed a manual step counted on the hand-built stand-in model lane). New high finding: readiness depended on the wallet, so a wallet outage over about a minute would have taken every worker out of service. Fixed in round 5.
90 s wallet cut (preview, round 5)
Both servers stayed in service (184 samples, 0 not-ready, 0 restarts). Slowest successful call 0.36 s. Money exact: 1,868 calls = 1,868 records. Unknown keys waited 4.2 to 4.9 s for their 503; fixed in round 9 (p95 0.53 s in round 7). Needed a manual step Money was counted on the hand-built stand-in model lane.
Forced kill during a 90 s wallet cut (preview, round 8)
A worker holding a spooled charge was killed with --grace-period=0 --force. Each attempt was charged exactly once: 3,766 attempts = 3,766 distinct settle receipts = 135,576,000 nano-USD; wallet = Postgres = client usage.cost. The spool emptied under 7 s after the restore. A replacement started inside the cut with 0 restarts (it crash-looped 3 times in round 7). Two spooled requests answered after 6.8 and 9.3 s; round 11 bounds every wallet call at 0.5 s so they answer within the 2 s bound plus about 0.5 s (not yet re-measured). Needed a manual step The calls ran on the hand-built stand-in model lane, and the spool was replayed by main's writeback service inside the control app, not by the PR's separate writeback app.
Wallet stalled 5 s (local)
Money exact; every refusal retryable (3 were 500s before).
A killed MemoryDB primary under 7,500 reservations/s (local)
14 tests on MemoryDB, Durable Objects and celld: none lost money under any fault. Results under D6.
The restart rehearsals of 2026-11-18. On the isolated preview (a MemoryDB-style wallet, two gateway workers), Postgres was restarted in rounds under steady load. Each round found something, which was fixed before the next.
Round
What it found
Fix
1
Every Python service crashed (segfault) about 5 s after Postgres returned. Chat returned 500 instead of a retryable 503. Requests at the cut hung 37 to 60 s.
psycopg 3.3.4 crashes when the Supavisor pooler greets a client without connection settings; upgraded to 3.3.8 (also on main as #3046, live in production since 15:58Z on 2026-11-18, release 77c473557). Breaker errors now answer 503 with Retry-After. In-flight calls fail fast.
2
Requests at the cut still waited 22 to 37 s. Window readiness never passed on a fleet with no protected chains.
Every request-path database call gives up after 0.75 s; one silent call trips the breaker at once; no retrying the next pooled connection. Readiness answers "not applicable" when nothing is protected.
3
One worker refused a known key for the whole outage (it had never cached it). One request took 7.1 s.
Workers keep an in-memory list of public models for outage use (60 min bound). Settings reloads moved off the request path.
4
All targets met (0 errors on known keys through 46 s and 70 s cuts). Leftovers: preview ClickHouse evicted by the autoscaler; 8 usage-export rows stuck for their 12-minute claim.
Eviction protection for preview ClickHouse and API (#3061, merged). A worker re-sends releases the database refused, so stuck rows retry within 60 s.
5 (10 minutes)
11 back-to-back restarts, Postgres down 525 of 604 s: 0 errors on known keys, money exactly once, no crashes. Failed: quarantining an org during the outage returned 500 (Supabase returns Cloudflare 52x pages, which our outage check did not recognize). A pod started during the outage was killed by its startup check and came back 3.5 min late.
One shared "database did not answer" check that counts Cloudflare 52x and HTML 5xx. Admin block routes answer "live, not yet recorded" within 5 s. Startup waits through an outage; a pod that never served exits within 20 s. Not yet proven on the PR's layout Proven only for short waits: the preview used main's startup check (about 5 minutes), not the PR's 3,900 s budget.
5 retest
Quarantine, ban and key revoke during an outage took effect within 0.3 s of the answer, recorded exactly once afterwards. Blocked orgs got the "out of credits" refusal instead of "under review"; records showed the recovery time, not the operator's time.
Blocked orgs get the normal refusal during an outage; records keep the operator's time; answers under 5 s; an admin key that can ban can now unban.
What the rehearsals do not prove yet. The cuts were 41 to 70 s (and one 10-minute round of chained restarts) on a small preview database branch, not the 10-minute cut on production-sized data that D16 sets as the bar. The preview has no protected model chains, so the zero-error result covers plain chains only; protected chains were tested locally (flow 12: 1,527 of 1,527 through a 40 s cut inside a window). One protected request in flight at the cut still waited 30 s before its retryable 503. The MemoryDB failover game day has not run: its script is allowed only against staging, and the preview's ElastiCache Serverless cannot answer the failover question. A key a worker had never read was refused with a retryable 503 during the cut, as designed.
Load tests
A load test ran on the preview on 2026-11-20 and 2026-11-21. An EC2 load generator sent open-loop traffic: arrivals at a fixed rate whatever the answers, with a 30 s client timeout like an OTLP exporter's default. The mix was 45% OTLP protobuf, 30% OTLP JSON and 25% Langfuse batches, about 74 spans per request, across 48 test organizations with skewed session sizes. About 4.2 million spans were offered; ClickHouse held 1.73 million spans, plus 1.2 million synthetic request rows to test reads. Source: /tmp/obs-build/audit/load-2026-11-20.md. It found six bottlenecks in the order they broke, and each is fixed.
Span ingest, before and after
Build
Offered/s
OK/s
p50
p95
503
Timeouts
Before (37d8b2ef4)
50
37.3
13.9 s
16.8 s
2,871
16
After the ingest fixes (1a9e27bf09)
50
48.0
0.48 s
1.45 s
101
0
After the ingest fixes (1a9e27bf09), 4x overload
200
24.3
15.7 s
29.4 s
6,967
6,861
After edge admission (3ab24ef686), 4x overload
200
46.4
not reported
2.1 s
not reported
0
At 4x overload goodput now stays at capacity (46.4 requests a second) with no client timeouts; before, it collapsed to 24 with 6,861 timeouts.
Not yet proven on the PR's layout Ingest went through main's shared /v1 edge and control servers that also ran the settle drain and usage export. The PR sends /v1/traces to the separate dashboard edge and moves that work to the background units, so these numbers describe main's layout.
Fairness: a quiet organization during another's flood
Four organizations sent 150 requests a second; four quiet organizations sent 8.
Requests
OK
503
429
p50
p95
Quiet organizations, before
495
411
168
not reported
14.7 s
22.3 s
Quiet organizations, after
513
501
0
12
0.61 s
1.34 s
Flooding organizations, before
13,551
4,262
4,227
5,062
14.5 s
24.2 s
Flooding organizations, after
13,592
3,778
0
9,814 (fast)
0.51 s
1.18 s
Before the fix, 34% of the quiet organizations' requests got a 503, from the edge's shared shedder.
Not yet proven on the PR's layout Measured on main's shared /v1 edge, not on the PR's dashboard edge, which carries ingest in the PR's layout.
Capture pipeline, before and after
Stage
Before
After
Langfuse scores
One ClickHouse insert per score (about 250 ms each), inside the request; 3,501 single-row inserts in 120 s; p50 13.9 s at 50 requests a second
One write per batch
ETL span throughput
About 56 spans/s (one write cycle per ingest request)
About 480 spans/s with grouped writes on short sessions; it fell to about 100 spans/s once sessions reached 30,000 spans; about 300 spans/s in the latest measurement (1-vCPU preview ClickHouse)
Grouped inserts
18 to 21 MB, refused by the ClickHouse ingress (16 MiB cap)
At most 5,000 spans and 4 MiB per group, configurable
Gateway captures during a span backlog
None stored from 22:33Z for over an hour (shared queue)
4.1 to 7.5 s in 13 of 13 probes with 2,500 to 4,000 span segments waiting (in-memory park). The park later filled and a capture waited over 3 minutes; now span segments have their own queue.
Session summary per write
2.8 to 3.1 million rows read, 21 to 64 s
About 37,000 rows read, p50 330 ms (folded from per-trace parts)
First rebuild of a big existing session
One 3.4 to 4.0 million-row statement, 103 to 126 s, past the 45 s timeout, retried on every write
Slices of 500 traces; the longest statement 3.3 s
Request text after a gateway call
87 to 170 s
18 s in 2 of 3 probes; the third took 86 s because the usage exporter itself lagged 43 s Not yet proven on the PR's layout The usage export ran inside the control servers; its lag on the PR's background unit is not measured.
Reads at 1.2 million requests (2026-11-21, before the round fixes)
Target: p95 under 2 s for lists and under 1.5 s for detail views. Measured on the busy 1-vCPU preview ClickHouse.
Needed a manual step The 1.2 million request rows were inserted by hand into the preview ClickHouse for this test, not loaded by the fixture.
Read
p50 / p95
Verdict
Requests, default 24 h
2.54 / 2.84 s
Over
Requests, 30 days
2.35 / 2.91 s
Over
Requests, 30 days sorted by cost
5.86 / 9.08 s
Over
Requests, end-user filter
4.82 / 5.27 s
Over
Requests, session filter (7 days)
1.20 / 1.38 s
OK
Search 7 days
2.18 / 3.25 s
Over
Sessions 30 days, sorted by cost
1.09 / 1.67 s
OK
Session detail
1.21 / 1.48 s
OK
Traces 30 days and trace detail
0.81 / 0.91 s
OK
Scores
0.57 / 0.61 s
OK
Trace SQL
0.91 / 1.23 s
OK
Helicone request/query
4.25 / 6.64 s
Over
Helicone session/query
0.58 / 0.85 s
OK
Per-organization read quotas work: 24 concurrent sorted-list readers in one organization got 402 refusals and 2 answers in 40 s, while a quiet organization kept reading (10 of 10), at p50 3.4 s instead of 1.1 s because the single core was full.
Extrapolation to 10x production
Production today averages about 50 gateway requests a second, roughly 500 at peak. Ten times that, at an assumed 10 customer spans per gateway request, is about 50,000 spans a second at peak, or about 700 ingest requests a second.
Stage
Measured unit cost
Need at 10x peak
Recommendation
Span ingest (control plane)
About 3,700 spans/s per Python process
50,000 spans/s
Its own deployment, 18 to 20 processes at peak, autoscaled on CPU. Recompute the per-organization limits as fleet-wide numbers, because they are per process. Not yet proven on the PR's layout The unit cost comes from control servers that also ran the background work.
Edge relay
About 1 CPU at 200 requests a second with 50 KB bodies
About 700 requests a second
4 or more edge pods for ingest, or route ingest from the ingress straight to the ingest deployment. Not yet proven on the PR's layout The unit cost comes from main's shared edge, not the PR's dashboard edge.
Capture ETL span writes
480 spans/s per writer on short sessions; about 100 spans/s at 30,000-span sessions (before session parts)
5,000 to 50,000 spans/s
Session parts first (done), then more tasks, since each task has one writer: 10 to 100 tasks on a sized write group.
ClickHouse write group
1 vCPU: about 480 spans/s with about 60% of the core in merges
50,000 spans/s
A separate write compute group of at least 16 vCPU.
Queues
One queue for all sources (at the time of the test)
Separate control queue (done 2026-11-21) and an alarm on the oldest message age per source.
Reads
Requests list p95 5.4 s at 1 million rows on a busy 1-vCPU ClickHouse
About 50 million rows per large organization
Run the history backfill and stamp it (drops the union), use the read compute group, run totals beside the page, cut the 13 Postgres calls, and re-measure on production-size compute (the report's own 16-core numbers were 47 to 681 ms).
Sizing for production. ClickHouse reads need at least 4 vCPU per concurrent heavy reader, with max_threads 4; 8 threads adds nothing. One gateway worker saturates at about 165 req/s (Python's single core plus the engine's 4 bridge threads), so the worker count follows peak request rate. A cost-sorted copy of the requests table was tested and rejected (13% more write time, 25% more disk, and the default view got 2x slower).
Earlier load attacks at 10x (dedicated EC2). An unauthenticated flood of random keys could deny every real key not yet in a worker's memory (fixed with a filter of all key hashes, so unknown keys get a 401 for free). The Helicone cache could stall the wallet (it moves to its own evicting cluster). The partition dual-write cost about 5% throughput and 43% more WAL on a quiet machine; it was redesigned as a key-only change log drained after commit, about 2% on the request path. Key snapshot: 134 MB at 1M keys, 7.1 GB at 50M. Change-table pruning, the KMS key cache and S3 request rates held.
Security retests
The preview retest of 2026-11-20 used org keys for three organizations, a do-not-store key, five scoped admin keys and two imported Helicone keys. The preview cluster's API and in-cluster ClickHouse were not reachable from the tester's laptop, so the Helicone host ingress was reviewed in code. Nothing touched staging or production, and every key and webhook made for the tests was revoked or deleted afterwards.
Finding
Severity
Fix
Erasure left frozen Helicone webhook payloads (request and response bodies, plain text) in Postgres; a retrying delivery could still send erased content, and a parked one kept it 30 days.
High
Fixed (a4533c6a94). Migration 20271128010400 makes erasure clear every frozen payload of the organization's webhooks, and a parked delivery keeps no body. A new pgTAP suite fails on the old function.
Helicone webhook create stored any https destination (cloud metadata address, loopback names, our own admin URL, URLs with credentials), with no count cap, so one key could fan one request out to many outbound posts. A bad sampleRate caused a 500.
Medium
Fixed (4a169b8161). Create applies the delivery transport's own destination rules (public addresses only, not our infrastructure, no credentials in the URL), sampleRate must be 0 to 100, and an organization has at most 50 webhooks. Delivery already re-checked every address, so nothing internal was ever reached. Not yet proven on the PR's layout Only create ran on the preview. The delivery worker starts only in the background unit, which main's deploy script does not render, so no delivery ran there.
The observability fixture script, in local mode, would seed any database URL, including a hosted Supabase project.
Low
Fixed (bad5652616). Local mode refuses hosted Supabase hosts.
(Round 1) All 49 Helicone REST handlers blocked the control plane's event loop; one slow key could freeze every org on a pod.
High
Fixed. A fast request waited 2,028 ms; now 3 ms.
(Round 1) An auth-header trick let a tenant dodge its per-org ingest bucket and fill the edge's org cache; one client could hold all 8 shared admission slots.
Medium
Fixed.
(Round 2) Only trace reads carried the per-org ClickHouse quota. Usage, Logs, Spend, scores, tag reads and the telemetry trace list ran outside it, and signed-in reads skipped admission.
Medium
Fixed. Every customer read must name its quota, enforced by a structural test. Signed-in users get a per-user bucket (20/s, burst 60, 12 in flight).
(Round 2) The history backfill rebuilt rows of a deleted organization, undoing its erasure for days not yet recorded.
Low
Fixed. Deleted orgs are skipped; a real-ClickHouse test asserts 0 rows.
(Round 3) The edge's org-fairness token could leak from below the worker front, and anyone who knew an org id could compute it. A random-key flood could evict every org's learned keys.
Medium
Fixed. The front drops the header from answers it does not stamp, random keys get their own table, and the token is an HMAC under the existing edge-worker signing key.
(Round 3) A streamed answer waited 30 s for its first taker and survived sign-out, so another account signed in to the same tab within 30 s could take it.
Low
Fixed. Shared answers are cleared on sign-out.
(Before the preview) The Helicone cache stored answers the caller asked not to store; unclamped span timestamps let one org push a segment to the dead-letter queue; the Helicone REST API had no rate limit; trace SQL exposed columns that do not exist.
Medium
The cache fix is in. The other three were in progress at the time; rate limits held in the 2026-11-20 retest.
(Money attack, before the preview, local) The Helicone response cache could fill the wallet's MemoryDB and stop all money; out-of-memory and read-only errors were not treated as "wallet unavailable"; a flood of random keys could lock out new keys; one long write transaction stalls the deny-set feed; usage could double count under a reclaimed export lease; a cache hit was served to blocked keys.
Critical to medium
The cache moves to its own evicting cluster; out-of-memory is now a retryable 503; the key filter answers unknown keys. The money attacks have not been re-run after the fixes. Not yet proven on the PR's layout The preview has no separate Helicone response cache, so the move off the wallet's cluster has not run there.
(Privacy attack) A Helicone cache save landing after an org purge, and ClickHouse rows written late for records captured before an erasure.
High
Both fixed.
Held under the retest: read-scoped and support admin keys never saw content; another organization's key got 404 on every new route and 0 rows from trace SQL; spans and Langfuse calls that named another organization still landed in the caller's own; do-not-store and per-request storage headers stored nothing; admin scopes refused everything outside their set; trace SQL escapes were refused; 40 concurrent reads got fast 429s; no new database function or table is open to the anon or authenticated roles.
Observations, not fixed:
The capture ETL stalled during the run. The load test found the cause (gateway captures queued behind the span backlog), and two queues fix it.
Two branch migrations shared version 20271120600000. Merging main resolved it.
Under a do-not-store key, span names and Langfuse trace names are still stored (attributes, input and output are stripped). This is documented metadata; it deserves a sentence in the data-controls docs.
The preview's out-of-credits message links the production credits page.
A read admin key sees a 12-character prompt group hash, which could confirm a known prompt. Low.
Helicone webhooks can be replayed by design (Helicone's own signature has no timestamp); our trace-tag webhooks sign a timestamp.
The UX walk
An agent used Observability, Quality, settings and admin on pr-902980 as an owner would, with data made through real paths (chat, Responses and Messages sessions, OTLP and Langfuse traces, tags, scores, a review queue and a dataset). It worked in light, dark and phone widths, and compared the pages with Helicone, Langfuse and OpenRouter. Most findings are fixed: fresh rows say the text may still be processing instead of "storage was off"; search mode drops the empty Preview column; failed requests read 0 credits, not "free"; the Quality page no longer says tagging is off and running at once; empty charts say so; score targets, dataset items and run lines read as text; a failed score-type name shows the validator's sentence (commit 8d995b3a4f). 740 related web tests pass. The open questions are cards 17 to 24, 28 and 37.
Task
Round 1
Round 3
Find why a request failed
5 clicks by Filter
2 clicks for every role and mode ("43 failed" in the status line, then the row)
Failed request drawer order
Quality actions above the reason
Reason, then attempts, then keep, scores, datasets and replay
Export
2 clicks
2 clicks; a 202-line CSV arrived 1.8 s after the click
Tab stops without a visible focus ring (of 40)
4
0, every role and mode
Failed reason on a phone
1.8 to 3.9 s
0.81 to 0.84 s (round 4)
Round 12 (2026-11-22)
Conversation view. The first turn now shows 40 to 77 ms after the click (target under 1 s; it was 1.3 to 1.7 s). Layout shift while it loads: 0 on the demo org, 0.0078 on Atlas.
Session page. Back near its baseline: Atlas 1.0 s against 0.98 s. On the demo org the median is about 1.0 s against 0.81 s. The slower back-to-back reloads there come from the preview's cap of 2 ClickHouse reads at a time per viewer; production plans 4.
Verified live on the preview: the tag filter and the Users view.
Delete one upload. A new per-upload DELETE route answers 404 for another organization's upload or a malformed id, and 202 for the caller's own. Afterwards the receipt and the stored file are gone, and erasure of the upload's spans is queued.
Admin read of background jobs. A new GET /api/admin/background-jobs shows the background jobs and the settings they run with. It is how the upload problem below was found.
Why uploads never reached Observability. The control pods did not have CLICKHOUSE_TRACE_PROJECTION_ENABLED, because main's deploy script gives it only to the Project worker. On earlier builds uploads were therefore projected nowhere on the preview. The fix drops that gate: the projection loop now starts wherever the observability store and the span sink exist. This finding led to the deploy-layout audit (What the preview could not test).
Upload processing verified on the preview (79479dfd80, 01:35 to 01:42 UTC). The background-jobs read showed trace projection "started" on the control pod. The 4 waiting uploads were processed when the pod started: the exp capture file on its first attempt, and two agent traces after 3 attempts each while the pod was starting (the cause is not yet read from the logs). The sessions and traces APIs answered 200. The demo agent trace shows the agent, then an LLM call (gpt-6-luna, 42 tokens in, 7 out), then the tool execute_tool lookup_refund, with the tree intact. The exp capture trace is one LLM span. The Northwind copy landed in its own organization.
Storage controls hold for uploads. Northwind has capture off, and its stored batch has content_stripped true: no prompt and no tool arguments or result, while the model and token counts are kept. The demo org's batches keep their content.
Deleting a processed upload. The route answered 202. The trace answered 404 after 12 s, then the session did too. The receipt, the stored object and the deletion job were gone. The deletion worker takes one job per pass, so 3 deletions took about 2 minutes. All test data was deleted afterwards and every admin key minted for the test was revoked.
Open, not blocking. The 3 retries at pod start deserve a look in the logs. The name "Local capture" and who sees it are still an open UX decision (card 37).
Production note. Segment capture is off in production, so there is no span sink there. Uploads and exp capture batches wait in their queue (they are not lost) until segments are switched on.
Passwords are not on this page. The role passwords are in ~/.explabs-ops/secrets/preview-2980-logins.env. The platform admin's password is in ~/.explabs-ops/secrets/preview_pr_2980_login.env. A rebuilt preview gets new passwords; the test guide says how to refresh them.
Role
Email
Use it to check
Platform admin
admin@experientiallabs.ai
Everything, including Admin. Admin of every seeded org.
Owner
admin+owner@experientiallabs.ai
An org admin of the demo org, Atlas Scale and Harbor Health. No Admin pages.
Member
admin+member@experientiallabs.ai
Sees the data, cannot change org settings.
Support admin
admin+support@experientiallabs.ai
The Admin pages with the Support role.
Tenant B admin
admin+tenantb@experientiallabs.ai
Sees only Northwind Robotics (prompt storage off).
Sandbox owner
admin+sandbox@experientiallabs.ai
A sandbox org with no credits.
Where to start. The demo org has 30 days of history with stored prompts, tags, scores, a review queue and a dataset. Atlas Scale has about 1,000,000 requests over 30 days, for speed. Northwind has storage off, and Harbor Health has zero data retention on.
One limit today. The preview's real model, preview-gpt-4.1-mini, used up its $5 lifetime budget at 14:44 UTC on 2026-11-22 and refuses every call. Seeded data, the stand-in model and every page still work. Playground chat and new dataset runs need the real model (card 33).
The page-by-page tour, the seeded orgs, live calls you can repeat and the preview's known gaps are in the test guide: /Users/silen/Desktop/preview-2980-test-guide.md.
How it ships
Decided You decided to land everything as one pull request, #2980. The 12 stacked PRs (#3090 to #3101) are closed. Earlier history is kept on branches obs-data-plan-backup-20261120 and obs-data-plan-backup-2026-11-22. #2980 keeps the do-not-merge label until you approve it, and its preview, pr-902980, is the test environment. Your rule for this work: nothing goes to staging or production; everything is proven in the isolated preview first (its own AWS account, database branch and cluster).
What #2980 contains
Area
Decisions
Request path off Postgres, the MemoryDB wallet, outage blocks, the maintenance window, one 60-minute outage bound
D1, D6, D16
Capture to segments, the two-queue capture ETL, inline inference, erasure
D2, D19
ClickHouse store and its migrations (through 0053, session parts), search
D4, D8
Bounded database access, the outbox primitive and alerts
D3, D9
Deploy units, restart tooling, release guards, the release variable list, Terraform roots with required alarm topics
D11, D16, D17, D18
Trace API, OTLP and Langfuse ingest with per-organization admission, CLI and MCP
D7
Tags, scores, review queues and datasets (Quality page)
D10, D20
Retention and storage controls
D13, D14
Observability pages and the availability endpoint
D7
Helicone compatibility
D12
Partitioning and the read replica
D3, D5
It includes the customer docs on the new docs site (apps/docs, English and Japanese), because main retired the in-app docs in #3167.
What ships switched off
Your instruction of November 17 was "Don't defer anything for the future. Build everything as it should be built". So everything is built in full. Some of it cannot simply turn on when the PR merges, and it ships switched off, for the reason stated beside each.
Ships switched off
Why it cannot just turn on
What turns it on
Helicone history copy and DNS switch (D12)
Moving Helicone customers' data to another entity needs the DPA, assignment and sub-processor review.
Owner and legal sign-off, then one host at a time with rollback tested
Default expiry for free organizations, opt-in archive (D13)
Both change a published retention promise, which needs 14 days' notice. Updated 2026-11-18: owner decision 3 reads as removing the free-plan expiry instead; the code still carries the switch until that is confirmed.
Terms and privacy update published (archive); owner confirmation of decision 3 (free expiry)
Partition drops, old-table cutover (D3)
A drop is irreversible; the repo's expand-then-contract rule puts the rename in a later release.
Parity proven per day, then the follow-up contract MR
Media capture beyond chat, Responses and Messages (D14)
The capture collector lives in the external engine, consumed only as a pinned PyPI release.
An engine release with the new capture protocols, then a pin bump. Updated 2026-11-18: the engine change is in progress, not released.
Production writes: Terraform apply, secret rotation, test-host lanes, the restart window
Each is a production write, and the owner's rule for this work is that nothing goes to staging or production; everything is proven in the preview first (updated 2026-11-18).
Owner go per item
Migration numbers
The branch's migrations run up to 20271203160000, above main's newest (20271202610000). If main passes them again before merge, they are renumbered. Renumbering fixes the order, not the content: a migration that rewrites a function that also exists on main must be rebuilt from main's live body at merge time. Each stack rebuild that renumbers migrations also means rebuilding the preview from scratch, because a preview database that recorded the old numbers refuses to migrate.
Before #2980 can merge, in order
Your decisions. Answers on the provisional defaults the PR carries (3, 4, 5, 9, 10, 13 and 14), and on any other card you want settled before launch.
CI green on the final head, including deployed-build-compat, migration-lock-budget, hot-path-query-budget and obs-e2e. Every check passed on f7cd3b5bbe (31 checks); on the current head 79479dfd80 CI is still finishing, with the integration tests last. GitHub reports #2980 as mergeable with main, so no merge from main is needed today; if main moves into a conflict before landing, merge it and re-run CI.
The preview green on that head: pr-902980 redeployed, gateway captures and span segments flowing on their two queues, and the load and security checks repeated where the code changed.
Production prerequisites ready: the SNS topics for paging and alerts exist, because every alarm root refuses to plan without them.
You remove do-not-merge and the PR squash-merges. Its migrations reach the production database at merge, minutes before any pod rolls, so the compatibility gate in step 3 is the safety for that window.
Rollout to production, in order
Infrastructure first (Terraform), staging then production:infra/traces (buckets, KMS key, the raw and control queues and roles), infra/trace-tags, infra/capture-processing (the Fargate ETL), infra/porter/audit-archive, infra/porter/control-role where needed, the Helicone cache cluster, and infra/ops-signals. Each alarm root takes its paging or alerts topic.
Release variables in the GitHub environments, from the release variable list. The switches stay off.
Release the code through the normal production deploy, then run the ClickHouse history backfill.
Turn switches on one per deploy, staging first: writeback app, background units, dashboard edge, tag worker, partitions job.
Capture segments before the UI that depends on it. Turn EXPLABS_CAPTURE_DESTINATION=segments on with the capture ETL running, then the tag worker. Only then do request previews, search, tool spans and tag scores fill in. The pages check the availability endpoint, so until then they hide those features and say why; no customer sees an empty column.
Direct announcement (EXPLABS_CAPTURE_DIRECT_ANNOUNCE) per environment, after infra/traces is applied there, together with defer_s3_notifications on the Fargate ETL (card 35).
Then dataset runs and the Helicone webhooks and hosts, one host at a time.
Alarms: before each switch, confirm its alarms have an action (the Terraform validation enforces it at plan time), and watch the per-queue backlog and dead-letter alarms after turning on segments.
Read compute and backfills: give customer reads their own read-only ClickHouse compute group with at least 4 vCPU, then set EXPLABS_CLICKHOUSE_READS_RUNNING_PER_ACTOR=4 on the control plane (default 2 until then). Run the usage rollup backfill (usage_quarter) before large organizations' 30-day Usage reads are expected to work, and the requests-history backfill per organization (about 10 to 15 minutes per 1M rows of history, plus one rebuild per group of small orgs). Check the read replica's statement timeout when it exists.
Secrets (D18): the rotations, each on your go, with the Supabase JWT secret in its own announced window.
Main PRs that let the preview run #2980. Previews run main's deploy tooling, so preview setup lands on main first. Merged: #3133 (tag and dataset workers, fixture Job), #3145 (fixture Job settings), #3175 (CodeBuild role propagation), #3176 (ClickHouse 26.6 mirror), #3243 (worker apps get the gateway origin and key announce; the control plane learns the capture mode; the fixture uses the image's database CA), #3248 (fixture Job one-hour deadline and diagnostics) and #3252 (the span-ingest queue for the two-queue ETL). Earlier: #3022, #3028, #3044, #3051 and #3061 (eviction protection), and #3111 (one wildcard certificate for every preview). #3238 was closed as a duplicate of #3243.
Top risks for merge and rollout, in order
From the plan review of 2026-11-20, with status updated. Each says what to check first.
Schema ahead of the fleet. Every Postgres migration claims to be additive, but the capture migrations once failed deployed-build-compat (fixed), and several migrations rewrite live functions on main, including the PostgREST pre-request hook that every API call passes through. With one PR, all 72 migrations reach production at the same merge. Check first: get deployed-build-compat green on #2980 after merging main, and compare each rewritten function with main's live definition at merge time.
Locks and IO on the busiest tables. Change-log triggers go on gateway_requests, gateway_attempts, audit_log, organizations, api_keys, org_labels and credit_ledger, and the partition backfill adds write-ahead log. The +2% cost was measured on a quiet machine. Check first: migration-lock-budget green, and a seeded preview applied at production row counts. Build any needed index out of band on staging and production first.
Live pages with no data. In production the capture destination defaults to inline, so previews, search, tag scoring and tool spans stay empty until segments are on, while #3034 makes the pages live for everyone. Mitigated: the availability endpoint tells each page which features have data, and the release variable list wires the switches into the GitHub workflows. Check first: deploy a preview with production defaults and screenshot it, then run the switch-on sequence end to end from the GitHub workflow.
Outage bound. Fixed in the code (one 60-minute bound). Check first: a 20-minute Postgres cut in the preview with keys idle for more than 15 minutes. Not run yet.
A single-shard wallet failover. About 14 seconds of refusals for every org. The game day has never run on MemoryDB. You decide where it runs (staging is ruled out, and the preview's ElastiCache Serverless cannot answer it). A dedicated MemoryDB in the preview account is the likely answer.
Moving capture to segments. A new erasure path, KMS key shredding and per-org data keys. Check first: re-run the privacy attack suite on the preview with segments on, and test an erasure that covers S3 versions, the dead-letter queue, request_text, spans, tag scores and Kion's tag tables. Resolve decision 3 first.
History backfill time, and no ClickHouse read compute. Check first: time a 7-day backfill on production-shaped ClickHouse, and create the read compute group before the Observability pages carry production traffic.
Porter autoscaling on a custom metric is unproven on this cluster. Check first: explabs-bg scaling on explabs_queue_ready_age_seconds in the preview.
Helicone. The legal gate, members not imported, and keeping the cache cluster separate from the wallet. Check first: re-run the money attack (the cache cannot reach the wallet's MemoryDB) after the fixes, and keep the hosts off until you answer cards 6 to 8.
The partition cutover (renames, foreign key removal) cannot be undone. Check first: 30 days of parity and a rehearsed cutover on a production-sized branch. The review suggests reconsidering the design first (card D).
Alarms. Fixed in the code: every alarm root requires its topic and refuses an empty one, and the outbox alarms moved into the infra/ops-signals Terraform root. The wallet drift, parked receipt and credit feed signals page through the database alert engine. What remains is creating the topics in each environment.
Moving off Helicone: where it stands
Short answer: not yet. #2980 builds a Helicone-compatible layer on our platform, so Helicone customers can be served by us with no change on their side. It does not let us turn Helicone off. After it lands, Helicone's own services (its worker, its REST service "jawn", its US and EU databases, the S3 body bucket and its dashboard) must keep running, for three reasons: traffic we do not serve is forwarded byte for byte to Helicone US, EU customers stay on Helicone, and several kinds of customer data have no importer. Sources: /tmp/obs-build/rounds/helicone-code-audit.md and /tmp/obs-build/rounds/helicone-infra-inventory.md (both 2026-11-23, read-only).
What runs on our side today: nothing
All Helicone code is only on the #2980 branch. Main has no Helicone migration and no infra/helicone-cache.
Our side has no Porter app, AWS resource, Supabase table or function, ClickHouse table, DNS record or cost tag for Helicone. Cost Explorer shows no helicone tag from August 1 to November 23. Cost to us: $0 a month.
The Helicone cache Valkey cluster was never created. If built in production it would cost roughly $300 to $700 a month per shard pair (estimate).
So "moving off Helicone" is a decision to merge #2980 and cut traffic over, not a teardown of our own infrastructure.
Helicone's own infrastructure is in Helicone's accounts
Helicone's ClickHouse, S3, Postgres and jawn run in Helicone's own accounts. api.helicone.ai points at Helicone's jawn-prod-blue-green load balancer, which is not in our AWS accounts, and the other Helicone hostnames resolve to Helicone's Cloudflare. The helicone.ai zone is not in our Cloudflare account. Nobody here has read access, so the size, traffic and cost of that stack are unknown. Getting read-only access is the first step to sizing the shutdown.
What blocks turning Helicone off
Blocker
What it means
Forwarded traffic
Everything we do not serve goes to Helicone US unchanged: 11 vendor hosts with no adapter (groq, perplexity, deepinfra, hyperbolic, nvidia, llama, predibase, qstash, firecrawl, vercel, llmmapper), Bedrock, prompt generation, customer-owned gateway domains, vault keys and dashboard logins. In the REST API: datasets, evals, alerts, vault, legacy prompt writes and dashboard metrics. Customer-owned domains are outside Helicone's zone, so DNS can never move them.
EU
Every EU host and EU key gets a 421 at our edge. EU orgs are never imported and EU history is never copied. No EU deployment exists.
Missing importers
No importer for prompts, webhook configurations (with their signing keys), org members, stored provider keys, or scores and feedback. Read-only Helicone keys are skipped on purpose, because we have no read-only key scope.
Nothing switched on
The Helicone host list is empty by default, DNS still points at Helicone, the history import is behind a legal switch that is off, and the webhook worker and the cache ship off.
No measurement
The edge counts neither forwarded requests nor 421s, and the worker's header counters are never emitted. So nothing can show forwarded traffic at zero, which is the signal for turning Helicone off.
Once switched on, these become customer contracts
Helicone hostnames (oai, anthropic, gateway, ai-gateway, vendor hosts, api, api.worker), sk-helicone- keys, Helicone-* request and response headers, the Helicone REST API, the SDK log endpoints, and signed webhooks. Customers keep these in their code, so removing any of them later is a product decision with customer notice, not cleanup.
Helicone-named pieces that #2980 adds on our side
15 helicone_* Postgres tables, 4 pg_cron jobs, a Vault secret per webhook signing key, the webhook worker, and a Valkey cluster for the Helicone cache. These are our compatibility product, not Helicone's infrastructure, and stay while customers use Helicone hosts, keys or headers. The Valkey cluster also holds the Responses continuation spill for Postgres outages (card 25), so it outlives Helicone; at most it gets renamed.
The path, in order
Owner decisions (card 39): EU; read-only keys; Helicone plans and billing; customer-owned domains; the unadapted vendors; legal for the history import; and whether to keep or delete the "switch from Helicone" marketing pages.
Read access to Helicone's accounts, to size and cost its stack.
Build the missing importers and the forwarded-traffic metrics.
Deploy #2980, then move the Helicone hosts one at a time, with Helicone as the rollback target.
Turn off Helicone US servers once forwarded traffic is measured at zero for a sustained window, then EU (per the EU decision).
Delete Helicone data last, after the history import and any retention or deletion duties under Helicone's terms.
A broken link.docs/helicone-move.md names /tmp/obs-build/decisions/helicone.md as its decision log; that file does not exist.
Decisions
Decided you have answered it; it is built that way. Confirm I read your answer one way; please confirm. Your call it needs your decision; the reasoning and options are below. Decided items come off this list once they are built and verified.
The cards are grouped: "Your call" first, then the partial one (11), then "Confirm", then "Decided". Within each group they keep their numbers. Cards A to D come from the plan review of 2026-11-20, 17 to 21 from the UX review, and 22 onward from the adversarial rounds of 2026-11-22.
Provisional defaults. Decisions 3, 4, 5, 9, 10, 13 and 14 are built with a provisional default so the code could move forward. You asked for more information on them; you have not decided them. Each card says what the code does now and what changes if you decide otherwise. #2980, which carries all of them, stays do-not-merge until you answer.
Where this runs. Nothing goes to staging or production. Everything is proven in the isolated preview environment (its own AWS account, its own database branch, its own cluster).
Your call
Simplification options A to D (from the 2026-11-20 plan review). Each cuts code or operating cost.
Your callA. One capture destination
Today. Capture can write three ways: inline into Postgres (production's default), segments (pod disk, then S3, then the ETL into ClickHouse), and a mirror state that writes both and gates reads. Every capture feature is tested three ways, and the read gate caused two of this week's preview bugs.
Proposal. Once segments run in an environment, make it the only mode there and delete inline and the mirror. Trade-off. Segments depend on S3, SQS and the ETL being up (the pod disk buffers up to 2 GiB when they are not), while inline only needs Postgres; but inline keeps capture load on the Postgres the plan is moving off. Recommendation: yes, after segments are proven in production.
Your callB. Fold the new background apps into one
Today. The plan adds about five Porter apps (wallet writeback, trace-tag worker, dataset-run worker, Helicone webhooks, deploy units), each with its own spec, readiness check, alarms, CPU booking and place in the release order.
Proposal. One background app runs several worker processes. Trade-off. Fewer things to deploy and watch, but you lose per-worker scaling on queue backlog and per-worker AWS roles (one role would hold the union of permissions), and a bad deploy of one worker restarts all. Recommendation: partly. Fold the low-volume workers (tags, dataset runs, Helicone webhooks). Keep the wallet writeback (money) and the capture ETL (heavy, its own AWS role) separate.
Your callC. Open the maintenance window automatically
Today. Before a planned Postgres restart, an operator opens the window, waits until every pod has seen it, then restarts. Forgetting it means protected chains (52% of traffic) get retryable 503s for the whole restart.
Proposal. The restart tool opens a window sized to the restart, waits for readiness, restarts, and reports. Trade-off. A window freezes releases and catalog publishing for its length and cannot be ended early, so it must only open as part of an actual restart command, never on its own. Recommendation: yes.
Your callD. Table lifetimes without copying
Today (D3). Big tables (gateway_attempts is 238 to 311 GB) get a partitioned shadow copy kept in step by a change log and triggers on hot tables, then a cut-over. The copy is slow, the triggers sit on the busiest tables, and a column added later on main was already missed once in testing.
Proposal. Create the new partitioned table, send new writes to it at a cut-over, and read old plus new through a view for the 120-day retention window; drop the old table when the window passes. No copy, no dual-write triggers. Trade-off. Reads through the view are a little slower while both tables exist, uniqueness across both needs care, and the old table lives 120 more days. Recommendation: yes.
Your call4. Who pays for, and controls, the judge that scores a customer's tags
What this is. A customer defines a tag, for example "did the agent give up?". As their traffic arrives, a judge model (Clef by default, or a model they pick) reads each captured request and answers the question. That judge call is itself a model call. The question is: whose account makes that call?
A. Through a key inside the customer's org (built)
B. Through our house account, then charge the customer a fee
What the customer sees
Each judge call appears in their own usage, with model, tokens and cost, under a key named "Trace tagging" marked system-managed (they can't edit it; it expires every 15 minutes)
One line "tagging fee" per period; no per-call detail
Their privacy settings
Apply automatically: no-training, provider allowlist, zero data retention, their rate limits
Do not apply: the call runs under our account's settings, so we would need a second copy of their policy logic for the judge
Risk at scale
Spread across each customer's own balance
Every customer's judge traffic runs through one house organization: the hot-row problem behind the September and November incidents, and on 2026-10-03 the house org ran out of credits and everything it funded stopped
Fits the repo rule "no hidden customer key"
Yes: the key is visible and labeled, not hidden
Yes
Recommendation: A. It is the only option where a customer's own privacy choices govern a model reading their data, and it keeps money spread out instead of on one hot account.
What the code does now (updated 2026-11-20). Option A is built in #2980: judge calls run through a key named "Trace tagging" inside the customer's org, marked system-managed, that expires every 15 minutes.
This is a provisional default, not your decision. You wrote "share more? not sure". A is the recommendation; you have not chosen it.
If you decide otherwise. If you choose B, judge calls move to our house account, the customer sees one fee line per period, and the judge needs its own copy of each org's privacy rules. PR 8 changes before it merges.
Your call5. Revoking access to a private model takes up to 2 seconds instead of instantly
What changed. Before, every request checked Postgres to see whether the org may use a private (org-only) model. That is one of the Postgres reads that turned database incidents into API outages. Now each gateway worker keeps that list in memory and refreshes it every 2 seconds from a change feed.
The cost. If you revoke an org's access to a private model, requests already in flight, and any that arrive in the next 2 seconds, still go through. The same 2-second window already applies to revoking API keys. Blocks that matter for money (quarantine, ban, spend lock, revoked keys) are not affected: they are enforced inside the wallet within about 1 second.
Recommendation: accept. A 2-second window on a non-money permission buys requests that keep working during a Postgres outage.
What the code does now (updated 2026-11-20). #2980 holds the private-model list in each worker's memory and refreshes it every 2 seconds. During a Postgres outage that list is kept for at most 15 minutes, not the 60 minutes in D1 (being fixed).
This is a provisional default, not your decision. You wrote "same here". Accepting the 2-second window is the recommendation; you have not decided it.
If you decide otherwise. If you want revocation to be instant, private-model requests go back to one Postgres read per request. Those requests then fail again during a Postgres outage. PR 4 changes before it merges.
Your call6 to 8. The Helicone move
The plan (D12). We own Helicone. Helicone customers should change nothing: same hosts, same keys, same headers, same SDKs, same API. Our gateway answers Helicone's hostnames behind Helicone's own DNS; anything we do not serve yet is relayed unchanged to Helicone's servers, so nothing breaks while we catch up. Their history is copied into our stores; EU data stays on Helicone's EU stack. The dashboard moves page by page once each page matches. Every piece is built and tested; the history copy and the DNS switch are off.
Decision
Why it matters
Options
Recommendation
6. Legal sign-off before any customer data moves
Helicone holds its customers' data under its own DPA as their processor. Moving it to our stack is a change of sub-processor. DPAs usually require written notice (often 30 days) and a right to object; some contracts restrict assignment.
(a) Legal reviews the DPA and assignment clause, then we send notice; (b) move without review
(a). Until then, the gateway can still serve Helicone traffic by relaying it; only copying stored data and switching DNS wait.
7. Which plan and price a moved org is on
Nothing bills from the stored Helicone plan today.
(a) Keep their Helicone plan and price until their next renewal, then move to ours; (b) move to our plans at once; (c) keep Helicone pricing forever
(a). "Change nothing" includes their bill; renewal is the natural, expected moment to change it.
8. How moved members sign in to our dashboard
Today only orgs and API keys are imported; people cannot sign in yet.
(a) Import members by email; first sign-in with an emailed code; (b) bridge Helicone's login so their existing session works; (c) ask everyone to sign up again
(a). No passwords move between systems; the email address is the identity both sides already trust; it needs no shared session secrets.
Your call9. How many MemoryDB shards the wallet runs on
Where we are. The wallet (live balances and holds for every org) runs on one MemoryDB shard: one primary node, two replicas, about $946 a month. All 64 wallet slots live on that one shard.
What we measured. When AWS fails that shard over to a replica (a maintenance event or a node fault), every platform-funded request for every org gets a retryable 503 for about 14 to 15.5 seconds (measured twice on real MemoryDB). No money is lost; requests are refused, not mischarged.
Option
Failover affects
Cost
1 shard (today)
All orgs, about 15 s
about $946/month
2 shards
Half the orgs, about 15 s (the 64 slots split 32 and 32)
about $1,900/month
4 larger shards (needed only at 10x today's traffic)
A quarter of the orgs
about $7,600/month
Recommendation: 2 shards. It halves the blast radius of the most likely wallet outage for about $950 a month more. More shards do not make a failover shorter, so beyond 2 we only add shards when traffic needs the capacity.
What the code does now (updated 2026-11-20). 1 shard ships. In infra/fast-ledger/terraform/aws/variables.tf, num_shards defaults to 1, but its comment says "Decided: 2 for production". That comment is wrong and is being corrected.
This is a provisional default, not your decision. You wrote "I need more info here". 2 shards is the recommendation waiting for you, not a decision.
If you decide otherwise. If you choose 2 or 4, one Terraform change sets num_shards (about $950 a month more for 2), applied before the wallet in #2980 goes live. If you keep 1, the comment is corrected to say so and nothing else changes.
Your call10. How long finished charges are kept in the wallet
What these are. When a request finishes, its hold is settled and a short record of it stays in MemoryDB. That record is what stops a late or repeated settle (a retry, a replayed receipt, a writeback that re-runs after a crash) from charging the customer twice. Today the record is kept for 24 hours.
The trade. At today's traffic these records are a few GB. At 10x traffic they would be about 52 of the wallet's 102 GB. Keeping them 1 hour instead would shrink them 24 times. But the longest receipt delay we have actually seen in production was 55 minutes (November 11), so a 1-hour window leaves almost no margin: a settle arriving later than that could charge twice.
Recommendation: keep 24 hours now. Memory is not a problem at today's size. If traffic grows toward 10x, drop to 6 hours (six times the worst delay we have seen) rather than 1.
What the code does now (updated 2026-11-20). Finished-charge records are kept for 24 hours (PR 4, #3093).
This is a provisional default, not your decision. You wrote "same". Keeping 24 hours is the recommendation; you have not decided it.
If you decide otherwise. If you choose a shorter time, one setting changes. Below the 55-minute worst delay seen in production, a late settle could charge a customer twice.
Your call13. How customers get the traces CLI and MCP server
What it is. A command line (list, get and search traces, sessions and requests; tree-first JSON output; cursors) and an MCP server, so a customer's coding agent can debug their agent traces. The customer who left Helicone for Langfuse said this is their main interface ("we give our agents the CLI").
Option
For
Against
(a) exp traces inside the public engine CLI
Customers already install exp (exp login, exp capture); one tool, one login; no new package
Ships with the next engine release; the code must read as standalone open source (it is a client of our public API, which it can)
(b) A separate public package (explabs-traces)
Releases on its own schedule
A second tool and login for customers; another package to maintain
(c) Keep it private
None
Customers can't install it, which defeats the point
Recommendation: (a).
What the code does now (updated 2026-11-20). The CLI and MCP server are commands of the private platform package (explabs-traces and explabs-traces-mcp in pyproject.toml, PR 7, #3096). No customer can install them, and there is no hosted MCP server.
This is a provisional default, not your decision. You asked for more information. (a) is the recommendation; you have not chosen it.
If you decide otherwise. With (a), the code moves into the engine CLI as exp traces and ships with the next engine release. With (b), it moves to a new public package. Either way #2980 drops the private commands. Keeping them private, (c), means customers still get nothing.
Your call14. Kion's offline tagging PRs (#2911, #2926, #2930, #2931)
Correction to my earlier note. I said close them. That was wrong. They are Kion's offline tagging system: background runs that score captured traffic against our own tag bank, on rented GPU nodes running Clef, with results in ClickHouse and an erasure thread so tags never outlive their capture. One of their ClickHouse tables (migration 0010) was applied by hand to the shared ClickHouse service on 2026-10-15.
How it relates to this PR. #2980 builds customer-defined tags, scored online as calls arrive, billed to the customer, shown on the Quality page. Different purpose, same idea of "a judge scores a capture". Where they overlap: both store tag scores in ClickHouse, both must be erased with the capture, and both read capture content. The concrete conflict is migration numbering: Kion's 0010 versus this PR's ClickHouse numbers, and two separate tag-score tables.
Recommendation: keep Kion's PRs and reconcile, with Kion. Agree one tag-score store and one erasure path for both lanes, renumber whichever side is not yet applied, and merge his offline lane on its own. That is Kion's work, so the reconciliation should be agreed with him, not decided here.
What the code does now (updated 2026-11-20). The stack keeps its own tag-score tables in ClickHouse and its own erasure path. Kion's PRs are still open, and his table from migration 0010 already exists in shared ClickHouse. So there are two tag-score stores and two erasure paths. If both land separately, an erasure can miss one of them.
This is a provisional default, not your decision. You asked for more information. Reconciling with Kion is the recommendation; nothing is agreed with him.
If you decide otherwise. If you accept it, one tag-score store and one erasure path are agreed with Kion before #2980 merges. If you keep the two lanes separate, the erasure job (D19) must name Kion's tables explicitly before either lane merges.
From the UX review (17 to 21). A sixth question from that review: whether the requests read should carry a per-row "stored" flag, so a missing preview can say "not stored" or "not yet".
Your call17. Requests sent without a session
Today. A request sent with no session shows its trace id as a green session link, so every such call looks like a one-request session. Helicone and OpenRouter show nothing there.
Options. Show "-" or "No session" for these rows, or keep the trace id link. Trade-off. The empty cell matches the tools customers know and stops one-call "sessions" from crowding the list; the link keeps a one-click way to that call's trace.
Your call18. Listing refusals that happen before admission
Today. Requests refused before admission (an unknown model 403, a bad header 400) are not in the Requests list; only /admin/errors sees them. Helicone shows every call.
Options. List them on the Requests page, or keep them on the admin errors page only. Trade-off. Listing them shows customers every call they made, including the ones that never reached a model; they have no request row today, so the table would read a second source.
Your call19. Default sampling for a new tag: 10% or 100%
Today. The tag editor defaults to 10% of sessions, while the API defaults to 100%. On low traffic a new tag at 10% can look broken for a long time.
Options. 100% in both, 10% in both, or keep them different. Trade-off. 100% shows results at once on low traffic; 10% keeps the judge calls the customer pays for low on busy traffic. One default in both places removes the surprise either way.
Your call20. Requests table on a phone
Today. At 390 px only Time, Status and Model fit; Preview, Session and Cost sit off to the right behind a horizontal scroll.
Options. A card layout for phones with the preview first, or keep the scrolling table. Trade-off. Cards are readable on a phone but are a second layout to build and keep in step with the table.
Your call21. Session and tree previews
Today. The sessions list shows no first-question preview, and the session tree shows no per-step text (UX gaps 25 and 27, still open). Your "metadata previews" ask covers sessions too.
Options. Build both before launch, build them after launch, or leave sessions without previews. Trade-off. Previews make a session readable without opening it; they read stored text, so they show only where capture runs in segments mode and the organization stores prompts.
UX agent's recommendations for 17 to 21 (2026-11-22). 17: show "-" for requests sent without a session (Helicone and OpenRouter do this), and keep the trace in the drawer. 18: list refusals before admission on the Requests page, marked "Refused before a model"; these are the 400s customers debug first. 19: default a new tag to 100% sampling under the existing budget cap; at 10% a new tag on low traffic looks broken for days. 20: phone layout as cards with the preview first; at 390 px only time, status and model fit. 21: build session and tree previews before launch.
Your call22. When the old request-API parameter names stop working
Today. Main documents /usage/requests parameters (attribution_label, cache_hits_only, status=error, sort=oldest, conversation, cursor_ts/cursor_id/cursor_after) that #2980 had replaced, which would have broken customers' billing jobs. They now keep working with identical rows, proven by a test per parameter and by main's documented paging loop, and answers carry a deprecation notice.
Recommendation. Remove them on 2027-05-21. From 2027-02-21, send a Sunset header and email the admins of orgs whose keys still use them. Why. Billing jobs run monthly and are rarely touched; six months covers two quarterly reviews.
Your call23. One-click thumbs up or down in the request drawer
Today. Marking a bad answer takes 3 clicks plus creating a score type first. LangSmith and Helicone make it one click.
Recommendation. Add it, backed by a built-in score type created on first use. Trade-off. One more control in the drawer; a built-in score type that every org gets.
Your call24. Update session and trace summaries in the background
Today. Every span write recomputes the session and trace summaries before it returns. With long sessions stored, this recompute is what limits the capture pipeline (about 2,100 spans/s on one ClickHouse CPU, against 4,800 on an empty table).
Recommendation. Recompute every 1 to 2 s in the background, so summaries may lag new spans by up to 2 s. Trade-off. The next large speedup, but it weakens today's guarantee that a summary is current when the write returns.
Your call28. Light-mode text contrast
Today. In light mode, the lighter grey text (--muted-2, #8f8f8f) is 3.1:1 against the page background, and the muted grey on the soft accent is 4.1:1. WCAG 2.2 AA needs 4.5:1 for body text. Dark mode passes. It affects every page, not only Observability.
Recommendation. Change --muted to #6b6b6b and --muted-2 to #707070. Trade-off. Grey text gets slightly darker everywhere, and the two greys become nearly the same, so the third level of text emphasis mostly goes away.
Your call32. Found on main, outside the data plan
Sign-in bug (production). A sign-up refused because an address with the same mailbox already has an account (you+one@ then you+two@) shows a code step, but no code is ever sent. A small PR on main fixes it to say the account exists; it changes customer-facing sign-in, so it waits for your approval.
Preview seed bug. The preview admin seed leaves four login-token fields empty, which breaks the auth service's user list on previews. Preview-only fix on main.
Onboarding suggestions (each its own PR if you want them): label the last step's button as finishing; show one card-verification prompt instead of a banner plus a popup; name a new org from the email domain or the person's name instead of the part of the email before the @.
Next.js 16.4.1 has 7 moderate advisories fixed after 16.4.4, and its build fails every other run. The upgrade belongs in its own PR on main.
Your call33. Raise preview pr-902980's real-model budget once
Today. Each preview gets $5 of real model calls for its whole life, never renewed. The preview relay holds the worst case for every call ($0.0008 to $0.004) and never refunds the unused part, while a call really costs about $0.000018. So pr-902980 spent its $5 in about 1,400 calls, mostly the failure tests, and since 14:44 UTC on 2026-11-22 its real model (preview-gpt-4.1-mini) refuses every call. The stand-in model still works for everything except real answers.
Recommendation. Raise this preview's budget once by $5 (an operator lowers the "used" amount in the relay's ledger), so you can try Playground and live chat. Trade-off. It bends the documented "never renews" rule for one preview.
Separately, a small PR on main: settle each call's hold to its actual cost after the answer. At today's mix, $5 would then last about 277,000 calls instead of about 1,400.
Your call36. Serve bring-your-own-key calls while the wallet store is down
Today. When the wallet store (MemoryDB) is unreachable, calls on platform-funded models get a fast retryable 503 (decided under D6). Calls that use a customer's own provider key get the same 503, because even a zero-cost call places a hold in the wallet; that hold runs the ban and revoke check and carries the record that later lands the request in Postgres.
Option. Serve bring-your-own-key calls during the outage: check bans and revoked keys from the gateway's in-memory copy (already used during a Postgres outage), and record the request through the Postgres spool built in round 7. Trade-off. Customers on their own keys keep working through a wallet outage; the cost is a second, outage-only path for those calls' records, and a ban or revoke made in the last few seconds before the outage could be missed until it ends. Recommendation: build it; customers paying their own provider should not lose service when our wallet store fails.
Your call37. Observability gaps from the completeness check (2026-11-22)
Local capture ("Proxy traffic"). The Requests > More button that sets up exp capture is platform-admin only, and what it captures used to land where Requests, Sessions and Traces do not read (so did trace uploads and the Langfuse and Braintrust pulls). Fixed and verified on the preview in round 12: all of it goes through the same span sink as OTLP. Your call: rename it "Local capture", and decide who sees it (recommendation: every org admin, since it is a self-serve way to get traffic in).
A Traces list page. The API exists; there is no page that lists traces on their own (traces are reached from sessions and requests). Recommendation: add it, since agent-framework users think in traces.
A trace SQL screen. Trace SQL works through the API only. Recommendation: hold until customers ask; the API covers power users.
Users view and tag filters. Built and verified live on the preview in round 12: per-user totals and a tag-key picker in the Requests filters, which also gives Helicone's /users and /properties links somewhere to land.
Your call38. How to prove the deploy-layout changes
Today. The isolated preview controller runs from main, and only reviewed code on main runs with its credentials. It builds #2980's images but deploys them with main's controller, main's deploy_porter_apps.sh and main's preview provisioners. So the layout changes in #2980 have run nowhere: the background units, the dashboard edge, the writeback app and queue-age autoscaling; the Helicone webhook worker and the separate Helicone response cache; direct announce (its switch and its queue send permissions); and the 3,900 s gateway startup budget. 46 audited claims wait on this (see What the preview could not test).
Option
What it means
Trade-off
(a) Land the controller and deploy-script changes on main first
A PR on main adds the deploy-units capability, the announce switch and its queue send grants, the Helicone cache provisioning, the tag backlog service account, the deploy-script blocks for the units, announce and the Helicone cache, and the startup budget. Each is opt-in and off by default, as AGENTS.md requires for a new deploy prerequisite. Main's preview then renders the PR's layout for any head that carries it. Redeploy pr-902980 and re-run the unproven claims.
One more PR on main to review and land first, and main carries switches nothing uses until #2980 merges. The trust boundary stays as it is.
(b) A preview mode that deploys with the PR head's scripts
A controller option renders the preview with the PR's own deploy script and provisioners.
Proves the exact layout in one step, but crosses the trust boundary: unreviewed PR code would run with the controller's credentials. Needs your sign-off.
(c) Prove it on staging after merge
Switch each unit on in staging, one at a time, and run the tests there.
No preview work, but the proof comes after the merge, costs a staging rehearsal round, and a failure shows up on a shared environment.
Recommendation: (a). It keeps the trust boundary, follows the rule for new deploy prerequisites, and proves the layout before #2980 merges.
Hand-applied steps to replace, whichever option you pick. Set the control instance count in the deploy instead of scaling it by hand; provision the stand-in model lane through the controller instead of kubectl and aws; load test data through the fixture instead of inserting it. Then re-run the tests that depended on them.
Your call39. Moving off Helicone
Today. #2980 serves Helicone customers on our platform but keeps Helicone's own stack running behind it. Nothing Helicone-related runs on our side yet ($0 a month). See Moving off Helicone: where it stands. These decisions come before any shutdown:
EU. Build an EU deployment, keep Helicone EU running, or end EU service. Until decided, Helicone EU cannot be turned off.
Read-only Helicone keys. Build a read-only key scope, or ask those customers to mint full keys.
Plans and billing for Helicone orgs, including ai-gateway credit balances (cards 6 to 8 cover the plan on move).
Customer-owned gateway domains. Ask each owner to repoint, or end them; DNS cannot move them.
The 11 unadapted vendors, Bedrock and prompt generation. Build adapters, or announce an end date.
Legal for the history import (assignment clause, DPA, sub-processor notice), which also gates moving stored provider keys (card 6).
The "switch from Helicone" marketing pages. Keep or delete them, now that we own Helicone.
Read-only access to Helicone's accounts, so we can size and cost its stack before planning the shutdown.
Recommendation. Grant the read access first; it costs nothing and every later step needs the numbers.
Partial
Partial11. Rehearsals before any database restart
Updated 2026-11-18: partial, not done. Run in the preview under load, four rounds (see Database restart). Cuts of 41 to 70 s on a small preview database; in round 4, zero errors on known keys. The protected-chain path was tested only locally (flow 12), since the preview has no protected chains. The psycopg fix (#3046) is live in production.
Not yet run: the 10-minute cut on production-sized data, and the MemoryDB failover game day (its script is allowed only against staging, and the preview's ElastiCache Serverless cannot answer the failover question). A production restart that keeps protected chains serving needs the maintenance window, which ships with the request-path PR (PR 4) of the stack.
Confirm
Confirm3. Free plan: we retain, not subject to any term
My reading: free-plan organizations get no expiry of their captured data (we keep it), and this is not something we put into a terms change. So the built-in "free default expiry of 14 days, maximum 30" is removed rather than shipped switched off, and the free plan has no customer-set expiry control. Paid plans keep their expiry controls. If you meant something else (for example "free orgs can still set a shorter expiry themselves"), tell me and I change it.
What the code does now (updated 2026-11-20). The switch is still in the code: free_default_enabled (off by default), free_default_days (14) and free_max_days are in the retention settings, and the retention API returns them (explabs/api/routes/retention.py). With the switch off, free orgs get no forced expiry, which matches "we retain".
This is a provisional default, not your decision. Please confirm the reading above. Until you do, the switch stays in the code, switched off.
If you decide otherwise. If you confirm it, the switch and its three fields are removed from the settings, the API and the page. If you meant that free orgs can still set a shorter expiry themselves, the expiry controls open to the free plan instead, and the switch is still removed.
Confirm27. Give previews the Helicone cache cluster
Today. Production has the Helicone cache cluster; previews do not, so design 25's shared spill cannot be tested on a preview. Recommendation. A preview-plumbing PR on main provisions it for previews, sized small. Trade-off. One more resource per preview (cost and setup time) in exchange for a preview that matches production.
Confirm30. Membership-read audit records stay a background write
Today. When a member reads an org page, the record of who looked is written in the background, after the answer. A web pod killed hard can lose at most the last 1,024 records (typically the last second or two). Access decisions and audit records of changes are not affected.
Recommendation. Keep it. The alternative. Writing the record before answering adds about 27 ms to every org-gated request and makes customer reads fail whenever the audit database is down. A local disk spool would close the gap at about 1 ms, but web pods have no persistent disk today.
Confirm35. Make a stored prompt searchable within 5 seconds (about $160 a month)
Today. On a quiet preview, a stored prompt becomes searchable in 4.3 s typically and 5.8 s for the slowest 1 in 20. Most of that is the 2 s interval between capture uploads plus about 1 s waiting for the storage notification.
Built (round 4), modeled from preview stage timings: upload every 1 s instead of 2, and have the uploader post the queue message itself (the storage notification stays as a backstop). Slowest 1 in 20 drops to about 3.8 s (typical 2.1 s); either change alone only reaches about 4.7 s. Cost: about $13 more per busy gateway server per month, about $160 a month for 12 servers, half from doubled storage writes and half from queue messages; quiet traffic costs nothing extra. The direct queue message ships behind a switch that is off by default. Recommendation: keep both. Not yet measured end to end on the preview.
Decided
Decided1. Rollout: ship to everyone
The new Requests table, the Quality page, retention settings and per-key storage controls go live to every customer when the PR deploys. No early-access gate.
Note (updated 2026-11-20).#3034 merged on 2026-11-19 at 22:39 UTC and removed the early-access rule from AGENTS.md, so this no longer conflicts with a written repo rule. One consequence to know: the pages go live for everyone on deploy, but the pipeline that fills them (capture to segments, the ETL, the tag worker) is off by default. Without it, Preview shows "-" on every row, search never matches, and tags never score. The review recommends turning the pipeline on before these PRs deploy, or hiding those parts while it is off.
Decided2. Uncensored models follow the published privacy policy
New requests to uncensored models follow the same capture and zero-data-retention rules as every other model. Historical uncensored captures keep their original retention.
Decided12. Engine release for media and Decisions capture
Yes. Status: in progress (updated 2026-11-18). The engine change (new capture protocols for Decisions, embeddings, images, speech, transcription and video, and a media field on the capture record) is open as engine PR experiential#1412 (not merged, not released). It is opt-in: the pin bump alone changes nothing; the platform turns each new surface on after its capture writer, retention rules and media spill handling are in place (steps listed in the PR). An earlier version of this page said the PR already existed before today; that was wrong. Releasing the engine follows its own release process, and until a release ships and the pin is bumped, media and Decisions content is not captured.
Decided15 and 16. Provider key and laptop Docker
15: no action needed. 16: done: 51 stale containers from other sessions stopped (not removed; they can be started again).
Decided25. Responses conversations during a Postgres outage
Problem. In a local 10-minute outage, 146 of 146 continued conversations were refused with "resend the full conversation", and conversations started during the outage stayed broken afterward.
Design
Turns kept working
Today
0 of 146
A: each worker keeps recent state in memory
58% locally, about 8% on 12 workers
B: during an outage only, spill to the Helicone cache cluster, copy into Postgres after
95% (139 of 146), and broken conversations are repaired
A and B
97% (142 of 146)
Chosen: A and B, because you asked that a database restart not hurt API traffic. Conditions: only content the request allows to be stored, never ZDR; purge at once on storage-off, ZDR, org deletion and erasure; at most 60 minutes (the one outage bound); a per-org size cap; never the wallet store; any miss falls back to today's explicit resend error. Reversible: turning it off returns to today's behavior. It keeps conversation content in a cache for up to an hour during an outage; the Helicone response cache already holds response content in that cluster.
Decided26. Smaller technical calls from the rounds
Every customer ClickHouse read carries the per-org quota key, with a test that fails any read path without it.
Grant and limit-policy caches move from 2 s to 60 s, invalidated by the change feed, so access and limit changes still apply within about 2 s.
Ingest limits stay per pod and are documented that way; the edge's per-org admission is the fleet-wide fairness control.
Main's documented request-API parameters keep working (see 22) instead of breaking live callers.
Decided29. Failed requests open on the reason
In the request drawer, a failed request shows its failure reason and the provider attempts first, above the Keep and Scores controls. Finding why a request failed is the most common task in the walk (now 2 clicks, down from 5).
Decided31. More technical calls from round 2
A brand-new org's first request gets 2 s and one retry for its first database load, and idle database connections are checked before use (half of new orgs failed their first call before this).
Fair admission is worker-wide and by organization at the edge, so many keys of one org cannot crowd out another org. Model listings never take an admission slot.
The database outage check keeps one warm connection of its own; request logging writes through its own connection.
An answer cut only by its length limit is a warning, not an error, everywhere counts appear (this reverses a documented rule).
An unknown X-Explabs-Storage value is refused with an error naming the valid values; Helicone omit headers stay lenient (an unclear value stores less, never more).
Wallet-outage refusals stay as they are: retryable, about 7 s for a 5 s stall.
The step that makes captured text searchable runs 8 workers with batched writes.
Decided34. Failure behavior from the preview tests (rounds 2 and 3)
Wallet store unreachable (D6): money fails closed and callers get a retryable error. New in round 4: after one failed wallet call, wallet calls are refused at once for 2 s, then one is tried; each request waits at most about 2 s; requests that do not need the wallet never wait. Worst case dropped from 36 s to about 2.5 s in the local test.
Charge recording during a wallet cut retries for up to 15 s and can never charge twice. A cut longer than 15 s at that exact step still returns an error; a typed engine error is an engine follow-up.
Quiet servers: connections the database pooler closed while a server was idle are checked before use and never count as an outage.
The capture pipeline reads with its own budget, never the customers' read limit, so neither can starve the other.
Separate ClickHouse compute for customer reads (needed, not optional): on the preview's 1-vCPU ClickHouse, the capture pipeline catching up after the failure tests used 979 of 1,000 millicores, and every customer read slowed about 2x (the 30-day Requests page 552 to 995 ms). In production, customer reads go to their own read-only compute group so the pipeline can never slow a page.
ClickHouse sizing for production: at least 4 vCPU per concurrent heavy reader; a cost-sorted copy of the requests table was tested and rejected (13% more write time, 25% more disk, and the default view got 2x slower).
For later, not now: steps that would touch staging or production
Listed so nothing is lost; none of these run while we work in the preview: Terraform applies for trace storage, trace tags, the control-plane role, the audit archive and the Helicone cache cluster; alarm wiring; a read-only ClickHouse compute group and the per-environment backfills; checking the read replica's statement timeout; the secret rotations; the go to disable the test-host lanes.
D1 to D20: the plan's decisions
Each decision gives what we do, why, what we rejected and, where it matters, when we would revisit it. A review line names what changed after the review.
D1 · request path
Requests never touch Postgres, and blocks never depend on a snapshot
Decision. API keys, permissions, the catalog, prices, promotions and model-chain revisions are held in the Rust engine's memory. For keys, only those used in the last 30 days are held, as hash plus organization at about 150 bytes each. A version poll fetches only the rows that changed. The first time a worker sees a key, it costs one database read; concurrent misses for the same key share one read, unknown keys get a short negative cache that a key mint clears, and unknown-key reads are rate-capped per worker.
The facts that stop spending (quarantine, ban, spend lock, revoked key) live in MemoryDB in the organization's own slot. The credit feed writes them there, and the reserve script checks them, so a block takes effect within one feed cycle whether or not Postgres is up. During a Postgres outage, allowed answers are served for up to 60 minutes, because blocks no longer come from the snapshot.
updated 2026-11-21Fixed. On 2026-11-20 the code bounded keys and grants at 15 minutes while this plan said 60. Every outage path now reads one constant, OUTAGE_SERVE_STALE_SECONDS = 3600 in explabs/outage_bound.py: admission owners, grant, listing and retention caches, limiter policies, dispatch credentials, reserve price facts, the public alias directory, the outage-blocks authority and the refresh-ahead cache (which used to serve any age in an outage). A test fails if any path uses its own number. Still to run: a Postgres cut longer than 15 minutes in the preview with idle keys.
Promotion-period baselines and plan caps move into MemoryDB. If a plan or price fact cannot be read, the request is refused; it never switches to the Postgres ledger in mid-flight. last_used moves off the request thread. Readiness depends only on the catalog and MemoryDB, and a 500 ms breaker guards each remaining call. Named exceptions that still need Postgres per request: reseller keys, video, batches, and the first wallet seed of a new organization. All of them fail closed during an outage, with a clear error.
Also still bound to Postgres during an outage:
Protected model chains outside a maintenance window (about 52% of production traffic on 2026-11-18). Each request writes a receipt in Postgres before it is served. Inside a planned window (D16) pods serve them from what they last read; outside one they get a retryable 503.
Responses continuations (previous_response_id): their state lives in Postgres, so they answer 400 during an outage.
Keys a worker first sees during an outage get a retryable 503. A never-used key is served only by a worker that already read it.
Pods cannot start while Postgres is down, so the fleet cannot scale up or replace a pod during an outage.
New blocks during an outage. A quarantine, ban or key revoke is written to Postgres first, so none can be applied while it is down. The planned operator command for this is not built.
Why. Every Postgres incident became an API incident through these reads. Before the review, a stale snapshot could keep serving a quarantined card tester or a revoked key for 5 minutes. Holding blocks in the wallet makes enforcement atomic with spending.
Rejected. Caching every key in Python dictionaries, about 15 GB across 30 pods at a million keys. Falling back to the Postgres ledger when a fact read fails: that ledger cannot see open MemoryDB holds, so two ledgers would both admit against one balance.
review Reliability, money and cost reviews: deny set in MemoryDB, single-flight and negative cache, compact active-key snapshot, named exceptions, no ledger switch.
updated 2026-11-18 The exception list now names protected chains, continuations, first-seen keys, pod starts and blocks during an outage. On the preview, Postgres cuts of 46 s and 70 s gave zero errors on known keys (plain chains only; the preview has no protected chains).
D2 · captures
Captures go to our S3; a full buffer drops the copy, not the customer
Decision. Each gateway pod writes its captures into one batched raw segment, flushed every 2 s or at 16 MB, to our raw S3 bucket. Every record carries its consent and zero-data-retention verdict. S3 announces each segment on SQS, and the capture ETL on Fargate loads it: one processed object per request, new chunks checked with a conditional PUT, ClickHouse inserts batched every 1 to 5 s. Tasks are limited by bytes in flight, the minimum task count is above zero, and scaling follows queue age.
If the in-memory segment buffer is full, the request is still served. Its capture becomes a metadata-only record, and a counter and alarm show the loss per tier. Only traffic covered by a written retention agreement (the 1 to 90 day contracts the privacy page describes) is refused when its capture cannot be kept. Uncensored models follow the same capture and zero-data-retention controls as every other model, as the live privacy policy says. An S3 listing sweep finds segments SQS missed, and the dead-letter queue has a redrive command.
Why. Supabase Storage writes a Postgres row per upload, which made Postgres speed a customer-facing limit. Batched segments cut the new S3 and SQS bill from about $3.5k a month to about $0.7k.
Rejected. A sidecar disk and a second-region bucket as extra fallbacks. They are failure paths that rarely run, they guard against an S3 PUT failure rate of about 0.01%, and a second region breaks the residency promise. Moving small chunks to Infrequent Access or Glacier, which bill a 128 KB minimum per object. "Zero capture_unavailable" as the success measure, which would reward silent loss.
review Simplicity, privacy, cost and reliability reviews: fallback chain cut to memory then metadata-only, uncensored removed from must-keep, batched segments, loss counted per tier.
D3 · Postgres scope
Postgres keeps money, accounts and configuration, and every table has a lifetime
Decision. Request and attempt rows are kept for 120 days in monthly partitions keyed on accept time, which covers the card-dispute lookback. They serve settlement, reconciliation and disputes only; no customer list reads them once D4 ships. audit_log keeps 13 months in Postgres, and older months are exported to S3. Chain authority receipts are kept for 30 days. The receipt dedupe table is never subject to retention.
Partitioned tables are built online beside the old ones. A partition is dropped only after its rows and money totals match ClickHouse exactly, and it is detached and held for 30 days before the drop. Every new table ships with a retention rule.
Why. Dropping a partition costs no vacuum work. Exactly-once settlement depends on the dedupe keys outliving every possible redelivery.
Rejected. Batched DELETE, which leaves the dead rows vacuum chokes on. A 90-day window, which is shorter than the dispute lookback. Dropping a partition before parity is proven.
review Reliability, money and simplicity reviews: drops gated on parity, detach before drop, 120 days, dedupe keys kept, one home for lists.
D4 · ClickHouse
ClickHouse answers every list, total, trace and search
Decision. The request list, sessions, traces, spans, search and every chart read ClickHouse. Point lookups of keys, organizations and settings read Postgres. Ingestion and index merges run on write compute separate from read compute, so they never compete with dashboard reads.
Rows are deduplicated in the ETL, and no read uses FINAL. Tables are ordered for their main read: requests by organization and time, spans by organization, session and time. Platform and admin charts read hourly and daily rollups. A CI lint blocks any request-path read that aggregates raw rows, in admin routes as well as tenant routes.
Why. Raw-scan reads timed out as traffic grew 10 times. With search text and spans added, ClickHouse becomes the first store to saturate unless writes and reads are separated.
review Cost review: compute split, no FINAL, session-ordered spans.
D5 · read replica and catalog
An allowlist of dashboard reads goes to the replica; the catalog stays in the main database
Decision. Only routes on an explicit allowlist of read-only lists and admin pages use the replica; everything else uses the primary. When replica lag passes a few seconds, those routes fall back to the primary up to a capped rate, then show slightly old data with a note. The replica has its own statement timeout, hot_standby_feedback is off, and max_slot_wal_keep_size is raised before it goes live. The catalog does not get its own database.
Why. On November 10, model-page traffic overloaded the primary. An uncapped fallback would repeat that during lag. The catalog is joined in transactions with keys and admission, so a separate database would cost about $1,000 a month and a rewrite of those transactions, for isolation the replica already gives.
review Simplicity, reliability and cost reviews: allowlist, capped fallback, replica settings, date corrected.
D6 · money
MemoryDB stays the live wallet, across 64 fixed receipt slots
Decision. Live balances, holds, limits and blocks stay in MemoryDB, which acknowledges a write only after its multi-AZ log has it. Postgres stays the permanent record. Organizations are hashed onto 64 fixed slots, and each slot carries its organizations' wallet keys and one receipt stream, so the Lua scripts stay atomic. The writeback drains the 64 streams in parallel and batches writes per organization. A hot organization keeps its order on its own slot, and moving an organization between slots follows one protocol: freeze, drain, copy, bump the epoch, then check against the reconciler.
MemoryDB runs with noeviction. Stream memory is sized for the longest planned restart plus margin, with alarms on stream bytes as well as oldest age. The reconciler pages on drift that persists after the backlog drains, and on credit-feed cursor age. Auto-recharge, credit-floor alerts and the plan discount allotment read MemoryDB counters, not the lagging writeback.
If MemoryDB itself is down, platform-funded requests are refused with a retryable 503; money fails closed. A rebuild from Postgres is scripted and rehearsed, and a failover game day runs before D16.
The eight wallet tests from the companion report run on replayed traffic: everyday latency, one hot organization, neighbors unaffected, no overspend under races, node kill, Postgres down, far callers, and cost. Added tests: blocks during a Postgres cut, plan-read failure, promotion rollover during a cut, slot move under load, a full-restart backlog drained to the nano-dollar, and a refund arriving during a backlog. Durable Objects or celld are reconsidered only if the hot-organization, neighbor or node-kill test fails.
Test 5: hot organization unavailable / writes lost
14.1 s (managed failover) / 0
0.6 s (object reset) / 0
11.3 s (node killed) / 0
Test 8: cost per month
$946
$1,447
$238
Result. MemoryDB stays: it is the only backend fast enough for the request path, and none of the three lost money under any fault the platforms allow. Durable Objects cost about 100 ms per call from Oregon (the PDX edge does not host objects) and a hot organization saturates one object. celld is cheapest and correct, but 45 ms at p99 and it needs persistent disks: when both nodes came back without them, every cell refused to start. Test 7 (callers in us-east-1, eu-central-1, ap-southeast-1): a wallet near the caller helps only if the gateway moves to the edge too; with the gateway in us-west-2 it adds a second trip.
What the tests changed. Test 1's bar becomes "hold under 5 ms at p99, settle off the response path": each call is one durable write of about 2.4 ms, and customers wait only for the hold. A slot move froze a busy organization for 6.6 s (the docstring said "well under a second"). Redesigned to pre-copy while serving and freeze only the last changes, then re-measured on real MemoryDB: frozen 28 to 35 ms with about 900 open holds at 100 req/s, 0 refused, 0 drift. On that rerun a hot organization's hold plus settle was 9.3 to 10.4 ms at p99 (the hold alone at most 4.3 ms), with the cluster's primary in a different zone from the caller. A managed failover made the single shard refuse for 14.1 s for every organization, so the shard count is being reconsidered.
Why. MemoryDB is durable, not a cache, and at about 1 to 2 ms a write it is faster than both alternatives. It speaks standard Valkey, so the wallet can move to another cloud. Durable Objects would tie money to one vendor. celld is beta and adds about 90 ms for each write that waits for its bucket.
Rejected. Creating a stream per busy organization on demand: every new stream means moving live wallet keys, and polling hundreds of thousands of streams. Moving the wallet to the edge now.
One Requests table, agent traces from headers or OpenTelemetry, and a CLI first
Decision./observability/requests is the one table. It filters and sorts on any column, groups by session, and opens a request inside its agent trace. Customers have two co-primary ways in:
Headers on the LLM requests they already send: session id, traceparent, step name, tags and user. Tool calls are inferred from the traffic.
OpenTelemetry, plus a Langfuse-compatible ingestion endpoint, so an existing Langfuse setup only changes its host. Short recipes cover Vercel AI SDK, Mastra, LangGraph, the OpenAI Agents SDK and the Claude Agent SDK.
The gateway's own spans add exact tokens, cost and fallback data to the customer's spans. They do not replace them. The trace API, exp traces list|get|search and an MCP server ship first, built on the request rows and the trace_spans table that already exist. Output is tree first, in JSON, with cursors, --since and attribute filters, and bodies only when asked for. Sending spans to a customer's own Langfuse is a supported feature, and bodies can be stored in the customer's own bucket.
Why. Customers moved from single calls to agents. Tool calls and custom spans happen in customer code, where traffic alone cannot see them accurately. The team that left Helicone for Langfuse rarely opens a console, so for them the CLI is the product. A customer who self-hosts Langfuse can still keep us as the gateway.
review Product review: OpenTelemetry and Langfuse ingest made co-primary, CLI and MCP moved forward, coexistence with self-hosted Langfuse.
D8 · search
Search indexes each request's new text only
Decision. ClickHouse request_text holds each request's new messages, tool results, errors and response, up to 32 KB. It uses a token-splitter text index and is ordered by organization and day. Searches are scoped to one organization and a time range by default, and member access controls apply. It shares the body's key, is erased with the body, and holds only content the organization agreed to store. This decision ships only after we confirm production runs ClickHouse 26.2 or later; the repository pins 25.8.
Why. Agents resend the whole conversation each turn, so indexing full prompts grows with the square of session length. Indexing only new text grows linearly. The most common agent search is "where did the tool fail?"
Rejected. Whole bodies in ClickHouse, as Helicone does. A separate search engine, which would be a third copy of customer text. An n-gram index, 5 to 10 times larger.
review Facts, cost and product reviews: version gate, 32 KB, token splitter, tool results indexed.
D9 · handoffs and alerts
One outbox primitive with a shelf and an age alarm
Decision. One shared primitive provides attempt counts, a parked state with the last error, replay and an oldest-age metric. It is adopted by the receipt streams, the settle outbox, the ClickHouse outbox, the credit feed and the capture queue. A parked receipt pages immediately. These also page: queue age over budget, dropped captures, wallet drift, credit-feed cursor age, snapshot age, an open breaker, and database wait above 2 s at p95. Drains after a recovery are rate-limited.
Why. Retrying forever hid the stuck captures and a 9-day dead pipeline. Five separate implementations would repeat the problem this decision exists to fix.
review Simplicity and reliability reviews: one primitive, money pages.
D10 · tagging
Customers define tags; a judge scores them on captured traffic
Decision. Customers write the questions and rubrics. Clef is the default judge, or customers can pick any model, which runs through our gateway and is billed as usage. Scoring runs on its own queue after the ETL, so judge backpressure never stalls loading. All of a span's tags are asked in one call. Sampling is by session, and each organization has a calls-per-second budget and a monthly cap.
Tags score only captured content, never traffic from capture-off, zero-data-retention or private-mode organizations. Scores and their reasons count as derived content and are erased with the body. The same step runs over past traces or a dataset, which gives offline evals.
Why. Tags turn traces into answers, such as "how often did the agent give up?", with no customer code. Letting customers choose the judge removes Clef's 30 requests a second as a launch blocker.
review Product, privacy and cost reviews: any judge, consent check, batching and budgets.
D11 · deploy units and workers
Things that fail differently deploy separately, in one orchestrator
Decision. Each of these is its own Porter app: the /v1 edge, the dashboard edge, the control plane and the ledger writeback. Background workers stay in EKS as separate deploy units that scale on queue age through an external metric. Only the capture ETL runs on Fargate, because it is already built there. A deploy guard refuses any replica count, Fargate tasks included, whose connections would exceed the pooler budget.
Why. Slow dashboard calls held the same edge workers as /v1. The writeback still shares the control plane's configuration and release. A second orchestrator for every worker would mean two deploy paths, two log stacks and two IAM models for a small team.
review Simplicity review: Fargate only for the ETL. Facts review: current writeback state corrected.
D12 · Helicone
Helicone customers change nothing, after legal clears the move
Decision. We own Helicone (owner, November 16). The move has four steps:
Our gateway serves Helicone's hosts behind its existing DNS. Both stacks run in parallel, with DNS rollback ready.
Helicone's REST queries work against our API, plus a sessions API that Helicone never had.
The CLI and MCP server are offered to Helicone customers.
Dashboard pages redirect one at a time, as each reaches parity.
Before any data moves:
Legal reviews the assignment clause and Helicone's DPA, and customers get the sub-processor notice.
Helicone organizations keep Helicone's data-use terms (no own use, no advertising, excluded from any archive) until each accepts ours.
EU-region history stays in the EU.
Only hashes of Helicone keys are copied.
A provider key sent on a single request is used for that call only. A test proves it never reaches captures, the raw bucket, the dead-letter queue or logs. Prompt management and scores reach dated parity items.
updated 2026-11-20Not yet 1:1, but the safety headers are enforced. The moderation, LLM-security and token-limit headers are enforced. An earlier version of this page said they were accepted and ignored; that was wrong. The differences from Helicone, as documented in explabs/helicone/safety.py and explabs/helicone/token_limits.py:
LLM security asks our managed guardrail models (an injection model, plus a content-safety model with Helicone-LLM-Security-Advanced) instead of Helicone's Prompt Guard and Llama Guard. A flagged request gets a 400, as on Helicone.
When the security check cannot run, we refuse with a retryable 503. Helicone lets the request through unchecked. A failed moderation call refuses the request on both.
On the AI gateway host the caller sends no OpenAI key, so moderation runs on our safety model instead of OpenAI's endpoint.
A request the rule does not cover (another provider, another path, or a last message that is not the user's) is sent unchecked, as on Helicone. The response says so in X-Explabs-Safety-Checks.
Token limits use Helicone's three strategies (truncate, middle-out, fallback). The context window comes from our catalog, and the token estimate can be slightly lower for characters outside the Basic Multilingual Plane.
Still not served: Lytix forwarding, Helicone experiment columns and rows, node ids, and the legacy prompt version, name and format headers. The response names them in X-Explabs-Ignored-Headers, so they are never dropped silently. Only organizations and keys are imported, so members cannot sign in (owner question 8). The history copy keeps the first 32 KB of text per request, not the full bodies.
Why. Owning the infrastructure lets us move customers without code changes, but not without their contracts. One system of record keeps support and billing simple.
review Privacy, product and reliability reviews: legal gate, data-use terms kept, EU residency, API parity as its own step, parallel run.
D13 · retention
Customers set expiry; any archive for our own use is opt-in
Decision. Organizations set a default expiry, overrides per key, project or tag, and a keep flag per session or request. Paid retention raises the maximum. One eligibility verdict replaces the three that disagree today.
A value tag on each capture (country, plan, session length, success, cost, scores) is for the customer's own filters. An archive of valuable data for our own use is opt-in, off by default for paid organizations, and shown in Settings. It always excludes own-key, connected-plan, zero-data-retention, private-mode, Helicone and fixed-retention organizations, and the erasure job reaches it. A default expiry for free organizations shortens a published retention period, so it ships only after the terms change with 14 days' notice.
Why. Customers asked to control their data. The buyers we want are buying control, and a hidden archive is a reason to leave.
review Privacy and product reviews: opt-in, exclusions, erasure coverage.
D14 · storage controls and media
Tighten-only controls; media stored by kind
Decision. Each key and request can store less than the organization allows, never more. Images and speech are stored as their own objects. Stored speech gets its own notice, because voice can count as biometric data. Transcription audio and video files are stored only with paid retention. Embeddings are stored as input text plus a vector summary. Our internal Clef callers store outcomes only.
Customers' Decisions requests will be stored under their capture switch. That is a change from today, where they are never captured, and it ships with a docs update. End-user fields (the user header and text that names people) use the existing end-user erasure path.
Why. The organization's switch must stay a promise, and media cost should stay in proportion to what people look at.
review Privacy and facts reviews: Decisions stated as a change, speech notice, end-user erasure.
D15 · edge
The gateway stays in EKS; Cloudflare does TLS, WAF and caching
Decision. Cloudflare keeps TLS, WAF and caching of anonymous pages. We build no edge prototype and no Durable Objects abstraction now. Portability comes from what we already run: standard Valkey for the wallet and S3-compatible storage for bodies.
Why. Provider time dominates request latency, so moving the gateway saves little. An abstraction with no consumer is speculative surface.
Measured, not assumed. The wallet comparison deploys a real Durable Object wallet and a celld wallet beside MemoryDB and runs the same 14 tests, including callers in Europe and Asia; the results are recorded under D6. The edge gateway is built only if those numbers show a gain worth the vendor tie.
review Simplicity review: abstraction and prototype cut.
D16 · database restarts and platform
Restarts become maintenance, not outages
Decision. D1, D2, D5 and the MemoryDB game day ship first. Then restart-only settings (multixact, transaction buffers, connections, machine size) go into one rehearsed restart at the quietest hour. /v1 keeps serving known keys, writes queue, and the backlog drains afterwards at a capped rate, with jittered reconnects and staggered snapshot reloads. Before the restart an operator opens a planned maintenance window (1 to 30 minutes) so protected model chains keep serving; Postgres refuses every chain change until the window ends. The rehearsal bar is a 10-minute cut on production-sized data. Supabase remains the platform. A blue/green copy or Aurora is reconsidered only if restarts or incidents still hurt after D1.
Why. Decoupling the request path also protects against unplanned outages, which blue/green does not, for a fraction of the effort.
review Reliability review: game day first, longer rehearsal, paced recovery, JWT rotation sequenced separately.
updated 2026-11-18 No read replica exists in any environment, so the dashboard cannot read one during a restart; its pages error until Postgres returns. The maintenance window replaced a MemoryDB "witness" design that was built and then dropped (see Restart). So far the cuts ran 41 to 70 s on a small preview database; the 10-minute cut and the MemoryDB game day have not run.
D17 · release and repository
Guards in tooling, not in chat
Decision. Finished-release recovery pins by containment, as releases do, which removes merge freezes. Until then, the release job blocks merges itself and always restores them. CI retries its own API reads and never creates manual jobs it does not run. Merge requests already on main are closed automatically. Migration versions come from one allocator. Every plan item closes with a production check.
Why. Merges during holds stranded release journals twice. On November 10, 66 open merge requests were already on main.
D18 · secrets
Credentials never pass through chat
Decision. Rotate everything exposed: Cloudflare tokens and R2 keys first, the GitLab token next, and the Supabase JWT secret in an announced window kept apart from the D1 rollout. Operators share credentials only through the secret store, and sessions read them from files without printing them.
D19 · erasure
One erasure job reaches every copy, and the ETL checks it live
Decision. Each organization has an erasure epoch in Postgres, mirrored to the ETL. Turning capture off, deleting content or deleting the organization bumps the epoch. The ETL drops any record admitted before the current epoch, so an object still sitting in the raw bucket, SQS or the dead-letter queue cannot recreate content.
One job removes every copy: both buckets including old S3 versions, the dead-letter queue, ClickHouse request_text, spans, tag scores and reasons, session summaries, and any archive. Bodies are encrypted with a per-organization key, and deleting the key makes backups unreadable within a published window. Chunks are deduplicated only within one organization, using the organization id and a per-organization salt in the chunk key, with reference counts and garbage collection.
Why. The privacy page promises that requests admitted under a previous setting cannot recreate their content. A consent verdict inside an object is only a snapshot. Chunks shared across organizations would make one tenant's deletion either incomplete or destructive to another tenant, and would show one tenant what another stored.
When. It ships with D2. No capture goes to the new pipeline before it works.
review New, from the privacy review.
D20 · evaluation
Scores and datasets from traces
Decision. A scores API (human, programmatic and judge scores on any span), "add trace to dataset" with JSONL export, and running a dataset against any model through the gateway. Judge scoring reuses the D10 step.
Why. Langfuse, LangSmith, Braintrust and Helicone all have these. Without them, a trace product is a viewer.
review New, from the product review.
Known gaps and follow-ups
CI on the final head. #2980's head is 79479dfd80. Every check passed on f7cd3b5bbe (31 checks), and the later heads pass every check that has finished; on 79479dfd80 CI is still finishing, with the integration tests last. GitHub reports #2980 as mergeable with main. The preview runs 79479dfd80.
Deploy layout on the preview. The preview ran #2980's code on main's deploy layout (What the preview could not test). 46 of 172 audited claim rows are not yet proven on the PR's layout and 23 held only because of a hand-applied step. Not yet run anywhere: the background units, the dashboard edge, the writeback app and queue-age autoscaling; Helicone webhook delivery and the separate Helicone response cache; direct announce; and the 3,900 s gateway startup budget. Upload processing on the control plane has since been verified on the preview at 79479dfd80 (round 12). Card 38 sets out how to prove the rest.
Uploads wait while segment capture is off. Upload projection now needs only the observability store and the span sink. Segment capture is off in production, so there is no span sink there: uploads and exp capture batches wait in their queue (they are not lost) until segments are switched on.
The Requests list on a large org. Over target at 1.2 million rows on the 1-vCPU preview (p95 2.8 to 9.1 s, 2026-11-21); not re-measured since the fixes, and never on production-size read compute. At that point ClickHouse alone took p50 1.02 s and p95 5.39 s, plus 13 Postgres calls (about 0.8 s), since cut to 2. Run the history backfill, which drops the read of usage events beside the new table, use the read compute group, run totals beside the page, then re-measure (the report's own 16-core numbers were 47 to 681 ms).
Untested at production scale: the 10-minute Postgres cut on production-sized data, a 20-minute cut with idle keys, the MemoryDB failover game day on real MemoryDB, and Porter autoscaling on queue age.
Not re-run after fixes: the money and privacy attacks, and the capture-to-searchable time with the 1 s seal and direct announcement (modeled at p95 3.82 s). Round 11's 0.5 s bound on wallet calls is not re-measured in a cut.
Protected chains: flow 12 is not in CI, and one protected request in flight at a cut still waits 30 s before its retryable 503.
Ingest limits: one ingest process saturates near 3,600 to 3,800 spans/s (about 200 microseconds a span). The fair cap refuses fast but cannot stop queueing in front of admission; the fix is more ingest processes. Per-organization limits are per process and should be recomputed as fleet-wide numbers.
Capture pipeline tails: a write that touches many traces of one huge session still reads most of that session (a per-session write lane would isolate it). The text delay's tail is the usage exporter's own lag (2 to 43 s); a notification from the exporter would remove the polling. Hostile payloads (2.3 MB bodies, 40 random attribute keys, a 1,500-deep span chain) land within their caps locally; on the preview their landing was not observed.
Observability gaps (card 37): no traces list page; no trace SQL screen; the "Local capture" name and who sees it. (Local capture reaching Observability, the Users view and the tag-key filter are done and verified in round 12.) Session turns took 1.9 s on a 4-request session and a 10-item dataset export 2.3 s; both to profile.
Docs: the own-use archive opt-in and the Helicone SDK log endpoints (/custom/v1/log, /v1/trace/log) are not in apps/docs.
Engine-bound: media and Decisions capture wait on the engine release (experiential#1412, card 12). Serving GET /v1/models without a bridge permit would also be an engine change, proposed only if the next cut still misses the target.
Moving off Helicone. #2980 does not let us turn Helicone off: forwarded traffic, EU and several missing importers keep Helicone's own stack running, and no metric can show forwarded traffic at zero. Helicone's infrastructure is in Helicone's accounts, which nobody here can read yet. See Moving off Helicone: where it stands and card 39. docs/helicone-move.md points to a decision log that does not exist.
Preview gaps (from the test guide): Northwind's OpenTelemetry runs do not appear; the seeded Helicone webhook cannot be listed in the app; the preview has no Helicone cache cluster (card 27) and its real model is out of budget (card 33).
Wallet outage edge cases: both stores down plus a worker death still forfeits the in-flight charges (accepted). Bring-your-own-key calls get the 503 during a wallet outage (card 36).
Failure-injection items open at the time (not re-checked since): the segment directory lost on pod restart, contract traffic admitted during a long S3 outage, a pod with uncertain facts over-granting promotions, and the reconnect stampede.
Kion's tag lanes: two tag-score stores and two erasure paths until card 14 is settled.
Production writes (each on your go): the Terraform applies, the secret rotations, the test-host lanes and the restart window.
Planning record
The history behind the decisions, kept for reference: what the build taught us, the conflicts the plan settled, and what the seven plan reviewers found.
Learned on 2026-11-20 and 2026-11-21
One queue for two kinds of work blocks the head of the line. Gateway captures and span-ingest segments shared the raw queue, so a span backlog made fresh gateway captures wait: none was stored for over an hour on the preview. Work with different urgency gets its own queue and its own consumer.
Parking messages in memory is a bigger buffer, not a fix. Holding span messages in memory kept captures fast until the park filled (5,000 messages); then the consumer stopped receiving and a capture waited over 3 minutes. Raising the limit only moves the cliff. The second queue removed it.
Recompute per part, not the whole. Rebuilding a session summary from every span of the session made each write slower as the session grew (2.8 to 3.1 million rows, 21 to 64 s). Recomputing only the touched trace's part and folding the parts reads about 37,000 rows.
The first rebuild must be sliced too. The first full rebuild of an existing big session ran as one statement for 103 to 126 s, past the 45 s timeout, so its marker was never written and every write retried it. Rebuilds now run 500 traces per statement and write the marker last.
Edge fairness needs the organization from an authenticated answer, never from a header. The edge has no database credential, so it learns which organization a credential belongs to from the control plane's answer to an authenticated request. A header from the caller could name any organization. Unknown credentials share one untrusted bucket.
Previews run main's tooling, so preview setup PRs land on main first. The preview hid previews and search because main's deploy script never gave the control plane the capture mode, and the dataset worker crashed for a missing gateway URL. Both were fixed on main (#3243) before the preview could show the branch.
The GitHub API limit is shared across sessions. Every session and agent on one machine draws from the same GitHub API rate limit, so heavy polling in one session stalls GitHub calls in all the others.
Learned on 2026-11-18
Supabase answers with Cloudflare error pages during a restart. Code that treats "the database did not answer" as an outage must count 520 to 527, 530 and HTML 5xx bodies, not only PostgREST error codes. One shared check now does this.
Blocks must work without Postgres. Quarantine, ban and key revoke now write MemoryDB first and Postgres second, every time, so the outage path is the daily path. Limits: Support Admins cannot act during an outage, and user bans, bulk ban sweeps and customer key revokes still need Postgres.
Previews run main's deploy tooling. Infrastructure a PR adds is not in its own preview until a setup PR lands on main first. Five such PRs merged today.
Helicone parity choices. Moderation, LLM-security and token-limit headers now behave as Helicone documents. Where a check cannot run, we refuse with a retryable 503 instead of sending the request unchecked (Helicone's behavior), because we do not fall back silently.
Test judge. Trace tags are scored by a deterministic judge in preview and local only; it is refused everywhere else.
Previews share one certificate budget. Let's Encrypt allows 50 new certificates per week for experientiallabs.ai, and each preview issues several new hostnames. On 2026-11-18 at 23:25Z the budget ran out and every new preview failed at its ClickHouse certificate until 00:26Z. Renewals are exempt, so production is not at risk. The fix is one wildcard certificate for all preview addresses: code side in #3111 (merged). preview.experientiallabs.ai is delegated to Route53 in the preview account, so the certificate is proven through Route53 with a role limited to two challenge records. Live since 2026-11-19: one wildcard (valid to 2027-02-17) serves every preview, and deploys request no per-host certificates. It was set on the cluster by hand, so a Porter ingress upgrade could drop it; the controller then refuses previews with a clear message.
Renumbering migrations breaks an existing preview. Each stack rebuild gives the migrations new version numbers above main's newest. A preview database that already recorded the old numbers refuses to migrate ("ledger contains migrations absent from this commit"). The fix is to rebuild that preview from scratch (close the PR, clean up, reopen, redeploy); test data now reloads automatically.
Calm observability bar and request previews. The Requests top bar went from 11 controls on two lines to one row (view switch, one search with filters, time range; the rest in icons and a More menu). Each request row shows a short preview of what was asked and answered, with a hover card. Red means only that the request failed. Previews use only text the org already stores and never show prompts to read-only admin keys.
Scoped admin keys during an outage. Main added expiry, two-factor binding and per-organization filters to scoped admin keys, and those can only be checked in Postgres. So while Postgres is down, only full admin keys and signed-in admins can quarantine, ban or revoke; a scoped key gets a retryable 503 rather than acting on checks it cannot make.
Preview cluster capacity. On 2026-11-19 the preview node pool cap was lowered to 8 vCPU, so new preview pods could not be scheduled and deploys failed. On Silen's decision it is back at the documented 96 vCPU / 384 GiB. Deploy failures now print pod status and scheduling events, so this shows up directly.
Migration numbers in a long-lived stack. Authors of new PRs pick a migration number above main's newest and above every open PR's numbers, so any range the stack reserves gets jumped. The stack therefore keeps its numbers while it is built and previewed, and each PR is renumbered above main's newest only at merge time, when it is pointed at main.
Local database tests.supabase start fails on this laptop at main's migration 20270402470000; CI's harness works. Database tests that only ran in CI are marked so.
Conflicts resolved
A full pass over the planning conversation found 25 places where the in-depth report and this plan disagreed. Each is settled here; the ones that change a promise to customers are also listed as owner questions.
Conflict
Decision
Reason
Production ClickHouse version (report 26.6, repo 25.8)
Measured on November 17: production runs 26.6.1.2455, so the search gate (26.2 or later) is met. CI and preview images move from 25.8 to 26.6 in this MR.
A decision cannot rest on an unverified number.
Search cap and index (64 KB n-gram vs 32 KB token)
32 KB, token splitter
An n-gram index is 5 to 10 times larger; 32 KB covers a typical turn of about 8 KB with room.
Capture fallback chain vs pod memory on 128 MiB bodies
Memory, then the existing fsynced local-disk outbox, then metadata-only
The disk outbox already exists in the serving pod and answers the memory risk without a second region or a sidecar process.
Uncensored traffic "always stored" (pasted catalog) vs live privacy policy
Follow the live policy: same controls as every model
The published policy is the promise in force. Owner question.
All workers to Fargate (Kion Sync) vs workers in EKS
Workers stay in EKS as separate deploy units; only the capture ETL on Fargate
One orchestrator for a small team; Kubernetes is portable across quadrants. To be told to Kion.
Per-organization streams vs fixed slots
64 fixed slots with a move protocol
No dynamic stream lifecycle, no polling of idle streams, wallet keys stay atomic.
Edge prototype and Durable Objects API
The comparison tests run now with real deployments; the edge gateway is not built
The owner asked for measured outcomes; building an edge gateway before the numbers would be guessing.
Stale allows up to 5 minutes
Blocks come from the MemoryDB deny set; allows stay valid through an outage
Money review: blocks must not depend on a snapshot.
Stale prices and limits up to 10 minutes
Prices and limits live in memory and MemoryDB, refreshed by version; an unreadable fact refuses
Money fails closed.
Postgres window (short, 90 days, 120 days)
120 days, money work only
Card-dispute lookback.
Where one request's metadata is read
ClickHouse, like every list
One home per read; Postgres keeps the money record, not a second display copy.
Helicone scope (full endpoint list vs four steps)
The full list: hosts, auth, every header, response headers, SDK endpoints, REST API, webhooks, history copy
"Zero customer change" means every surface a customer touches.
Default integration (headers only vs headers and OpenTelemetry)
Both, co-primary
Headers need no code; tool and custom spans happen in customer code and need OpenTelemetry.
Tag judge (Clef only vs any model)
Clef default, any model allowed
Clef capacity no longer blocks the feature.
Keeping valuable data (our own archive) vs opt-in
Opt-in, broad exclusions, switched off until the terms change
The buyers we want are buying control. Owner question.
Per-key storage "opt in" beyond the org switch
Tighten only
The org switch is a promise to the org's admins.
Media to a cheaper storage class
Lifecycle rule for media objects only, never small chunks
Infrequent Access and Glacier bill a 128 KB minimum per object.
Readiness on snapshot age
Readiness ignores snapshot age; snapshot age pages
Failing readiness on age would empty the fleet during a Postgres outage, the exact case D1 protects.
Stuck capture count (298 vs 813)
Both are dated counts from different days; the fix and parking make the number zero
Facts review.
November 10 vs 11 dashboard overload
November 10
Report's incident timeline.
Session list and live view targets missing
Added to the measures
Requirements from the sessions analysis.
Raw objects deleted on processing vs kept 7 days
Kept 7 days
Replay and erasure checks need the raw copy for a short window.
Chunk dedup across organizations
Within one organization only
Erasure and cross-tenant leakage.
Timing (this month vs this quarter)
Everything in one MR now
Owner, November 17.
PostHog missing from the target diagram
Unchanged: product analytics events still go to PostHog; it holds no request content
Outside this plan's data paths, stated so the omission is not read as removal.
Review
Seven independent reviewers each read the plan from one angle. Each one's main findings are below, with how the plan answered them.
Reviewer
Main findings
How the plan changed
Facts against the code
Wrong refusal dates and sizes. The production ClickHouse version is unverified (the repository pins 25.8, while search needs 26.2 or later). The writeback is already its own Deployment. last_used is already throttled. The wallet tests were not named. Some evidence had no source.
Lessons table corrected. D8 gated on the version check. D6 names the tests. Claims with no source removed, and the Helicone ownership source cited.
Reliability
Stale allows let blocks through for 5 minutes. MemoryDB is a single point of failure with no degraded mode. Partition drops came before parity. The capture measure rewarded silent loss. Recovery causes thundering herds. The 3-minute test was too short.
Deny set in MemoryDB (D1). Fail-closed outage mode, rebuild and game day (D6, D16). Drops after parity, detach first (D3). Loss counted per tier (D2). Paced recovery and a 10-minute test (D16, roadmap).
Money correctness
Blocks did not reach the wallet. Several money paths still read Postgres. A plan-read failure switched ledgers. Stream memory was unbounded. Moving a stream moves wallet keys. Dedupe keys could expire. Downstream money decisions read lagging data.
All addressed in D1, D3 and D6, with six added wallet tests.
Privacy and compliance
"Uncensored is must-keep" contradicts the live policy. A consent snapshot cannot honour a later erasure. Shared chunks across organizations break deletion. The Helicone move needs a DPA review. An own-use archive conflicts with current promises. A second-region bucket breaks residency.
Uncensored removed from must-keep (D2). New D19 erasure decision. Second region removed. Legal gate and Helicone data-use terms (D12). Opt-in archive with exclusions (D13).
Performance and cost
ClickHouse saturates first. S3 PUTs are the largest new bill. Python key dictionaries are too big. Clef runs out at 30 requests a second. The replica settings could bloat the primary.
Compute split and no FINAL (D4). Batched segments (D2). Compact active-key snapshot (D1). Batched tags and budgets (D10). Replica settings (D5).
Product and customers
Headers-first alone misses tool spans and custom spans. The CLI shipped last. There was no plan for self-hosted Langfuse. Scores and datasets were missing. Clef blocked tagging. The archive costs trust.
OpenTelemetry and Langfuse ingest made co-primary, CLI and MCP moved to Next (D7). New D20. Any judge model (D10). Opt-in archive (D13).
Contrarian simplicity
The quarter was about eight projects for two engineers. The capture fallback chain was over-built. Moving every worker to Fargate adds a second orchestrator. Lists had two homes. The edge abstraction had no consumer. Per-organization streams need dynamic management. Five queues meant five implementations.
Quarter halved (roadmap). Chain cut (D2). Fargate only for the ETL (D11). One home for lists (D3, D4). D15 cut. Fixed 64 slots (D6). One outbox primitive (D9).
Disagreements resolved.
The reliability review asked for a durable sidecar for captures, and the simplicity review asked to remove it. We removed it and count the loss instead. A sidecar only covers an S3 outage, and that risk is smaller than the cost of maintaining a path that rarely runs.
The simplicity review suggested shrinking the Postgres window to 14 to 30 days, and the reliability review pointed to the 120-day dispute lookback. We keep 120 days for money work only, so lists still have one home in ClickHouse.
Still open for the owner.
Approval for the D12 legal review.
Decision 3: confirm that the free-tier expiry switch is removed rather than shipped behind a terms change (updated 2026-11-18).
Decisions 4, 5, 9, 10, 13 and 14: each is built with a provisional default, not your decision (updated 2026-11-20).