THE LAB
The WAL-Reset Bug Had Been in SQLite for 16 Years. Tailscale Found It the Hard Way.
↩ Developing story — first reported Jun 17
Nineteen separate corruption incidents. Six months of forensics. Several theories ruled out in sequence. At the end of it: a data race in SQLite's checkpointing code that had been sitting there, dormant, for at least 16 years.1
Tailscale published the full postmortem on Aug 12. The company has been running SQLite as its primary database since 2022 — each shard of its control plane gets a dedicated database, with a single Go process as sole writer. That is the textbook single-writer setup SQLite is built for. The deviation was in checkpointing: rather than letting SQLite decide when to flush WAL pages back to the main database file, Tailscale took manual control and ran checkpoints aggressively, to keep backups fast and consistent. That step off the standard path was their exposure.
The bug lives in how SQLite tracks which WAL pages have been checkpointed. In WAL mode, new database pages go to the write-ahead log; the checkpoint process copies them back to the main database file in a separate pass. The WAL-Reset race fires when a write transaction hits the checkpoint process at exactly the wrong moment: the checkpointer gets confused about the state of the WAL file — it believes more pages have been written to the database than actually have been — and abandons pages that were never persisted. The data disappears. No error is raised. The database file is now corrupt because other structures (indexes, for instance) reference the missing pages.
The bug was nearly impossible to reproduce outside of production. It showed no correlation with specific shards, customers, workload patterns, or time of day. There was even a six-week gap between October and December that looked like resolution and turned out to be a quiet interval. Tailscale brought in the SQLite core team under a professional support contract and worked through the theories — broken POSIX locks, memory mismanagement, threading issues — ruling each one out as telemetry accumulated from the live environment.
What finally nailed it was a VFS shim. The SQLite developers wrote a wrapper around the Unix virtual filesystem layer, called tmstmpvfs, that added checkpoint tracing to every I/O operation. SQLite's virtual filesystem is the last stop before disk access; instrumenting that layer gave visibility into exactly what the checkpoint process was doing at the moment of failure. Deployed to production and left waiting, it caught the race condition on the next incident. The fix — an additional check inside the checkpoint function that detects when the WAL has been reset by another thread — shipped in SQLite 3.51.3.1
There was an extra stumble on the way out. SQLite 3.52.0, which also contained the WAL-Reset fix, subtly changed how the engine rounds text-to-floating-point conversions. Tailscale was storing high-precision timestamps as text and exposing them through a virtual generated column computed as a float. The changed rounding invalidated the indexes. When Tailscale rolled out 3.52.0 to canary shards, the backup integrity monitor lit up reporting corruption in 13 databases — all false positives, but alarming. SQLite withdrew 3.52.0; the WAL-Reset patch went out separately in 3.51.3. Tailscale worked around the rounding issue by reducing timestamp precision to integer seconds, where text-to-integer conversion is unambiguous. SQLite 3.53.0 later added a self-healing index feature to address the stale expression index class of problems more broadly.
The lesson Tailscale drew, verbatim from the postmortem: "Running boring technology in a non-standard way is a risk. The common paths and standard configurations are incredibly well-tested and reliable."1 Everything they were doing was documented and supported. The risk was not in doing something undocumented — it was in stepping just far enough from the common operational path that a 16-year-old latent race condition finally had the conditions to fire.
xAI shipped Grok 4.6 (vendor-sourced), reporting that it matches GPT-5.6 Sol on the Artificial Analysis Intelligence Index at a composite score of 61, up from Grok 4.5 High's 56. The training run was longer than 4.5's, with model-generated SFT data filtered by model-based checks and agentic RL across kernel optimization, web development, and computer-aided design environments. Pricing is $2/M input and $6/M output, with a faster variant at double that.2 It is available via API, Cursor, and Grok Build. Cursor is the relevant detail for this week: SatNews reports that SpaceX has finalized the regulatory procedures to formally close its $60B acquisition of the company — the thread this paper opened in June on a deal that had been in regulatory limbo since announcement.3
The quieter release was DeepSeek V4 Pro 0813, now available via API. Simon Willison flagged it with the caveat that DeepSeek posted no announcement — "I had to link to OpenRouter because DeepSeek don't have any obvious announcement page for their new model." The benchmark provenance is a comedy of distribution: figures first appeared in an official DeepSeek WeChat group, were copied to a Reddit post the moderators deleted for being low-effort, and finally landed as an ASCII-art table in a Hacker News comment thread. Willison noted one genuine technical curiosity: at low, medium, and high reasoning levels, the model generates distinctly different pelican renderings — a degree of reasoning-level output divergence he had not observed from any other model.4 Open weights have not been announced, though both the April DeepSeek-V4-Pro and July DeepSeek-V4-Flash-0731 weights are publicly available on Hugging Face.
Zed has introduced Delta, a multiplayer coding environment built on DeltaDB, a replicated database that keeps agent conversations and worktrees synchronized across participants in real time (vendor-sourced: zed.dev/blog). The application is a Rust binary compiled to WebAssembly and rendered through WebGL — the same executable runs in the native desktop client and in the browser, no separate JavaScript build required.5 It integrates with Claude Code: a running terminal session syncs live into a Delta thread, where teammates can attach comments to individual diff lines, steps in an agent's plan, or the agent's thinking blocks. The first private beta invites have gone out.
Trending today: GitHub is saturated with CLAUDE.md skill-file collections and generic AI-agent wrappers — no technical novelty cleared the bar.
- How Tailscale Tracked Down the 16-Year-Old SQLite WAL-Reset Bug tailscale.com Aug 12, 2026
- Grok 4.6 x.ai Aug 12, 2026
- SpaceX Finalizes Regulatory Procedures to Close $60 Billion Acquisition of AI Platform Cursor satnews.com Aug 13, 2026
- DeepSeek V4 Pro 0813 (on OpenRouter) — Simon Willison simonwillison.net Aug 12, 2026
- Introducing Delta — Zed zed.dev Aug 13, 2026
