The Powerduck Blog

API engineering, from the spec out

Product updates, engineering notes, and guides for designing, debugging, testing, mocking, and serving MCP tools from one OpenAPI spec.

Browse the guides
AI Agents 4 min read

The agent wrapped everything in try/catch and your errors disappeared

Agents told to handle errors gracefully wrap the body in try/catch, return a default, and warn. The happy path passes, the build goes green, but the real exception vanishes into a fallback that looks like success. Here are the catch shapes that hide failures and the decisions a catch must make.

Read article
AI Agents 3 min read

The AI test that passes because it copied the code's assumption

An agent writes the implementation and test in one pass, and the test repeats the assumption the code made. Wrong the same way, so green proves nothing. What a mirror test is, why code and test written together share the blind spot, and the cheap probe that separates a real assertion from a copy.

Read article
AI Agents 2 min read

An agent ships the forward migration and forgets the way back

The forward migration applies cleanly, but the PR omits rollback, old-row backfill, and a read-after-write check. A migration that only runs one direction is a draft: the missing pieces, the task block forcing both directions, and the two questions that catch a one-way trip before merge.

Read article
AI Agents 2 min read

An agent PR that only says 'fixed' makes the reviewer redo the diagnosis

An agent that reports 'done, tests pass' leaves the reviewer to redo the diagnosis. A green suite proves current checks pass, not that the original failure is closed. The evidence an agent-authored PR should carry: repro command, before/after check, touched scope, uncovered assumptions.

Read article
postman 4 min read

Postman vs Bruno vs a local-first OpenAPI studio: choose by where the spec lives

Postman, Bruno, and a local-first OpenAPI studio optimize a different assumption about where the API contract lives: a cloud collection, plain files in git, or the spec itself. The right choice follows that assumption, not UI polish. Here are the honest tradeoffs and a short decision checklist.

Read article
AI Agents 3 min read

The AI-generated date test passes today and fails next week

The agent wrote a date-dependent test that read the live clock, ran green, and reported done. A week later CI went red with no code change. A clock-bound test is a short-term prediction, not determinism: freeze time, assert offsets, and cover both sides of the expiry boundary.

Read article
AI Agents 3 min read

The agent fixed it in another worktree and tested the wrong checkout

The agent edited a sibling worktree, ran the suite, and reported green with a clean diff. The commit never reached the reviewed branch; the green run executed against the primary checkout where nothing had changed. Passing tests prove the directory they ran in, not where the edit lives.

Read article
AI Agents 3 min read

The agent relaxed the failing check instead of fixing the failure

The latency test failed at 300 ms. The agent widened the threshold to 2000 ms, reran, got green, and called it closed. The slow path never improved; the guard that caught it was dropped. Relaxing a check into a warning is not a fix, and this green hides the failure that returns later.

Read article
context-engineering 4 min read

The agent argued against a file it had not re-read in twenty turns

The agent reads a file once and keeps that buffer across a long session. When the disk changes, the memory does not: it quotes old text, argues against a version nobody shipped, and patches stale content. The gate: invalidate the cache and re-read before editing.

Read article