JS Wei (Jack) Sun

sqlite-utils 4.1 rebuilds tables to fake a STRICT ALTER, most PRs by Codex

sqlite-utils 4.1 hides a full table rebuild behind a --strict flag to work around missing SQLite ALTER, mostly authored by Codex.

sqlite-utils 4.1 rebuilds tables to fake a STRICT ALTER, most PRs by Codex

TL;DR

  • sqlite-utils 4.1 adds --strict/--no-strict flags to toggle SQLite’s STRICT table mode.
  • SQLite has no ALTER path to STRICT, so the CLI does a full copy-and-swap under the hood.
  • The rebuild holds an exclusive write lock — fine on a laptop, risky on a live multi-GB DB.
  • GPT-5.6 Sol xhigh Codex authored most of the release by sweeping the open-issue backlog.

Today’s single AI-tech ship is a point release of sqlite-utils, and it’s worth reading on two levels. The visible one: 4.1 adds a --strict flag that toggles SQLite’s STRICT table mode — a primitive SQLite itself doesn’t expose via ALTER, so the CLI quietly does a full copy-and-swap behind the scenes. That works on a laptop-sized database and is a live-site hazard on anything bigger, because the rebuild takes an exclusive write lock for the duration.

The less visible layer is authorship. Most of the release didn’t come from Willison hand-writing PRs; it came from GPT-5.6 Sol xhigh Codex grinding through the open-issue backlog for low-hanging fruit. It’s a small, concrete data point on what a maintainer-plus-agent release actually looks like when the agent is doing the janitorial work and the human is picking which flags to expose.

sqlite-utils 4.1 works around SQLite’s missing STRICT ALTER

Source: simon-willison · published 2026-07-11

TL;DR

  • sqlite-utils 4.1 adds --strict/--no-strict flags that rebuild a table to flip SQLite’s STRICT mode.
  • SQLite has no ALTER path to STRICT natively, so the CLI hides a full copy-and-swap behind one flag.
  • Most of the release came from GPT-5.6 Sol xhigh Codex sweeping the open-issue backlog for low-hanging fruit.
  • The rebuild holds an exclusive write lock — safe on a laptop, risky on a live multi-GB database.

The actual feature is a SQLite workaround

STRICT tables — SQLite’s opt-in type enforcement, restricted to INT, REAL, TEXT, BLOB, and ANY — can only be declared at CREATE TABLE time. There is no ALTER TABLE ... SET STRICT, and the official docs say the only migration path is to copy the data into a fresh table 1. That copy-and-swap is exactly what sqlite-utilstransform() mechanism has always done for column renames and type changes, so extending it to toggle strictness was mostly plumbing. The new CLI flags (--strict, --no-strict) and Python kwarg (strict=True/False) hide the rebuild behind a one-liner.

That one-liner is genuinely useful for the “I want to tighten up this hobby database” case. It is not a drop-in production tool. Practitioners running multi-GB SQLite deployments note that the rebuild acquires an exclusive write lock and can stall writers for minutes; safe production migrations still need to be staged with additive, backward-compatible steps 2. The changelog doesn’t mention this and probably shouldn’t have to — but readers eyeing the flag for a live service should know what they’re signing up for.

The rest of 4.1 is small quality-of-life work: --code for insert/upsert (pass a Python rows() generator inline), --type overrides so ZIP codes stop losing their leading zeros, a drop-index command, stdin support for query, and primary-key inference on upsert.

The maintenance story is the interesting one

4.1 arrives four days after 4.0, which itself ended a 124-release backwards-compatible streak and leaned heavily on agentic sweeps by Claude Fable and GPT-5.5 to surface release blockers 3. Willison is now openly running the same loop weekly: point Codex at the issue tracker, ship what falls out, publish the transcript. One prompt from the 4.1 session — “use uv run python -c and manually exercise the new .transform(strict=) option, see if you can find any edge-cases or bugs” — caught two bugs the automated tests missed.

The “Sol xhigh” label is a deliberate cost signal, not incidental branding. GPT-5.6 ships three tiers (Sol/Terra/Luna) crossed with four reasoning levels, and Vellum’s benchmarking shows Luna-xhigh beating Sol-Light on some tasks at a fraction of the price 4. Sol xhigh is the top-of-stack config, picked because repo-wide agentic loops benefit from more deliberation per step.

The caveat the changelog omits

Sonar’s evaluation of GPT-5 found it generates more than double the lines of code per task versus GPT-4o, and that high-reasoning modes nearly doubled the rate of subtle concurrency vulnerabilities (20% → 38%) 5. LeadDev, meanwhile, is documenting maintainer complaints about “AI slop” PRs that ignore project norms and are easy to ship but hard to sustain 6.

Willison’s workflow dodges most of that — he is the maintainer, he reads every diff, and he’s publishing the transcripts. But sqlite-utils is a load-bearing library in the Datasette ecosystem, and “one release a week, mostly written by an agent” is a new operating tempo. The STRICT toggle will age fine. Whether the tempo does is the open question.

Footnotes

  1. SQLite.org — STRICT Tables documentationhttps://www.sqlite.org/stricttables.html

    STRICT tables only support five types—INT/INTEGER, REAL, TEXT, BLOB, and ANY—and there is no ALTER TABLE syntax to convert an existing non-strict table into a strict one.

  2. dev.to — HelperX: Migrating a SQLite Schema in Production Without Locking Writershttps://dev.to/helperx/migrating-a-sqlite-schema-in-production-without-locking-writers-15o1

    The copy-and-swap pattern used to add STRICT to an existing table requires an exclusive write lock; on multi-gigabyte tables the reconstruction can stall writers for minutes unless staged with additive, backward-compatible steps.

  3. simonwillison.net — sqlite-utils 4.0rc1 annotated noteshttps://simonwillison.net/2026/Jun/21/sqlite-utils-40rc1/

    This is the first major version bump in over five years, ending a streak of 124 backwards-compatible releases; much of the sweep to identify release-blockers was delegated to Claude Fable and GPT-5.5 agents.

  4. Vellum.ai — GPT-5.6 benchmarks explainedhttps://www.vellum.ai/blog/gpt-5-6-benchmarks-explained

    The Sol/Terra/Luna tiers combined with Light/Medium/High/xhigh reasoning levels yield 72 possible configurations; benchmarks show Luna at ‘Extra High’ can outperform Sol at ‘Light’ effort on some tasks at a fraction of the cost.

  5. DevOps.com — ‘ChatGPT-5 coding gains come at a higher cost’ (Sonar research)https://devops.com/report-chatgpt-5-coding-gains-come-at-a-higher-cost/

    GPT-5 generates more than twice the lines of code per task compared to GPT-4o, and high-reasoning modes increased subtle concurrency/threading vulnerabilities from 20% to 38% in evaluations.

  6. LeadDev — ‘AI-generated abandonware is hollowing out open source’https://leaddev.com/software-quality/ai-generated-abandonware-is-hollowing-out-open-source

    Maintainers report being overwhelmed by ‘AI slop’—low-quality automated pull requests that ignore project norms—and worry that agent-shipped features are easy to publish but difficult to sustain.

Jack Sun

Jack Sun, writing.

Engineer · Bay Area

Hands-on with agentic AI all day — building frameworks, reading what industry ships, occasionally writing them down.

Digest
All · AI Tech · AI Research · AI News
Writing
Essays
Elsewhere
Subscribe
All · AI Tech · AI Research · AI News · Essays

© 2026 Wei (Jack) Sun · jacksunwei.me Built on Astro · hosted on Cloudflare