惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
WordPress大学
WordPress大学
小众软件
小众软件
Cloudbric
Cloudbric
AWS News Blog
AWS News Blog
腾讯CDC
量子位
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Hacker News
The Hacker News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
Jina AI
Jina AI
Attack and Defense Labs
Attack and Defense Labs
S
SegmentFault 最新的问题
Simon Willison's Weblog
Simon Willison's Weblog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
Google Online Security Blog
Google Online Security Blog
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
罗磊的独立博客
L
LINUX DO - 最新话题
博客园 - Franky
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
The Last Watchdog
The Last Watchdog
J
Java Code Geeks
AI
AI
C
Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
Help Net Security
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
I
Intezer
S
Securelist

Anže's Blog

The 15-Year-Old iptables Rule That Broke My DNS Fedidevs 9h Outage Postmortem Letting Claude Upgrade My Raspberry Pi Agents Day Lisbon DjangoCon Europe 2026 How to Safely Update Your Dependencies Speeding Up Django Startup Times with Lazy Imports Typing Your Django Project in 2026 Jekyll to Hugo Migration Advent of Code 2025 🎄 Django bulk_update Memory Issue Migrating Gunicorn to Granian Disable Network Requests When Running Pytest Disable Runserver Warning in Django 5.2 Autogenerating og:images with Jekyll Power Outages and Gunicorn PID Files UV with Django Go-like Error Handling Makes No Sense in JavaScript or Python Packages Do Not Match the Hashes Pip Error Gotchas with SQLite in Production Fedidevs Dev Update #2 Django SQLite Production Config Django Streaming HTTP Responses Deploying a Django Project to My Raspberry Pi (Video) Thoughts on Code Reviews Django SQLite Benchmark Django, SQLite, and the Database Is Locked Error No Downtime Deployments with Gunicorn SQLite Write-Ahead Logging Writing a Pytest Plugin Fedidevs Dev Update #1 Django-TUI: A Text User Interface for Django Commands Automate Hatch Publish with GitHub Actions Words TUI: App for Daily Writing Textual App Auto Reload RDS Blue/Green Deployments Fly.io Certificate Renewal Using Testing Library with Selenium in Python The Fastest Way to Build a Read-only JSON API import __hello__ Enum with `str` or `int` Mixin Breaking Change in Python 3.11 Your Code Doesn't Have to Be Perfect Fixing _SixMetaPathImporter.find_spec() Not Found Warnings in Python 3.10 Upgrading Django App to Python 3.10 Integer Overflow Error in a Python Application Python Dependency Management MySQL Performance Degradation in Django 3.1 New Features in Python 3.8 and 3.9 The Code Review Batch Size The Code Review Bottleneck
Claude Fixes User Bug
Anže Pečar · 2026-03-08 · via Anže's Blog
08 Mar 2026
This post is part of the Agentic Adventures series
  1. Jekyll to Hugo Migration
  2. Claude Fixes User Bug (this post)
  3. Agents Day Lisbon
  4. Letting Claude Upgrade My Raspberry Pi
  5. The 15-Year-Old iptables Rule That Broke My DNS

I received this bug report in a toot from a Fedidevs user:

Dear @fedidevs

I think there is a bug with the starterpacks: When in “Add accounts” I search for an account that is already in the Pack, the tick-box can show empty. When I click it, it will switch to ticked, but the account is actually removed from the pack. This is also confirmed by the number of accounts in the pack going down.

Yes, that definitely sounds like a bug. Let’s see if Claude can figure out the root cause.

I used the user’s toot as the prompt and after a few minutes of clauding…:

## Context

When searching for an account by username (e.g. `@[email protected]`) in the "Add accounts" view, if that account is already in the starter pack, the checkbox incorrectly appears unchecked. Clicking it toggles to checked but actually **removes** the account from the pack (since the server-side toggle sees it already exists and deletes it).

## Root Cause

In [views.py:176-178](starter_packs/views.py#L176-L178), when a username search finds an account via `crawlone()`, the code creates a **new** queryset without the `in_starter_pack` annotation:

```python
accounts = Account.objects.filter(
    username_at_instance=account.username_at_instance,
)
```

This replaces the annotated queryset (lines 128-142) that has `in_starter_pack` and `is_followed`. Without the annotation, `account.in_starter_pack` is always falsy, so the checkbox renders unchecked.

The full-text search path (line 181) correctly uses `accounts.filter(...)` which preserves annotations. The username search path needs the same treatment.

## Fix

Change line 176-178 from:

```python
accounts = Account.objects.filter(
    username_at_instance=account.username_at_instance,
)
```

To:

```python
accounts = accounts.filter(
    username_at_instance=account.username_at_instance,
)
```

This single-word change (`Account.objects``accounts`) keeps the existing annotated queryset and just adds the filter, preserving `in_starter_pack` and `is_followed` annotations.

It nailed it. If I were looking at this problem myself, I’d come to the exact same conclusion. I’m not sure I’d be faster though, so if this was a competition, Claude would have won.

Cool, but a bug isn’t fixed until there’s a test for it.

Adding a test

Please also add a test case for this bug

I instructed Claude to add a test for this exact case, and off it went again. Executing…

It wrote the test, ran it, and confirmed it passed. Everything looked good, so it happily reported that the job was done.

The test looked plausible, and I almost shipped it as is, but I instead decided to verify it. I reverted the bug fix and ran the tests again. The newly added test should have failed, but it still passed!

Claude’s test didn’t exercise the code it had fixed!

I have reverted the fix but the test is still passing

Thinking…

After thinking for a bit, it figured out it had forgotten to add a mock. A few moments later:

Right — crawlone makes a network call and returns None in tests, so the if account: branch on line 175 is never entered. The test needs to mock crawlone to return the account.

After a few more tokens, the test was fixed and working properly.

Validation is going to be key

Claude writes code faster than we do. It uses tools, runs your tests, parses outputs, and fixes failures. But it’s still a system that generates the next most probable token.

It can’t actually know whether what it did is correct or expected. To it, dropping your production database or fixing a user reported bug are the same. It’s up to us to learn how to guide it to success.

In the oneline bug fix from the Fedidevs user, verifying was trivial. But when Claude writes thousands of lines of code and tests, it becomes a real challenge to review everything.

I’ve heard some teams are having success with agent skills for validation, so I’ll be looking into them in future posts.