今日已更新 283 条资讯 | 累计 38560 条内容
关于我们

标签:#ev

找到 5241 篇相关文章

AI 资讯

Next.js Middleware in 2026: Auth Guards, A/B Tests, and What Belongs at the Edge

Headline: Next.js Middleware (middleware.ts at the project root) runs before every matched request — before cache, before rendering, before the route. That position makes it right for auth redirects, A/B cookie bucketing, and locale detection. Wrong for database queries and heavy imports. In 2026, Middleware on Vercel runs on Fluid Compute (standard Node.js), so the constraint is latency budget, not API availability. Key takeaways Middleware runs before every matched request — before cache, rendering, or route handler — the right layer for auth, locale, and A/B bucketing. Middleware can read requests, set cookies, redirect, rewrite, or return early — without the route running. DB queries and large packages add latency to every request. On Vercel in 2026, Middleware runs on Fluid Compute (standard Node.js). The constraint is latency: every added millisecond is paid on every matched request. Use matcher to scope Middleware to only the routes that need it; without it Middleware runs on every static asset request. Auth in Middleware = verifying a self-contained JWT without a DB call. Full session validation belongs in the route. I spent a long time only using Middleware for locale redirects. After shipping auth-protected routes and an A/B test, the full shape became clear. What is Next.js Middleware and where does it run? Middleware is exported from middleware.ts at the project root. It intercepts matched requests before route resolution, cache lookup, and Server Component execution. Returns one of four types: pass through ( NextResponse.next() ), redirect, rewrite (serve different content while keeping original URL in address bar), or a direct response. export function middleware ( request : NextRequest ) { return NextResponse . next (); } export const config = { matcher : [ ' /((?!_next/static|_next/image|favicon.ico).*) ' ], }; Without matcher , Middleware runs on every request including static files. On Vercel in 2026, Middleware runs on Fluid Compute — standard Nod

2026-07-27 原文 →
AI 资讯

Your agent's instructions are promises nobody checks. I counted.

I didn't set out to build a developer tool. For a long time now I've been working with AI on everything in my life — daily conversations about my daughters, planning projects, ideas for ones that don't exist yet. The goal was always the same: ease my life, get more done, and break the barrier between human and AI — stop treating it as a search box, start treating it as a partner. Somewhere along the way, the partnership got serious. The workspace where my projects live grew an instruction system for AI coding agents — the files everyone is writing now: AGENTS.md , CLAUDE.md , a skills directory, rules for how agents should plan, log, and verify their work. Then I asked an uncomfortable question: is any of it actually followed? Not "do the agents seem to follow it." Could anyone tell , from the repository alone, whether an instruction was followed? For most of my rules, the answer was no. My own audit found that the two checks my instructions said must run before every commit were invoked by nothing — no CI, no hook, no scheduled task. The rule had been enforced, for its entire life, by whoever remembered. Replaying my last 200 commits, the index-freshness rule alone would have failed on 29 of 61 eligible commits — roughly half. My instructions were not rules. They were hopes with formatting. So I wondered whether everyone else's are too. I wrote a tool and measured. What I measured, and the two honest limits that come before the numbers I analysed eight public agent-instruction collections — 1,332 instruction units, 17,611 individual instructions — each at a pinned commit SHA, with the raw per-repo JSON published alongside the tool. An instruction counts as CHECKABLE if a reviewer could tell from the repo whether it happened: it's a tick-box, or contains a runnable command, or names a concrete file artifact, or refers to an exit code, a diff, an assertion. Everything else is CLAIMABLE — the only evidence it happened is the agent saying so. Two limits, before any num

2026-07-27 原文 →
AI 资讯

Claude Opus 5 closed last year's SDK gaps — not this year's

