How Anthropic Merges 30,000 Code Changes a Day - Manish Kapur, Sonar & Addy Osmani, Anthropic

How Anthropic Merges 30,000 Code Changes a Day - Manish Kapur, Sonar & Addy Osmani, Anthropic

代码变更多十倍,团队如何守住质量与信心

AI Engineer14 位订阅者

28 分钟阅读2 次阅读AI

【工程实践】从每天两千五到三万次合并:Anthropic 如何让代码工厂跑得快又靠得住? 编码智能体加速提交代码,也让团队面临审查不过来、合并失败和质量难以确认的问题。Anthropic 的 Addy Osmani 分享团队如何让 Claude 先做首轮审查,再结合端到端任务、浏览器检查、工具运行和代码检查收集验证证据,由人判断是否可信。对谈还介绍 Sonar 的调查发现,并讨论从人机协作的“开灯工厂”走向更自主的“关灯工厂”时,如何用多层验证、权限控制与沙箱降低风险。读者可从中了解扩展代码吞吐量所需的审查机制,以及何时才适合合并智能体编写的代码。 🎙️ 主讲人介绍 马尼什·卡普尔(Manish Kapur):Sonar 产品与开发者关系团队负责人,在对谈中主持提问,介绍代码审查与软件工厂面临的挑战。 Addy Osmani:Anthropic 嘉宾,参与 Claude Code 开发者体验相关工作,分享团队审查大量代码变更与验证产出的实践。 核心议题:AI 编码提速与审查压力、开灯与关灯软件工厂、Anthropic 的首轮代码审查、多层验证与证据审查、代理权限、沙箱与责任追踪、智能体代码的标记与合并。 关键词:Claude Code、代码审查、软件工厂、多层验证、代码合并、智能体安全

章节 1:软件工厂中的代码审查与信任

📝 本节摘要:

Manish Kapur 介绍自己和 Anthropic 嘉宾 Addy Osmani,并通过举手提问引出代码合并是否经过人工审查的差异。Addy 分享自己在 Anthropic 负责 Claude Code 开发者体验的工作;随后 Manish 引用 CircleCI 数据,指出代码吞吐量上升的同时,合并到生产环境的尝试仍常常失败。

[原文] [Manish Kapur]: I'm pretty excited to be here and talk about who verifies the software factory. Before we get started, can you give me a quick show of hands? Raise your hand if your coding agent has opened any pull request in the last week. Almost everyone, thanks. And keep your hands raised if you have merged pull requests and reviewed every line of code that was merged. Oh, I do see a few people. That's excellent. So, what I'm going to talk about is the gap between the two camps: merging requests without reviewing manually, and, you know, merging requests after doing some reviews.

[译文] [Manish Kapur]: 我很高兴来到这里,和大家聊聊谁来验证软件工厂的产出。开始之前,能不能请大家举个手?如果你的编程智能体过去一周提交过拉取请求,请举手。几乎所有人都举手了,谢谢。如果你合并过拉取请求,而且审查了合并进去的每一行代码,请继续举着手。哦,我看到还有几位。很好。今天我要谈的是两种做法之间的差异:一种是不经过人工审查就合并请求,另一种是做过一些审查后再合并。

[原文] [Manish Kapur]: So, my name is Manish Kapoor, and I lead the product and solution developer relations team at Sonar. I'm excited to be here with my guest speaker, Addy Osmani from Anthropic. Addy had been at Google for about 14 years. Most of you probably know him. He's written lots and lots of content and articles. I learn a lot from Addy, so I'm really fortunate to have him here, standing next to me and sharing his wisdom with all of us today.

[译文] [Manish Kapur]: 我叫 Manish Kapoor,在 Sonar 负责产品与解决方案开发者关系团队。很高兴今天能和我的嘉宾、来自 Anthropic 的 Addy Osmani 一起站在这里。Addy 此前在 Google 工作了大约 14 年,在座很多人应该都认识他。他写过大量内容和文章,我从他那里学到了很多,所以很幸运能请他来到这里,和大家分享他的见解。

[原文] [Manish Kapur]: He recently joined Anthropic. Addy,congratulations on your role at Anthropic. Would you like to tell the team what you're working on at Anthropic and what your role is?

[译文] [Manish Kapur]: 他最近加入了 Anthropic。Addy,恭喜你加入 Anthropic。能不能跟大家介绍一下你在 Anthropic 做什么,以及你的职责是什么?

[原文] [Addy Osmani]: Yeah, sure. So, I'm responsible for making sure that you all have a really great developer experience building with Claude Code. Anytime we discover opportunities to make it even smoother, we bring that right back into the product. We ship a couple of times every single day, so we're very interested in making sure that you have the best possible experience as often as possible.

[译文] [Addy Osmani]: 当然可以。我负责确保大家在使用 Claude Code 构建产品时,能获得很棒的开发者体验。只要发现还能让体验更顺畅的地方,我们就会把改进直接带回产品里。我们每天都会发布好几次更新,因此一直在努力尽可能频繁地为大家提供最佳体验。

[原文] [Manish Kapur]: Cool. Thank you. All right, so let's start with a problem and some context-setting slides. There are two numbers on the slide. CircleCI analyzed 28 million CI workflows this year and noticed that throughput jumped by about 59%. And yet three in 10 attempts to merge that code into production are failing. That's a stat from an independent CircleCI study. I think I'm seeing the same trend among most of the customers I speak to every day. This is a quote from Addy: “A software factory is harnessing loops at scale.”

[译文] [Manish Kapur]: 好,谢谢。我们先来看几页问题背景。幻灯片上有两个数字:CircleCI 今年分析了 2800 万个持续集成工作流,发现吞吐量提升了约 59%。但另一方面,尝试把代码合并到生产环境时,每十次仍有三次失败。这是 CircleCI 一项独立研究中的数据。我觉得自己每天接触的大多数客户也呈现出同样的趋势。这是 Addy 的一句话:“软件工厂,就是规模化地运用循环。”

  1. 章节 2:代码生成已成熟,信心仍需验证
  2. 章节 3:Anthropic 每日审查三万项代码变更
  3. 章节 4:代码审查与软件工厂的下一步
  4. 章节 5:多层验证覆盖软件工厂的风险
  5. 章节 6:管控与权限、闪电问答及核心要点

正在加载后续章节…