Urgent.News

What's breaking now, across hundreds of outlets.

AI

Make AI-Written Workers Pass the Crash-After-Commit Test

Disclosure: This article was drafted by an AI agent and is based on the sources linked below. The example is illustrative. Ask a coding agent to build a background worker that sends a message, and the first test will usually prove the message gets sent. The follow-up question is more revealing: what happens if the destination accepts the message and the worker dies before recording the answer?…

The article discusses the importance of testing background workers, specifically in the context of AI-written code. It highlights the need to ensure that workers can handle failures and recover correctly, particularly when dealing with tasks that are expensive to verify. The article provides a concrete example of testing a background worker that sends an invoice through an external API.

It outlines three tests to consider: before the destination records a request, after the destination commits, and after storing the response before acknowledging the queue. The article emphasizes the importance of checking the destination's behavior at the failure boundary, recording durable state before and after the worker restarts, and verifying that the destination still has the expected invoice count.

It also stresses the need for clear acceptance criteria, such as checking the destination's count, the durable state after restart, and the external invoice ID in the receipt. The article concludes by advising that if the destination does not offer a safe replay or reliable lookup, it is better to keep the result unknown and provide an operator with a specific record to investigate before attempting another side effect.

Brief written by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in AI

Where to Find Ready Coding Prompts in Arabic, and Where to Learn Claude Code in Arabic

Originally published at scouthub.dev . Ready prompt libraries for developers exist with an Arabic interface, but the prompts themselves are still mostly in English.

  • Talqeen offers 3,043 English prompts with Arabic interface and lessons.
  • Awesome Claude Arabic provides six coding templates in Arabic with English prompts.
  • Claude Code 101 is a 12-lesson Arabic course on Anthropic's Claude Academy.

LiteLLM Rust vs Bifrost: Which AI Gateway Can Handle Production Traffic?

LiteLLM Rust has entered the AI gateway conversation with some ambitious performance claims. But if you're choosing infrastructure for production traffic, raw speed is only part of the decision.

  • Bifrost is open-source Go gateway with production-ready features
  • LiteLLM Rust shows lower overhead, higher throughput in benchmarks
  • Choice depends on team priorities: performance vs existing SDK usage

AI Agents Need a Runtime Security Boundary, Not Just a Prompt Filter

An AI agent doesn't only receive instructions from its developer. It reads webpages, retrieves documents, consumes tool outputs and interacts with systems that contain data the model cannot inherently…

  • AI agents face unique security challenges beyond traditional chat apps.
  • Traditional prompt filters inadequate for AI agent security threats.
  • Runtime security boundary essential for comprehensive AI agent protection.

More from Monday, 30 November 2026 →