Log Streaming & Billing Integration¶
§16.6 Log Streaming¶
Build logs never land in ClickHouse (design record:
specs/2026-07-09-egress-only-telemetry-and-scope-cuts-design.md). The Worker is the
BuildKit client, so it is the first recipient of every log line — Depot's BuildKitService hands it
the live SolveStatus stream (per-step output) while the build runs. Two things happen with that stream:
- Live: the Worker relays it to Stardeck (SSE/WebSocket through Starbase) for the §16.12 progress stages. The browser never talks to Depot — Depot stays an invisible upstream, as a proxy rule.
- Archive: at build end the Worker tees the full output to one compressed object per build —
<build_id>.log.zstin DO Spaces (the platform object store; not Tigris, which is the customer-facing primitive). Historical build-log views stream the object back through Starbase. Retention is a bucket lifecycle policy.
Why not fetch from Depot on demand (verified 2026-07-09): Depot's public API — ProjectService,
BuildService.createBuild, BuildKitService (getEndpoint/reportHealth/releaseEndpoint) — has
no documented endpoint that retrieves logs of a completed container build; completed-build logs are
viewable only in Depot's dashboard, with plan-bound retention (7 days Developer, 30 days Startup, custom
on Business). The "fetch logs" API in Depot's docs belongs to their separate CI-runners product.
§16.7 Billing Integration¶
Build time is metered and billed at $0.05/minute against the customer's monthly credit (see Financial Model for bundling details). Depot's public overage rate is $0.04/minute, yielding ~20% gross margin on build minutes at list pricing. Business-plan negotiated rates are expected to improve this materially — Depot's platform-customer pricing is custom, and Starform will engage Depot sales ahead of launch to negotiate a volume rate.
- Negotiation line item (pre-launch): ask Depot sales for a log retrieval/export API for container builds alongside the volume-rate discussion — if granted, the §16.6 DO Spaces tee becomes optional
- Starbase Worker records build start and end timestamps per build
- Nightly cron aggregates build minutes per workspace per day into the
usage_eventstable - Monthly billing roll-up includes build minutes alongside compute, egress, and storage as line items consumed from the plan credit
- Cache storage overage on Depot ($0.20/GB/mo beyond plan allocation) is tracked as infrastructure overhead, not passed through to customers — included in plan pricing
Cross-references
The flow where the Worker relays and archives build logs →
§16.2 · the Worker binary that records timestamps and runs
the nightly cron → Starbase §14 · the monthly
roll-up that consumes usage_events → Billing §36 · cache
storage overhead as a known limitation → §16.8.