DeepHorus is an innovative tech media and intelligence platform focused on AI, blockchain, startups, and emerging technologies.
Published on

Sqlite-utils 4.0rc2, mostly written by Claude Fable (for about $149.25)

Authors
  • avatar
    Name
    DeepHorus
    Twitter

Have you ever wondered about the latest advancements in database management tools? The recent release of sqlite-utils 4.0rc2, a major update to the popular SQLite utility library, has garnered attention for its unique development process and critical bug fixes. This release, largely authored by Anthropic’s Claude Fable AI model, addresses significant issues that could have led to data loss in previous versions, marking a milestone in AI-assisted software development.

The project, led by developer Simon Willison, saw Claude Fable generate the bulk of the code for about $149.25. This cost reflects the efficiency of using AI for complex programming tasks, though it required human oversight to ensure reliability. The release candidate comes two weeks after the initial 4.0rc1, which introduced transaction handling as a signature feature. However, several bugs remained, including a critical flaw in the delete_where() method that could cause data loss by leaving connections in an uncommitted state.

During development, Claude Fable identified five “release blockers,” with the worst being the delete_where() bug. This flaw caused the method to run without a transaction wrapper, leaving the connection in in_transaction=True and preventing subsequent commits. As a result, operations like insertions or new table creations were lost after closing the database, effectively erasing user data. The bug was reproduced and confirmed through a detailed test scenario involving multiple operations.

Over the course of 37 prompts, 34 commits, and 1,321 added lines of code across 30 files, the team worked through each issue. The most significant changes revolved around transaction handling, which now ensures that every write method automatically commits its transaction before returning. The new documentation explicitly states that users never need to call commit() except when grouping operations with db.atomic() or managing custom transactions with db.begin().

Willison praised the AI’s ability to handle complex tasks, noting that harder challenges often allow developers to multitask more effectively. For instance, he attended the Half Moon Bay 4th of July parade while Claude Fable processed new prompts from his phone. The final review was conducted via GitHub’s pull request interface on his laptop, ensuring thorough human validation before release.

Looking ahead, the stable 4.0 release is expected soon, with the hope that no further breaking changes will emerge. The integration of AI in this development cycle highlights a growing trend where machine learning models assist in code generation and debugging, potentially reducing costs and time while maintaining quality. As AI tools become more prevalent, such collaborations may redefine traditional software development workflows.

Read original article →Source: simonwillison