AI 资讯
The 4-test protocol that isolated a 9 ms Stripe SDK crash on Next 16
The number that lied Friday May 15, 4:13 PM. The Sentry alert pings on my phone. The first Phase 1 re-enrolling student waits in front of the payment screen, her name at the top of my tab. I put down the can, I reopen the screen. The mug with Françoise's face on it, on the desk next door, catches a yellow reflection I notice without looking at. The stack trace fills the screen. The stack trace opens, nine fields out of ten at null , and a number I didn't see coming. type = "StripeConnectionError" message = "An error occurred with our connection to Stripe." code = null statusCode = null requestId = null duration = 9 ms Nine milliseconds. On a Vercel route in Paris region, DNS resolves in forty ms, a TLS handshake costs one to two hundred. Nine milliseconds isn't a network call that failed. It's a network call that never happened. The SDK didn't reach the wire. Instinct immediately offers three patches. Vercel serverless timeout — I add maxDuration , redeploy. Revoked key — I'll rotate it. Stripe account restricted after the live switch — I open a support ticket. These three hypotheses are plausible. None of the three is falsifiable from the symptom alone, and that's precisely what makes them dangerous: each opens a fifteen-to-thirty-minute cycle with rollback at the end if it's wrong. Multiplied by three, half a day lost with the customer still clicking. I don't have time. A student is waiting. Four tests, in order I know the incident class — "preview works, prod breaks" , or its mirror. The rule for this class is that you fix nothing until you've discriminated the layers. Four tests, executed in order. Each eliminates a family of hypotheses, not an isolated hypothesis. And each is designed to refute what it interrogates — because a test that seeks to confirm always finds, by selection, what it's looking for. Test 1 — reproduce in the witness environment. I rerun the same funnel in preview, with the sk_test_ key. Checkout opens in three hundred fourteen milliseconds,
AI 资讯
Terraform MCP Server Enables AI Assistants to Interact with Terraform Infrastructure
HashiCorp has announced the general availability of the Terraform MCP Server, an open-source MCP server that enables agents to integrate with Terraform Registry APIs. The company says that it can improve infrastructure teams productivity by relieving engineers of rote tasks. By Sergio De Simone
开发者
AtCoder Beginner Contest 462 参加記録と解答例 (A E問題)
本記事は、AtCoder Beginner Contest 462 (ABC462) に参加した際の、A〜E問題の復習と解答の備忘録です。コンテスト中に考えた解法の方針や、提出したPythonのコードについて整理しています。 A - Secret Numbers / 実行時間制限: 2 sec / メモリ制限: 1024 MiB / Difficulty: None 配点 : 100 点 問題文 英小文字と数字のみからなる文字列 $S$ が与えられます。 $S$ から数字である文字だけを取り出し、元の順序のまま並べた文字列を求めてください。 制約 $S$ は英小文字と数字のみからなる長さ 1 以上 50 以下の文字列 自分の解答の方針 一文字づつ数字かどうかを判定し、数字のみを配列に入れて出力する。 提出の時には数字かどうかの判定は0-9のどれかに含まれているかを調べたが、解説ではPythonは isdigit() で数値かどうかを調べられるらしい。 提出したコード S = list ( input ()) T = [] for i in range ( len ( S )): if S [ i ] in [ " 1 " , " 2 " , " 3 " , " 4 " , " 5 " , " 6 " , " 7 " , " 8 " , " 9 " , " 0 " ]: T . append ( S [ i ]) print ( "" . join ( T )) B - Gift / 実行時間制限: 2 sec / メモリ制限: 1024 MiB / Difficulty: None 配点 : 200 点 問題文 人 1 から人 $N$ の $N$ 人がギフトを送り合いました。 人 $i$ は人 $A_{i,1}, A_{i,2}, \dots, A_{i,K_i}$ の $K_i$ 人にギフトを送りました。 $i=1,2,\dots,N$ に対し、人 $i$ にギフトを送った人を全て求めてください。 制約 $2 \le N \le 100$ $1 \le K_i \le N-1$ $1 \le A_{i,1} < A_{i,2} < \dots < A_{i,K_i} \le N$ $A_{i,j} \neq i$ 入力される値は全て整数 自分の解答の方針 辞書に人 $i$ と、その人にギフトを送った人の番号をリストとして持つことを考える。 入力で受け取った、ギフトを送った人と送られた人すべてに対して辞書に登録し、結果を出力する。 提出したコード N = int ( input ()) dct = dict () for i in range ( N ): dct [ i + 1 ] = [] for i in range ( N ): A = list ( map ( int , input (). split ())) for j in range ( 1 , A [ 0 ] + 1 ): dct [ A [ j ]]. append ( i + 1 ) for i in range ( N ): print ( " " . join ([ str ( len ( dct [ i + 1 ]))] + list ( map ( str , dct [ i + 1 ])))) C - Not Covered Points / 実行時間制限: 2 sec / メモリ制限: 1024 MiB / Difficulty: None 配点 : 300 点 問題文 2 次元平面上に点 1 から点 $N$ の $N$ 個の点があります。点 $i$ $(1 \le i \le N)$ の座標は $(X_i, Y_i)$ です。ここで、 $X, Y$ はそれぞれ $(1,2,\dots,N)$ の順列であることが保証されます。 左下の頂点を $(0,0)$ 、右上の頂点を $(X_i, Y_i)$ とする $x$ 軸に平行な辺と $y$ 軸に平行な辺のみからなる長方形の内部(辺上を含まない)に点 1 から点 $N$ までの $N$ 個の点をどれも含まないような $i$ の個数を求めてください。 制約 $1 \le N \le 3 \times 10^5$ $1 \le X_i, Y_i \le N$ $X, Y$ はそれぞれ $(1,2,\dots,N)$ の順列 入力される値は全て整数 自分の解答の方針 端から考えたいので、初めに $X$ についてソートする。 $X$ が小さい順に見ていったとき、現在の点が作る長方形の内部にほかの点が含まれるかどうかは、、これまでに走査した($X$座標が自身より小さい)点の中に、自身より $Y$ 座標
AI 资讯
I Pointed a Skill Linter at a 52k-Star Repo. Here Is What 84/100 Looks Like.
Every AI agent skill you write burns context on every turn. Not just when the skill is running. On every turn. The agent keeps each skill's name and description loaded permanently so it knows when to invoke them. A vague description is not just a documentation problem. It is a tax you pay per message, forever. That is the problem I built skillscore to catch. When addyosmani/agent-skills hit 52,000 stars and went to #1 trending on GitHub, I had my benchmark. 24 production-grade skills written by people who clearly know what they are doing. If a static linter has anything useful to say at this level, this is where to find out. So I ran it. One command. 24 skills. Two seconds. This is what skillscore 0.2.0 can do now: skillscore /path/to/agent-skills/ One command scores everything in the tree. Here is the output: Three skills from addyosmani/agent-skills scored in one command, then a drill-down into the lowest scorer. The full results Skill Score Grade spec-driven-development 91 A browser-testing-with-devtools 91 A deprecation-and-migration 91 A frontend-ui-engineering 91 A test-driven-development 88 B code-review-and-quality 88 B interview-me 86 B ci-cd-and-automation 85 B code-simplification 85 B context-engineering 85 B documentation-and-adrs 85 B incremental-implementation 85 B security-and-hardening 85 B shipping-and-launch 85 B source-driven-development 85 B using-agent-skills 85 B doubt-driven-development 80 B observability-and-instrumentation 80 B planning-and-task-breakdown 80 B api-and-interface-design 78 C debugging-and-error-recovery 77 C git-workflow-and-versioning 77 C idea-refine 77 C performance-optimization 77 C Average: 84/100 (B) To be clear: 84 across 24 production skills is excellent. No failures. No D grades. Most skill libraries I have tested do not get close to this. The instruction content inside these skills is genuinely good. What the linter found is at the edges, not in the core. Two gaps. Five skills. Every single C. I drilled into all five
开发者
AWS Introduces CDK Mixins for Composable Infrastructure Abstractions
AWS recently announced CDK Mixins, a new AWS CDK feature that lets developers add reusable capabilities like security, monitoring, and configuration to AWS resources. Mixins work across different construct types, making infrastructure code more flexible and reusable. By Renato Losio
AI 资讯
Zapier vs Make vs n8n 2026: The Honest Comparison (Including the Free Option)
Verdict: Quick verdict: Zapier wins on simplicity and breadth — 7,000+ integrations, no-code setup, great for non-technical users. Make (formerly Integromat) wins on power-per-dollar — complex multi-step workflows at a fraction of Zapier's price, with a visual canvas that's genuinely better for complex logic. n8n wins if you're technical and willing to self-host — unlimited workflows, unlimited runs, zero ongoing cost after setup. For most small businesses: Make. For enterprises with non-technical teams: Zapier. For technical founders or developers: n8n. The automation tool market matured a lot between 2022 and 2026. Zapier, once the clear leader, is now meaningfully more expensive than its competitors — and Make and n8n have closed most of the feature gaps. If you're still paying Zapier prices without re-evaluating, you're almost certainly paying 3-5x what you need to. This comparison covers all three tools honestly, including their limits — because the right choice depends heavily on your technical comfort level and workflow complexity. The three tools at a glance Factor Zapier Make n8n (cloud) Free tier 100 tasks/month, 5 Zaps 1,000 ops/month, unlimited scenarios 2,500 steps/month, unlimited workflows Paid starts at $19.99/month (750 tasks) $9/month (10,000 ops) $20/month (10,000 steps) Native integrations 7,000+ 1,500+ 400+ (plus HTTP for anything) Visual workflow editor Linear, simple Canvas, branching Node-based, very flexible AI integration Yes (AI actions) Yes (AI modules) Yes (LangChain, OpenAI, etc.) Self-hosted option No No Yes (free, unlimited) Learning curve Low Medium High (developer-focused) Zapier — the everything-just-works option Zapier's advantage is breadth and simplicity. 7,000+ apps (essentially anything with an API), a straightforward "trigger → action" model, and enough guardrails that non-technical users rarely get stuck. If you need to connect Salesforce to Slack to Google Sheets without touching any code, Zapier is the fastest path from id
AI 资讯
How to Actually Check if a VS Code Extension is Safe Before You Install It
You're about to install a VS Code extension. Maybe it's a formatter, a linter, a theme, an AI tool....
AI 资讯
Your Vibe-Coded App Works. Is It Any Good?
TL;DR - Getting an app to run is now the easy part. AI is very good at producing something that...
AI 资讯
I Got Bored of LeetCode, so I Built a Coding RPG
https://dsa-life-simulator-frontend.vercel.app"I made a free tool to make DSA practice feel like an RPG — would like feedback from this community"Been grinding DSA for months and it never felt fun. So I built something. What it does: 🏟️ Real-time 1v1 Arena battles against other devs 🧪 Lab to create and publish your own challenges 🏘️ Community Hub to attempt others' challenges 📖 AI writes your weekly coding journey as a life story 🎮 XP, credits, levels, leaderboards Stack: React + Tailwind + Firebase + Node.js + Socket.IO + Groq AI Still early — would genuinely love feedback from people who've felt the pain of traditional DSA prep.
AI 资讯
Copilot Chat Goes GA in PRs — But Multi-Repo Visibility Is Still Missing
GitHub moved Copilot Chat's richer pull request experience to general availability this week — side-by-side chat with diffs, inline editing, and context-aware answers without leaving the review view. Previously in public preview, it is now live for all Copilot license holders. It is a real improvement for reviewing changes inside a single pull request. But it highlights a gap that per-PR AI tooling structurally cannot close: knowing what is open across the rest of your organisation. The Problem That Lives Outside the PR Most engineering teams don't work in one repository. They ship across services, libraries, and infrastructure — often with related PRs open in multiple repos simultaneously. A reviewer approving a payments service change without knowing that a dependent auth-service PR is still in draft is reviewing without full context. This is not a quality-of-feedback problem. It is a visibility problem. No amount of intelligence surfaced inside a PR tells you what is happening across your repositories. Gartner's 2026 assessment of AI coding agents makes the point clearly: the bottleneck has shifted from generating code to reviewing, securing, and governing it. Better per-PR AI raises the floor on feedback quality. The teams that pull ahead will be the ones who also solve the coordination layer — which PRs are open, which are stale, which are blocked on a dependency in another repo. What Changes With Better In-PR AI GitHub's GA release makes the review experience faster and less disruptive for individual PRs. That matters. But as per-PR intelligence becomes table stakes, the differentiator shifts toward cross-repo awareness: who is waiting for review, what related work is in flight, and where the actual bottlenecks in the delivery pipeline are. Engineering leaders should be watching PR age distribution and review load across all repositories — not just the ones that happen to be open in a browser tab right now. For teams already dealing with multi-repo sprawl, Cod
AI 资讯
A Day in the Life: Complete Claude Code Session Walkthrough
Part 7 of 7 · Series: Building Your AI Developer Handbook · GitHub The Scenario You're building a password reset feature. User enters email → gets a reset link → clicks link → enters new password. Standard flow. Medium complexity. Let's walk through every step using the full workflow — as if you're looking over the shoulder of someone who built this system. "Show me your workflow and I'll show you your output quality." Before You Even Type Claude loads automatically in the background: ✓ ~/.claude/CLAUDE.md loaded ← the global handbook ✓ .claude/CLAUDE.md loaded ← project rules (TypeScript, pnpm) ✓ memory/MEMORY.md scanned ← all lessons and preferences You haven't typed anything yet. Claude already knows: Feature-based folder structure State management ladder No mocking the database No AI attribution in commits No useCallback without profiler evidence "A doctor who reviews your file before you enter the room is more useful than one who asks 'so, remind me who you are?'" Step 1: /status — Confirm the Setup /status Model: claude-sonnet-4-6 Effort: normal Plugins: security-guidance ✓ Thirty seconds. Sometimes the wrong model loads due to overload fallback. Sometimes a plugin fails silently. This check costs 30 seconds and prevents a surprise 30 minutes later. "A pilot's first action after sitting in the cockpit isn't to take off. It's to check all instruments are reading correctly." Step 2: /cost — Baseline /cost → Tokens used: 2,847 | Estimated cost: $ 0.004 Note this number. You'll compare it later before the expensive code review step. A surprise spike means something went wrong. Step 3: /plan — Design Before Coding /plan Build a password reset feature: - User enters email on /forgot-password - System sends a reset link (token, expires in 1 hour) - User clicks link → /reset-password?token=xxx - User enters new password - Token validated, password updated, token invalidated Claude responds with a plan — no code yet : Proposed approach: 1. DB: Add password_reset_tokens
AI 资讯
Token-Based Pricing Doesn't Survive Adoption Curves
Uber's CTO told the world this month that the company spent its entire 2026 AI allocation by April. The story has been reported in a handful of outlets, hit the front page of Hacker News for 397 points and 469 comments , and is mostly being read as a cost-of-AI-tools story. It is one. It is also, on a closer reading of the numbers, a pricing-model story — and the structural fact that almost none of the coverage has emphasized is the one that determines whether this is a one-company anomaly or the beginning of an industry-wide budgetary crisis. The structural fact is that Claude Code, like most enterprise AI tooling in 2026, is priced on token consumption, not per-seat licensing. Token-based pricing scales with how aggressively the tool is used. Per-seat enterprise SaaS pricing — the model corporate IT budgets are built around — scales with how many people have access to it. Those two cost curves diverge in exactly the territory where productivity tools are designed to operate: high-engagement, daily-use, gradually-deepening workflows. The Uber data is the first public-facing version of a math problem most enterprise IT departments are about to discover privately. The numbers Uber CTO Praveen Neppalli Naga , named in Yahoo Finance's and Benzinga's coverage, said publicly that Uber is "back to the drawing board" on AI budgeting after the surge in Claude Code use blew through internal projections. The specific numbers, as reported across the multiple outlets covering the story: Claude Code adoption inside Uber's ~5,000-engineer organization went from 32% to 84% over four months. 70% of committed code at Uber is now AI-originated. 11% of live backend updates are "being written by AI agents built primarily with Claude Code," per the reporting. Per-engineer monthly API costs: $500 to $2,000. Uber's annual R&D spend is around $3.4 billion , of which the AI tooling line was a much larger fraction than expected. Cursor adoption plateaued; Claude Code dominated. These are ext
AI 资讯
The complete guide to claude code configuration file
What Is a Claude Code Configuration File? A Claude Code configuration file is a structured file — either CLAUDE.md (a Markdown document) or settings.json (a JSON schema file) — that controls how the Claude Code AI coding assistant behaves within a project or organization. These files define the agent's permissions, memory context, tool access, allowed shell commands, and behavioral guardrails. Without them, Claude Code operates with broad defaults that may not align with your security posture or project conventions. Claude Code reads configuration from multiple locations in a defined hierarchy: a global user-level ~/.claude/settings.json , a project-level .claude/settings.json at the repo root, and one or more CLAUDE.md files that can be nested in subdirectories. The agent merges these at startup, with project-level settings taking precedence over global ones. Understanding that hierarchy isn't optional — it's the foundation of any serious deployment. Why Claude Code Configuration Files Matter in 2026 Claude Code has moved from a tool used by individual engineers to something teams are deploying org-wide, running in CI/CD pipelines, and integrating with production infrastructure. That shift changes the risk profile completely. A misconfigured agent with shell access and no guardrails isn't a productivity tool anymore — it's a liability. Anthropic's own documentation on Claude Code security acknowledges that the agent can execute terminal commands, read and write files, and make network requests. By default, many of these capabilities require per-operation approval, but configuration files can silently expand those permissions across an entire organization if applied at the global or enterprise policy layer. The CISA and NSA joint guidance on AI-assisted development tools (published in late 2024) specifically flagged AI coding assistants as a new attack surface for supply chain compromise — the concern being that an agent with write access to source files and no beha
AI 资讯
Delete Node in a Linked List
Problem Link - https://leetcode.com/problems/delete-node-in-a-linked-list/ This is one of those interview questions that looks impossible at first. Normally, to delete a node from a Linked List, we need access to the previous node. But in this problem, we're only given the node that needs to be deleted. No head. No previous pointer. So how do we remove it? Let's understand the trick. Problem Statement Write a function to delete a node in a singly linked list. You are not given the head of the list. Instead, you are given only the node that needs to be deleted. Example Input: 4 -> 5 -> 1 -> 9 node = 5 Output: 4 -> 1 -> 9 Initial Thought Normally we delete a node like this: prev.next = node.next But here: We don't have prev We don't have head So the usual deletion approach is impossible. Key Observation Although we cannot delete the current node directly, we can make it look like it never existed. Consider: 4 -> 5 -> 1 -> 9 We need to delete: 5 Instead of removing node 5 , copy the value of the next node into it. 4 -> 1 -> 1 -> 9 Now remove the next node. 4 -> 1 -> 9 The original value 5 has disappeared. Mission accomplished. Intuition Copy the next node's value into the current node. Skip the next node. The current node now behaves as if it was deleted. Since the problem guarantees that the given node is not the tail node, a next node will always exist. Dry Run Input 4 -> 5 -> 1 -> 9 node = 5 Current node: 5 Next node: 1 Step 1 Copy next node value. node.val = node.next.val List becomes: 4 -> 1 -> 1 -> 9 Step 2 Skip next node. node.next = node.next.next List becomes: 4 -> 1 -> 9 Done. Optimal Java Solution class Solution { public void deleteNode ( ListNode node ) { ListNode cur = node . next ; node . val = cur . val ; node . next = cur . next ; } } Even Shorter Version class Solution { public void deleteNode ( ListNode node ) { node . val = node . next . val ; node . next = node . next . next ; } } Complexity Analysis Metric Complexity Time Complexity O(1) Space Comp
AI 资讯
How we made our niche-industry SaaS MCP-ready (and watched ChatGPT call our dispatch tools)
Note: This is an English digest of the original Zenn post (Japanese) . Read there for the full timeline and commit-level trace. TL;DR We ship tasteck , a B2B SaaS for the Japanese night-leisure industry (dispatch + cast shift management). 8 years of operational data, ~100 venues live. Two days after the MCP design post , ChatGPT Plus can call our tools live: "Who's available tonight?" → MCP list_available_drivers → JSON → natural-language reply. Estimated B2 OAuth sprint = 2 weeks (6/16–7/1). Actual = 1 day , by reading the spec carefully before touching code. We hit 12 distinct traps between "OAuth issuance works" and "ChatGPT actually invokes the tool." The QA logs caught every one. What we shipped 3 read tools (B1): list_available_drivers — drivers free tonight list_cast_shifts — today's cast shift roster list_assignable_casts — joined resolution: roster ∧ stage-name set ∧ shop match Natural-language date helper: resolveBusinessDate(naturalText, company) — handles "today / tomorrow / day-after-tomorrow" and the per-tenant business-day boundary (e.g. day flips at 04:00 or 05:00, configured per Company.changeDateTime ). MCP SDK Server + SSE transport: @modelcontextprotocol/sdk wired into a NestJS controller. One SSE connection = one McpServer instance, company-scoped, with a session_id Map routing POST /messages . OAuth flow (B2, finished in one day across 7 steps) Step What Commit 1 Protected Resource Metadata endpoint (RFC 9728) d6f05ff6 2 /authorize + consent screen + PKCE start 107edbcb 3 /token + PKCE verify + JWT issue + resource (RFC 8707) ffd0468c 4 OAuthAccessTokenGuard (RS256 + HS256 fallback, extracts companyId / staffId ) f2c9bed4 5 Streamable HTTP transport (SSE → POST /sse/:companyId for JSON-RPC) 3a28d92f 6 resolveBusinessDate undefined fallback (`(naturalText 7 QA redeploy + ChatGPT live demo — The 12 traps (compressed) The full timeline is in the Japanese post; the abridged list: Discovery path mismatch. ChatGPT expected {% raw %} .well-known/oauth
AI 资讯
"Supports custom code" means nothing. Here's the 3-level ruler that tells you if a low-code platform will lock you in.
Every low-code vendor says "we support customization." But supports is a weasel word — recoloring a button is customization, and rewriting a scheduling engine is also customization. What actually decides whether a platform locks you in is how far up its extensibility goes. Here's a ruler. The three levels of customization Level What you can do Most no-code A real dev framework L1 — Config Fields, forms, workflows, permissions, themes ✅ ✅ L2 — Extension Custom components, custom actions, external API calls, business rules ⚠️ limited ✅ L3 — Framework Modify/extend the core, custom engines, deep rewrites, source under control ❌ wall ✅ (when open/controllable) Where it stops is where your ceiling is. Plenty of no-code platforms are delightful at L1, then hit "can't do that" at L2/L3 — and you retreat to writing your own thing next to it. Now low-code is the burden. Why you get locked in Black-box SaaS — no source, so any extension point the vendor didn't expose is simply out of reach. Two sources of truth — your extension code and the platform's config live in different systems, so a platform upgrade breaks/voids your work. Crippled self-hosting — the on-prem edition quietly drops extension capabilities. Closed ecosystem — only their component marketplace; your stack can't get in. How model-driven + open source raises the ceiling One unified extension system — your extensions (custom fields/components/actions) and the platform itself are built on the same metadata. Extension isn't a bolt-on, it's a first-class citizen — upgrades don't wipe your customizations. Source under your control — open + self-hostable is what makes L3 framework-level extension actually possible: an extension point you can't reach, you can add. AI at the metadata layer — AI-generated extensions land in the same model, so they stay maintainable and evolvable. That's the road Oinone takes: 100% metadata-driven, front + back end open source, self-hostable — customization reaches L3. How to stress-tes
AI 资讯
From Notion to MCP Server: I Rebuilt 4 Workflows in a Weekend
Migrated 4 of 7 Notion automations to an MCP server in one weekend Two workflows stayed in Notion because the database UI beat any tool call MCP scope rule: one tool does one verb, never a Swiss Army function Result: 12 manual steps collapsed into 3 Claude prompts per publish I spent a weekend pulling four automations out of Notion and rebuilding them as MCP tools. Three of them got faster and one got worse before it got better. The biggest lesson was not about code. It was about deciding which jobs should never leave Notion in the first place. Why I Moved Off Notion In The First Place My Notion setup was not broken. It was just slow in a specific way. I had seven automations stitched together with Notion buttons, formula properties, and two third-party connectors. Every blog publish meant clicking through four pages, copying a title here, pasting a tag list there, and triggering a sync that took 90 seconds to confirm. Multiply that by the 18 articles I push in a normal month and the clicking adds up. The breaking point was a Tuesday where I lost 40 minutes to a connector that silently stopped firing. No error, no log, just a row that never updated. I checked the connector dashboard and it told me everything was healthy. It was not healthy. That kind of invisible failure is the worst kind because you trust it until you do not. MCP changed the math for me. An MCP server lets Claude call my own functions directly. Instead of Claude writing text and me ferrying that text into Notion by hand, Claude can call a tool that does the writing into my systems. The model becomes the operator, not just the writer. If you want the deeper context on what MCP actually is and why it matters at scale, MCP: The 97 Million Agentic Foundation goes through the bigger picture. So I made a list. Seven automations, sorted by how much human judgment each one needed. The ones at the top were pure mechanical steps: format this, push that, fetch a status. The ones at the bottom needed me to loo
AI 资讯
The AI-generated C# that passes review and breaks in production
TL;DR — AI assistants are producing C# that looks correct and passes review, but reintroduces production regressions we spent years training out of teams. I'm trying to find out whether other .NET teams see the same patterns — and what's actually catching them before merge. More AI-generated C# is landing in pull requests. Most of it is fine. But a specific category keeps slipping through — and it's the dangerous one, because it compiles, tests pass, and a human skim says "looks good." The pattern The code compiles. Tests pass. Review approves. Production finds out. These aren't syntax errors. They're architectural intent violations — the kind of thing a senior dev would have caught in review before PR volume tripled. Five regressions I keep seeing 1. EF Core read paths without AsNoTracking() Fine in dev. Expensive on a hot read path in prod. // ❌ Looks reasonable. Tracks entities you never mutate. var orders = await _db . Orders . Where ( o => o . CustomerId == id ) . ToListAsync ( cancellationToken ); Fix direction: AsNoTracking() on read-only queries, or a team convention documented in CLAUDE.md / Copilot instructions. 2. Captive dependency (scoped service in a singleton) Compiles. Runs. Wrong state across requests. // ❌ Singleton lives forever; scoped dependency does not. services . AddScoped < IOrderRepository , OrderRepository >(); services . AddSingleton < ReportCache >(); // ctor takes IOrderRepository Fix direction: align lifetimes, or inject IServiceScopeFactory instead of capturing scoped services. 3. Dropped CancellationToken The method accepts cancellation. The downstream call ignores it. // ❌ Signature honours cancellation; body doesn't. public async Task RunAsync ( CancellationToken cancellationToken ) { await Task . Delay ( 500 ); // overload with token exists } Fix direction: forward cancellationToken to every downstream async call that accepts one. 4. Swallowed exception Failure disappears. Monitoring stays green. // ❌ "Handle errors gracefully" —
AI 资讯
From Scratch: How to Integrate Reasonix CLI into the HagiCode System
From Scratch: How to Integrate Reasonix CLI into the HagiCode System This article shares the complete technical practice of integrating Reasonix CLI as a first-class Agent Provider into the HagiCode system, covering three-layer architecture design, key technical decisions, and frontend and backend implementation details. Background Reasonix CLI, as it happens, is a pretty interesting thing. It's an AI code assistant tool based on ACP (Agent Communication Protocol), providing powerful streaming and session management capabilities. Actually, in the HagiCode.Libs layer, we've already completed its underlying implementation. It's just that these components are still in an isolated state, like beautiful pearls that haven't been strung into a necklace. Users cannot use it through Hero profession selection, session execution paths, or monitoring panels, which is somewhat regrettable. The problem we face is: how to elevate Reasonix to the same level as Codex, Hermes, and other first-class Agent Providers, implementing complete backend routing and frontend display? This isn't simply a matter of registering an enum value. It requires building a complete chain from low-level abstraction to user interface. It's like building a house—you can't just lay a foundation and call it done. You have to build the walls and put up the roof. The challenge of this integration lies in the fact that Reasonix, as a local CLI tool, has its own personality and temperament. For example, it doesn't need a connection string—all parameters are configured by the user at runtime; it might not even be installed, requiring graceful degradation; it's compatible with anthropic series models, but also has its own ACP-specific parameters like effort, budget, and so on. It's like a person with their own unique way of handling things—you can't force it. After careful architectural design and multiple rounds of discussion, we finally adopted a clear three-layer architecture solution, successfully integrating R
AI 资讯
5 Claude API Errors That Cost Me Money (And How I Trapped Them)
Retry storms turned 1 timeout into 340 duplicate calls billed in 90 seconds Infinite tool loop ran 1,200 iterations before I noticed at 2am Partial stream cleanup stopped half-written DB writes corrupting records Trap every error class with a circuit breaker and a hard iteration cap Five Claude API errors quietly drained my account before I built guards around them. None of them threw a loud crash. They just kept billing while I slept. Here is exactly what broke, what it cost, and the traps I now run on every project. The Retry Storm That Billed 340 Times in 90 Seconds The most expensive mistake I made was naive retry logic. A single request timed out. My code caught the timeout and retried. The retry also timed out, so it retried again. Within 90 seconds I had fired 340 requests for one piece of work. The problem was that the Claude API had actually received and processed several of those requests. The timeout happened on my side waiting for the response, not on Anthropic's side. So I was paying for completed work I never saw, then paying again for the retry. My first version of the retry looked harmless. A while loop, a counter set to 5, a sleep of one second between attempts. The flaw was that the sleep was constant and the counter reset on every new job. Under load, jobs stacked, and each one spawned its own retry chain. That is how 1 timeout became 340 calls. The fix was exponential backoff with a hard ceiling and a request ID. I now generate a unique idempotency-style key per logical job and refuse to issue a second call for the same key until the first fully resolves or hard-fails. Backoff starts at 2 seconds and doubles up to 32 seconds, then gives up after 5 total attempts. attempt = 0 delay = 2 while attempt < 5 : try : return call_claude ( job_key ) except Timeout : attempt += 1 sleep ( delay + random_jitter ()) delay = min ( delay * 2 , 32 ) raise GiveUp ( job_key ) The jitter matters more than it looks. Without it, ten failed jobs all retry at the exact