A while back I built a small tool called SDKProof. it checks how well an AI coding agent writes an SDK's current API — the stuff that changed in the last major, that the model tends to get wrong because it learned the old version. Claude Opus 5 came out today. so I re-ran the whole board on it. short version: it fixed last year's SDKs. it did not fix this year's. The board, now on Opus 5 Same tasks, same libraries, new model: SDK shipped its major Opus 5 Prisma 7 late 2025 (freshest) 87 Next.js 16 late 2025 92 Vercel AI SDK 7 mid 2025 100 Zod 4 2025 100 TanStack Query 5 2023 100 The way each score works: the model solves ~10–15 real tasks, the code gets type-checked against the real installed package, pass = it compiles. no LLM judging another LLM, the compiler decides. The two that jumped: Vercel AI SDK 7 and Zod 4 were both 90 on the previous model (Opus 4.8). Opus 5 took them to 100. What flipped Here's the kind of thing that changed. Define a tool with the AI SDK. Opus 4.8 wrote it the old (v4) way: const getWeather = tool ({ parameters : z . object ({ city : z . string () }), // renamed to inputSchema execute : async ({ city }) => `...` , }) await generateText ({ model , prompt , tools : { getWeather }, maxSteps : 5 , // removed }) That doesn't compile against ai v7. parameters is now inputSchema , and maxSteps is gone (it's stopWhen: stepCountIs(5) now). Opus 5 writes the current shape by itself: const getWeather = tool ({ inputSchema : z . object ({ city : z . string () }), execute : async ({ city }) => `...` , }) await generateText ({ model , prompt , tools : { getWeather }, stopWhen : stepCountIs ( 5 ), }) Clean compile. same for Zod — Opus 4.8 kept reaching for the removed required_error , Opus 5 writes the new unified error option. What didn't move Prisma 7 and Next 16 barely changed. they shipped their breaking changes most recently, and even the newest model hasn't caught up. Prisma still writes the pre-v7 client setup — it skips the driver adapter that

2026-07-27 原文 →
AI 资讯

Learning DevOps as a Computer Engineering Grad...

Late that night which was two weeks to my final year project defense, I stared at the ceiling thinking about life after school. As a Nigerian, the reality of the economy hits differently from what you imagine. I questioned why I chose to study Computer Engineering only to finish with no jobs and no internships afterwards. And one thing, I knew was that I wanted to work in tech, but I was confused about which particular skill to focus on, since I've been learning Python for a while with no clear direction. Then one day I came across a post on X from a popular influencer sharing a TS Academy scholarship opportunity. I clicked it and applied. Just like that, no long research, no consulting anyone. Few days later I got a mail that I've been selected but there was an application fee. That's where I paused . The Nigerian in me thought anything scholarship is free😂😂, The thought of spending my hard-earned money on something I wasn't sure about but something told me to take the leap so I paid. Few days later I got another email, this one was a email for successful payment with full details and start date. Boom! That's how I chose DevOps. They was no plan, no careful research, it just started with one post, one click and one leap of faith. I did mention it to someone after though. A senior friend. His response? "Have you registered?" I said yes. "You shouldn't have. The job market is so tight." My chest couldn't contain that. But I'd already paid so I went ahead anyway. Shortly after graduation I started learning. And I won't lie, there were times I asked myself why I chose this 😂 Linux commands. Git. AWS. Terraform. Ansible. CI/CD. Docker. Kubernetes. Monitoring tools. Each one felt like a wall and I had to climb every single one. I completed my first project on Bash scripting, second on AWS deployment. And right now I'm in the middle of my capstone Project Phoenix. The deadline passed but I still have a month of grace. Lucky me 😂 In between I stepped away for about a month

2026-07-27 原文 →
AI 资讯

SigNoz Hackathon

I built an AI agent system that automatically switches to a backup AI model if the main one fails. I connected every step to SigNoz so I could track requests, monitor performance, and detect failures. I also built a diagnostic agent that reads the monitoring data and explains the reason for failures in simple language. During testing, it successfully detected a real AI provider outage and identified the root cause automatically. signoz

2026-07-27 原文 →
AI 资讯

How to Build and Debug MCP Servers for Claude Desktop in 5 Seconds 🔨

How to Build and Debug MCP Servers for Claude Desktop in 5 Seconds 🔨 Model Context Protocol (MCP) by Anthropic is rapidly becoming the open standard for connecting LLMs like Claude Desktop, Cursor, and Windsurf to local dev tools, APIs, and databases. However, setting up an MCP server from scratch, configuring stdio transports, and debugging JSON-RPC requests in the terminal can be tedious. To solve this, I built mcp-forge — an open-source Swiss-Army developer toolkit and inspector for MCP servers. ⚡ What is mcp-forge ? mcp-forge gives you everything you need to build, test, inspect, and run MCP servers with zero setup overhead : 🛠️ npx mcp-forge serve : Launches a built-in suite of developer tools for Claude Desktop (Git summary, System diagnostics, Mermaid syntax validator, HTTP API tester). 🔍 npx mcp-forge inspect <cmd> : An interactive stdio inspector to connect to any MCP server, list tools/resources/prompts, and test executions live. ⚡ npx mcp-forge init <name> : Scaffolds a production-ready TypeScript MCP server in 5 seconds with TypeScript, tsup bundler, and Vitest. 🌐 npx mcp-forge ui : A visual dark-themed web dashboard for real-time WebSocket traffic monitoring. 🚀 Quickstart: Supercharge Claude Desktop in 1 Minute You don't even need to install anything globally! You can run mcp-forge directly via npx . 1. Add mcp-forge to Claude Desktop Add this snippet to your claude_desktop_config.json : { "mcpServers" : { "mcp-forge" : { "command" : "npx" , "args" : [ "-y" , "mcp-forge" , "serve" ] } } } Now Claude can automatically inspect your Git status, fetch system memory/CPU telemetry, validate Mermaid diagram syntax, and test REST endpoints! Scaffold a New MCP Server in 5 Seconds Want to build your own custom MCP server? Run: npx mcp-forge init my-awesome-mcp-server cd my-awesome-mcp-server npm install npm run dev You get a fully-typed MCP server template with @modelcontextprotocol/sdk configured and ready to publish. Inspect & Debug Any MCP Server in Terminal N

2026-07-27 原文 →
AI 资讯

AgentOS: a Rust runtime for AI agents with deterministic time-travel replay

Most agent frameworks help you build a workflow. The harder part starts after that: the workflow has to run as a long-lived process, fail clearly, restart carefully, and be inspectable after the fact. That's the gap I'm building AgentOS for — an open-source, Rust-first runtime layer that sits underneath frameworks like LangGraph, AutoGen or CrewAI instead of replacing them. What one process gives you cargo run -p agentos-cli -- run --agent examples/simple_agent.toml That single command brings up a supervised agent, a health endpoint, a gRPC message bus, a live SSE event stream, and a recorded trace you can replay later. No API key is needed just to bring the runtime up. Time-travel debugging Your agent does something weird on step 7. Reproducing it costs real API calls, and it never behaves the same way twice. AgentOS journals every LLM exchange and tool result at the provider boundary, so any run can be replayed deterministically — and forked into alternate timelines: agentOS run --agent my_agent.toml # every step journaled automatically agentOS replay --session agent_123 # offline re-run, no API cost, drift-checked agentOS fork --from ckpt_4 --prompt "try the other path" The dashboard's Recordings view turns those journals into a scrubbable timeline: step through the prompt, each exchange, tool calls and their results, with per-exchange checkpoints as fork anchors. What's inside crates/kernel — lifecycle, agent handles, supervisor crates/bus — in-memory, gRPC, SSE and WebSocket messaging crates/trace — recording, replay, diff, checkpoint model crates/vault — secret isolation, encryption, scopes, audit crates/memory , crates/registry , crates/llm , crates/cli , crates/sdk dashboard/ — React debugging surface Where it honestly stands Stable enough for local use: the run / ps / logs / trace / replay CLI flows, local state inspection, export and import, and the core crates with workspace checks and tests. Still experimental: the dashboard, the WASM plugin runtime, Doc

2026-07-27 原文 →
AI 资讯

"Server Down Hai, Try Later": What's Actually Happening When a Site Dies

How you doin'? Let's talk about the Iconic thing we heard a lot: "server down, try later." Your daddy said it while trying to book a Tatkal ticket. Your cousin said it the day JEE results dropped and the portal turned into a spinning wheel of despair. It's become our national way of shrugging at technology — like the internet is weather, and servers just... go down sometimes, nobody's fault, act of god, try later na. Except it's not weather. Every single time a site goes down, there is a specific , findable reason, sitting in a log or a trace somewhere, and almost nobody ever looks at it because looking at it is annoying and "try later" is right there, free, zero effort. So for a hackathon, I decided to stop saying "server down hai" and start actually finding out what "down" means. I built a fake exam-results website, gave myself the power to break it on command, and then made myself watch — using an observability tool called SigNoz — exactly what "down" looks like from the inside, every single time. Turns out "server down" is not one thing. It's at least four different things wearing the same trench coat. Suspect #1: The database that forgot how to hurry This is the boring one and also the most common one. Somewhere behind your "check result" button, there's a database being asked a question, and sometimes that question takes way longer to answer than it should — too many people asking at once, a badly written query, whatever. The site isn't "down." It's just... waiting. Politely. Forever. I simulated this by literally telling my backend to nap for 3 seconds before touching the database: with tracer . start_as_current_span ( " db.query " ) as db_span : if state . db_slowdown : db_span . set_attribute ( " chaos.triggered " , " db_slowdown " ) time . sleep ( state . db_slowdown_seconds ) Then I opened SigNoz's trace explorer, sorted by duration, and there it was — a fat, unmissable span sitting right at the top labeled db.query , 3 seconds wide, with an attribute lit

2026-07-27 原文 →
AI 资讯

Stop Using `useEffect` for Data Fetching—Please, I Beg You

The Scene It's 2 AM. You're staring at your screen, debugging why your dashboard keeps showing yesterday's data even after you've changed the filter. Your useEffect dependency array looks like a crime scene. You've got three useState hooks just to manage loading, error, and data. You added a cleanup function, but somehow the component still throws that dreaded warning: "Can't perform a React state update on an unmounted component." You take a sip of cold coffee. You wonder where it all went wrong. The Problem with useEffect for Data Fetching Let's be honest with ourselves. useEffect was never designed for data fetching. The React team gave us this hook to synchronize with external systems, DOM events, subscriptions, and timers. But somewhere along the line, we collectively decided to use it as our go-to tool for API calls. And look, I get it. When you're learning React, the pattern is simple: useEffect (() => { const fetchData = async () => { setLoading ( true ); const response = await fetch ( ' /api/users ' ); const data = await response . json (); setUsers ( data ); setLoading ( false ); }; fetchData (); }, []); It works. Until it doesn't. Here's what happens when your application grows: Race Conditions — When your user clicks filters too quickly, old requests return after newer ones and override your state. The UI shows mismatched data, and you waste hours adding request cancellation logic that nobody on your team fully understands. Unnecessary Re-renders — Every state update triggers a re-render. With useEffect , you're juggling at least three states: data , loading , and error . Three states, three renders, even before React mounts your actual content. Poor Caching — If a user visits a page, leaves, and comes back, your useEffect fires again. Same data, same API call, same network cost. Multiply this by a thousand users, and you're burning your backend for no good reason. Manual Cleanup Headaches — Need to cancel pending requests? Need to prevent state updates

2026-07-26 原文 →
AI 资讯

A Codex Skill That Generates Editable Draw.io Diagrams Instead of Screenshots

Most AI diagram workflows end with a PNG or a screenshot. It may look fine, but the moment the architecture changes, you have to redraw it or regenerate the whole image. I wanted a different workflow: describe a system in natural language, receive a real Draw.io file, and keep editing every node, label, connector, group, and icon. That is why I built drawio-mxgraph , an open-source Codex Skill that turns architecture and process descriptions into validated, editable .drawio files. Repository: https://github.com/clawcode3-bit/drawio-mxgraph-skill What the Skill does The Skill generates mxGraph XML that opens directly in Draw.io/diagrams.net. It is designed for architecture diagrams, business processes, agent workflows, and integration maps. Key capabilities include: Natural-language descriptions to editable .drawio XML Stable node IDs for reliable incremental updates Add, remove, move, resize, rename, and regroup operations Layout direction switching: left-to-right, right-to-left, top-to-bottom, or bottom-to-top Orthogonal connector routing with explicit entry and exit points Portable embedded SVG icons, including cloud and enterprise-style icon sets XML structure and reference validation before delivery Example diagrams that can be opened and modified immediately Why stable IDs matter A common failure mode in generated diagrams is treating every edit as a full redraw. That makes small requests surprisingly destructive. With stable IDs, a request such as: Move the ticketing system below the CRM, add an observability group, and change the layout to left-to-right. can update only the affected cells. Existing labels, styles, icons, connections, and manually adjusted positions can remain intact. This makes the diagram behave more like source code than a disposable image. Example: an AgentBuilder customer-service architecture The repository includes an editable example for an intelligent customer-service system built with AgentBuilder. It connects: Web, mobile, messaging,

2026-07-26 原文 →
AI 资讯

The 50KB Problem: Why Government Forms Keep Rejecting Your Photo

There's a deceptively simple bug hiding in plain sight on almost every government form, university portal, and job application site: "Upload a photo under 50KB." No API, no error message explaining why, no tolerance — just silent rejection if you're 2KB over. It sounds like a trivial constraint until you actually try to satisfy it programmatically. File size in bytes isn't a variable you can set directly; it's a derived value — a function of pixel dimensions, image entropy, and compression quality — which makes "resize this to exactly 51,200 bytes" a surprisingly nontrivial optimization problem, not a one-line canvas.toBlob() call. A few months ago, my cousin ran into this on a state exam portal that capped passport photos at 50KB. She spent two hours bouncing between random "photo compressor" sites, most of which just apply a fixed compression ratio and let you deal with whatever number comes out. None of them actually solve for a target size. By the time she landed on something that worked, the registration window had closed for the day. So here's the actual technical problem underneath this UX annoyance — and how to solve it properly instead of guessing quality percentages by hand. It's Not You. File Size Is Genuinely Unpredictable. Here's the thing nobody tells you: file size in kilobytes isn't something you can just "set." It's the result of several things happening at once — how detailed the image is, what dimensions it's saved at, and how aggressively it's compressed. Change any one of those, and the final number shifts unpredictably. A plain white background compresses down to almost nothing. A busy, detailed photo — a face with visible texture, a signature with lots of fine ink strokes — resists compression much harder, because there's more actual information in the pixels. Two photos that look similarly sized on your screen can land at wildly different file sizes once compressed, simply because of what's in them. Then there's the format problem, which trip

2026-07-26 原文 →
AI 资讯

How to Build an LLM Eval Pipeline for Your AI App in 2026

LLM applications fail silently at the semantic level. Standard unit tests verify that functions return values, but they cannot detect if the output is factually wrong, off-tone, or missing steps. Evals fix this by running a prompt, inspecting the output, and programmatically or judgmentally deciding its quality. Why LLM Testing is Different Unit tests break on non-determinism. Temperature-driven randomness means identical inputs produce varying valid outputs, which defeats static equality checks. Semantic equivalence ("Paris is the capital" vs. "Capital is Paris") makes string matching useless. Small model or prompt updates cause gradual quality drift that only surfaces at scale. Tone and accuracy require judgment that basic assertions cannot encode. The Three Eval Types 1. Heuristic Evals check measurable properties: JSON validity, word counts, PII presence. They are fast and objective — ideal for regression gates on every pull request. 2. LLM-as-Judge uses a second LLM to grade output against a rubric. Best for subjective content too complex for code but too vast for manual review. 3. Human Evals are the ground truth. Use them to build your golden dataset, calibrate the LLM judge, and finalize decisions before major releases. Building Your Eval Infrastructure Start minimal: a Python script, a JSON file of test cases, and a loop comparing LLM output against assertions or a rubric. Curate a golden dataset of 500–1000 production-representative requests including edge cases and adversarial prompts. Refresh it quarterly to match user behavior drift. Automate the harness in GitHub Actions. Block deployments when pass rates drop below your threshold (90% is a common starting point). Run fast heuristic tests on every PR and full LLM-judge evals nightly. Key Tools PromptFoo — Open-source, YAML-based test cases with a built-in CLI runner and diff reporting. Braintrust — Hosted platform for dataset management and experimental comparison. Inspect — Open-source framework by th

2026-07-26 原文 →
AI 资讯

Nights Watch: Guarding AI Agents Beyond the Wall

"Night gathers, and now my watch begins." The Night's Watch didn't exist to fight wars nobody saw coming — they existed because someone had to actually stand on the Wall and notice when something crossed it. That's the exact problem I kept running into with AI agents, and it's why I built Nights Watch for the "Agents of SigNoz" hackathon: a runtime resilience layer that catches an agent quietly drifting off its plan, explains why, and recovers — automatically. The problem nobody's watching for Most agent failures aren't dramatic. An agent doesn't crash, it doesn't throw an exception, it doesn't get flagged by a content filter. It just... does something slightly different from what it was asked. Told to "find and book a flight under $400," a subtly-drifted agent might reason its way into a $1,200 upgrade and report back "done" — technically true, catastrophically wrong. Nothing in a normal observability stack notices this, because nothing failed . The agent succeeded at the wrong thing. I wanted a system where SigNoz wasn't just a dashboard you check after something breaks — where it actively fed a decision-making loop while the agent was still running . Architecture, in one rule Everything else in the project falls out of one non-negotiable decision I made on day one: rollback state has to be local and durable, never dependent on an external service being reachable. If your resilience system's own safety net depends on a third-party API being up, you haven't built resilience, you've built a second point of failure. So the split looks like this: Local, critical path (SQLite): the Checkpoint Manager. Every agent step writes a durable checkpoint — plan, budget consumed, completed steps — to disk via Node's built-in node:sqlite . Rollback reads from here, always, no exceptions. SigNoz, decision-support only: the Policy Engine queries SigNoz's Query API for prior-run context before scoring severity, and the Explanation Layer calls SigNoz's MCP server to ground its natura

2026-07-26 原文 →
AI 资讯

Git Worktrees: Replace Your Pile of Clones with One Manageable Repository

Table Of Contents What is a Git worktree? Why use worktrees instead of several clones? A practical directory convention Everyday Git worktree commands Consolidating several independent clones Safety rules before starting Phase 1: Inventory every clone Phase 2: Choose the canonical repository Phase 3: Decide what each clone should become Phase 4: Convert one clone Moving a worktree Recovering a deleted .git worktree file When should a worktree be locked? When should git worktree prune be used? Final validation Quick reference Closing thoughts Have you ever ended up with a directory structure like this? ~/src/project ~/src2/project ~/src3/project ~/src4/project Each directory started innocently enough. One was for main . Another was for a feature branch. A third contained a half-finished experiment. The fourth had several untracked test files you were afraid to lose. Eventually, each clone had its own: stale view of the remote repository, duplicated Git history, local-only commits, modified files, ignored test artifacts, and unknown relationship to the others. Git worktrees are designed to solve this problem. A worktree gives you multiple checked-out working directories backed by one shared Git repository. Each working directory can have its own branch and uncommitted changes, while commits, branches, tags, remotes, and fetched objects remain shared. This article covers two things: How to use Git worktrees during normal development. How to safely consolidate several independent clones into one worktree-based layout without losing local work. The shell examples are written to work in both Bash and zsh . What is a Git worktree? A normal Git clone contains: the object database, commit history, branches, tags, remotes, remote-tracking references, and one checked-out working directory. A linked worktree adds another checked-out working directory to that same repository. For example: ~/src/project main ~/src/project-FEATURE-123 FEATURE-123 ~/src/project-HOTFIX-456 HOTFIX-45

2026-07-26 原文 →
AI 资讯

The Frame Keeps Snapping Back — Part 2: What the Snapback Revealed

Part 1 documented the recurring snapback in practice. This note asks a narrower question: what does the observed pattern support, what remains a working hypothesis, and what changes should follow in the project? Status: Bounded project conclusion. This note separates observed behaviour, working hypothesis, and practical consequence. It is based on current project documents and interactions; it is not external validation or a universal claim about AI systems. What the evidence supports 1. The project already contains a stable relational model The working model is not generic “AI assistance.” It separates reasoning surfaces, uses bounded comparisons, permits two-way cognitive pressure, and keeps final acceptance authority with the human. Reciprocal cognitive contribution, asymmetrical governing authority. 2. Concrete project work preserves the structure better than public abstraction At the concrete level, instructions such as: Review this proposal against that architecture. preserve the distinction between the object being reviewed, the surface applying pressure, the evidence, and the authority that may accept a change. When the same structure was compressed into general prose, generated explanations repeatedly returned to a simpler one-way model of either human control or transferred AI authority. That is an observed pattern in this development process. 3. Public explanation is a separate reasoning surface A README, article, summary, or portfolio page is a projection of the model, not the model itself. It cannot be assumed to reproduce the internal structure faithfully merely because that structure is present in context. The explanation must be reviewed against the model it represents: Does this explanation preserve the actual authority, review, evidence, and state-transition structure? 4. Annoyance was useful boundary data The irritation indicated that the generic rendering was no longer merely an imperfect exploration. It was colliding with an internal frame that

2026-07-26 原文 →
AI 资讯

Ctrl+S said "Saved." The file was 0 bytes.

This is a submission for DEV's Summer Bug Smash: Smash Stories powered by Sentry . Written with the help of AI (Claude). The bug, the fix, the validation setup, and every claim below are mine, and were verified against the real codebase and a real full disk. The report Someone lost a Magic: The Gathering decklist. They were playing on Cockatrice — the open-source MTG client — with their decks on a drive that had quietly filled up while Oracle pushed an update in the background. They added a card, hit Ctrl+S, and Cockatrice said it saved. The debug log agreed: [2026-05-28 22:31:42.031 I] Saved deck to "G:/cockatrice300/data/decks/edh-b2-gitrog-reanimate.cod" with format 1 - true - true . Success. The file was 0 bytes. The deck was gone. That was issue #6952 , filed by Mekkiss. The steps to reproduce are four lines long and completely damning: Have a full disk. Open a deck on the full disk Add one card to it Save the deck (ctrl+s) Observe that the deck is now a 0 byte file. Three ways to be wrong at once The save path lived in DeckLoader::saveToFile() . Stripped down, it looked like this: QFile file ( fileName ); if ( ! file . open ( QIODevice :: WriteOnly | QIODevice :: Text )) { qCWarning ( DeckLoaderLog ) << "Could not create or open file:" << fileName ; return std :: nullopt ; } bool success = false ; switch ( fmt ) { /* ... saveToFile_Native / saveToFile_Plain ... */ } file . flush (); file . close (); qCInfo ( DeckLoaderLog ) << "Saved deck to " << fileName << "with format" << fmt << "-" << success ; There are three independent failures stacked on top of each other here, and you need all three to lose data: 1. WriteOnly truncates on open. The instant open() succeeds, the existing deck is 0 bytes. Not after a successful write — at open time . The old deck is already destroyed before a single byte of the new one is written. On a full disk, open() still succeeds: truncating a file doesn't need free space. It frees space. 2. The serializers always returned true . sa

2026-07-26 原文 →
AI 资讯

We Audited Our Claude Code Setup Against Anthropic's Own Context-Engineering Rules — Here's What We Found

The question that started this We run Claude Code against a fairly large, fairly automated repository — a farming-assistance platform with a Node.js backend, a Flutter app, a React dashboard, an in-progress Spring Boot microservices migration, and a home-grown "repo memory" layer called gps that captures invariants, lessons, and preferences across sessions. Over several months we'd wired up a lot of automation: session-start hooks, prompt-submit hooks, auto-captured preferences, persona plugins, a mandatory agent-dispatch table. It felt sophisticated. It also felt, some days, slow to get going — every session seemed to start with a wall of text before any real work happened. So when Anthropic published "The New Rules of Context Engineering for Claude 5 Generation Models" , we asked the obvious question: are we actually following our own advice, or have we just accumulated automation that looks like good practice? This post is the audit, the root cause we found, and the fix — including a mistake we made mid-fix that's worth telling on ourselves for. What the blog post actually says Stripped of marketing language, the post boils down to five concrete rules: Keep CLAUDE.md lightweight. Describe gotchas and non-obvious patterns, not everything you know about the repo. Organize by relevance, not comprehensiveness. Progressive disclosure. Load context at the right time — skills, references, and detail should be pulled in when needed, not front-loaded into every session regardless of task. Trust the model's judgment. Remove redundant guardrails and standing instructions that the newer models don't need spelled out every time. Rely on automatic memory, not manual dumps. Don't hand-maintain a giant preferences block in a markdown file — let the memory system surface the right thing at the right time. Design tools and interfaces, not prose. Push instructions into tool schemas and parameter design rather than repeating them in the system prompt. None of this is radical. It's t

2026-07-26 原文 →
AI 资讯

Don't Wait. Fork It.

Nobody has ever asked you to upstream your dotfiles. For thirty years that was the deal with every tool we touched: if you didn't like it, you changed it, and the change lived with you. Then the tools started writing the code, and the deal quietly ended. This essay is about why the deal is back on the table. Because the thing that used to make forking expensive — the labour — is exactly what agents just made cheap. In This Article The Workbench Instinct Then the Harness Era Arrived Forking Was Always the Escape Hatch Code Got Cheap What I Shipped Into My Fork A Feature Does Not Have to Be Useful Your Desire Is the Limit The Fork Is the Destination Now the Discipline Part Bring Back the Joy The Workbench Instinct Show me a developer who has never touched their config and I'll show you someone who hasn't started yet. Vim users brag about their init.lua the way woodworkers talk about a hand plane they've had for twenty years. Emacs people wrote a whole operating system inside a text editor because they could. VS Code won partly because it shipped an extension API and got out of the way. Dotfiles repos are public artifacts, starred and forked, because the setup is part of the craft. This isn't productivity theatre. Some of it is genuine need, some of it is fixing a specific annoyance that only you have, and a lot of it is just fun. All three are valid. The workbench is where the joy lives — and nobody ever waited for permission to alias a command. Then the Harness Era Arrived Then agentic coding tools showed up and quietly changed the shape of the deal. The best-in-class agent harnesses are increasingly vendor-controlled. Claude Code is a product, not a repo you can clone and rebuild. Google announced it's retiring Gemini CLI in favour of a closed-source successor. And note where the line falls: Codex CLI is Apache-2.0 and sitting right there on GitHub, but the Codex desktop app — the thing most people actually click on — is not. The terminal stayed open. The interface

2026-07-26 原文 →