The wandb client streams metrics over HTTP at high frequency. Writing each row directly to SQLite would serialize every request behind a database lock, so worb interposes an application-level write-ahead log.
Incoming data is appended to a single WAL file on disk (~/.worb/wal.jsonl).
A background goroutine wakes up every 500 ms (or when a batch reaches
50,000 items), reads a chunk from the WAL, and flushes it to SQLite in a single
transaction. The WAL file is compacted once it exceeds 1 GB.
This design means the HTTP handler only does an append() to a file and returns.
SQLite writes happen in the background, batched and ordered, with no contention on the ingestion path.