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

推荐订阅源

B
Blog RSS Feed
量子位
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
博客园 - 聂微东
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
U
Unit 42
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
L
LangChain Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
The AI didn't break our backend. It just stopped lying fo...
Jesus moo · 2026-04-24 · via DEV Community

Our internal AI agent does in one prompt what used to take ten minutes of clicking through the UI. Users describe an outbound job in natural language, the agent talks to our MCPs, and the job gets built without anyone touching the UI. Jobs have a lifecycle: drafts are inert and editable, published jobs run, the whole point of draft is that nothing happens.

We were running a bug bash on it. The plan was hostile: prompt injection, role hijacking, capability probing, Break it. Find the edges, we wanted to know its limits better than anyone outside the team, that's how we'd figure out what was missing and where the product really stood.

After an hour of nothing, we flipped the question. Instead of trying to break it, why not just ask it to do its job? Someone typed: create a job with these settings. Nothing else. No publish step, just create.

The job landed in draft. We kept poking, then a log line said a task had executed against it. Tasks aren't supposed to execute on drafts, that's the whole point of the state. Probably noise, I thought, then a delivery from that job landed in my inbox, a real send to a real recipient. That's when "weird log" became "this is live in production."

A high-priority ticket landed on me. My first instinct was the one everyone has when something strange happens near an LLM: the AI did something it shouldn't. The UI version had been in customer hands for a long time without incidents. The only new variable was the model, so I went hunting there. RAG misconfiguration. MCP boundaries. Prompt injection. Roles and permissions. Tool encapsulation. Everything was clean. Nothing the agent touched should have been able to reach the queue that fired deliveries.

I burned about an hour before I ran out of hypotheses. Not a eureka, exhaustion. So I changed the question: what does the AI do differently from the UI? I diffed both payloads. One key was different: dispatch: { primary: true, secondary: true }. The UI never sent it on draft. The agent did, because it was reading the schema honestly. Downstream, a priority queue was watching that field, decided the job looked overdue, and fired it. Immediately. From a draft.

The fix was one line in the queue handler:

if (status === 'draft') return;

Enter fullscreen mode Exit fullscreen mode

A guard that should have existed since day one. The bug had been dormant for a long time, waiting for any client other than our own UI to call the create endpoint with a schema-honest payload. The agent was the first one to do it. One conditional. That was the entire patch.

The agent didn't introduce the bug. It was the first client of our API that respected the schema instead of the unwritten rules our UI followed. Every API your frontend consumes is held together by conventions the backend doesn't enforce. State guards belong in the handler, not in the discipline of the caller. Trusting the frontend to keep quiet isn't a contract, it's a bet. How many other endpoints in your backend are still making it?