Anthropic 在单体仓库弃用 Git,自研版本控制系统 Scion
Anthropic Ditches Git In Its Monorepo, Builds In-House Version Control System
Anthropic 将其主代码仓库从 Git 迁移到自研版本控制系统 Scion,由七人工程师团队历时五个月完成,同时开发了内部代码审查工具 Antique。公司称其日合并代码变更量从 5 月的约 2500 次增至 9 月的逾 3 万次,主仓库历史近 100 GB,每日约 2500 万次代码检出用于 CI,若用 Git 朴素拉取每天将产生超 600 PB 流量。Scion 将提交、合并、rebase 和历史查询移到服务端,客户端只请求所需数据,其 CPU 和内存占用比此前的 Git 镜像方案小 200 倍,CI 的 CPU 需求降低 25%。Anthropic 表示 Scion 并非要取代 Git,而是面向大型工程团队或大量编码智能体使用的大型仓库。
推荐理由
AI 评分 64
Anthropic 因 AI 写代码导致合并量激增而自研版本控制系统,可看到 AI 生成代码对工程基础设施的实际压力。
主题
正文
当前显示原文,中文全文译文尚未就绪。
Anthropic has migrated its main code repository from Git to an in-house version control system called Scion, after daily code merges increased more than tenfold between May and September.
A team of seven engineers built Scion, an internal code review tool called Antique and related systems, completing the migration in five months, the company said in an engineering blog post published on 13 October.
Anthropic described its workloads as unusual because it uses Claude to write software far more extensively than most companies.
The company merged around 2,500 code changes per day in May, rising to more than 30,000 in September. Its main repository has an almost 100 GB history, while a compressed working copy exceeds 25 GB.
The company performs around 25 million code checkouts daily for continuous integration (CI), excluding developer environments, agent sandboxes and research jobs.
Fetching the repository naively for these workloads would generate more than 600 petabytes of Git traffic per day, according to Anthropic.
“We don’t expect this rate of growth to slow down anytime soon,” the company said, adding that removing one bottleneck leads to further increases in code production.
Git was designed around decentralised development, with each clone containing a complete repository that developers can inspect and modify offline.
Anthropic said these properties were less suitable for its environment, where most clients are AI agents and automated jobs that remain connected to servers.
The company had operated several hundred internal Git mirrors and used techniques such as shallow clones and sparse checkouts to manage repository traffic. These measures became harder to maintain as code merges accelerated.
Scion moves commits, merges, rebases and repository history queries to the server. Clients request only the data they need, while automated jobs can retrieve repository metadata through APIs without checking out files.
Anthropic said its infrastructure footprint is 200 times smaller than its previous Git mirroring setup in CPU and memory requirements. CI and research jobs now check out code in seconds rather than minutes, while CI alone has reduced CPU requirements by 25%.
Anthropic is also reconsidering conventional development practices. Traditional merge queues coordinate changes and run tests before integrating code. The company said this becomes difficult when hundreds or thousands of changes can be merged while tests are still running.
Instead, it has invested in post-merge and pre-deployment automated testing, allowing concurrent changes to proceed even when conflicts arise. Claude can help resolve those conflicts, according to Anthropic.
The company said engineers remain responsible for architectural decisions and enforcing system constraints, as AI-generated code can introduce unnecessary complexity or inefficient implementations.
Anthropic said an early internal version of Claude Mythos Preview rewrote its initial Git-to-Scion ingestion pipeline, producing an implementation that used 20 times less memory and ran four times faster while preserving the original system’s constraints.
The company also uses Claude agents called ‘superfans’ to monitor infrastructure components through telemetry and logs, supplementing conventional alerts.
Anthropic does not intend Scion to replace Git generally.
It said the system is designed for enormous repositories used by large engineering teams or substantial numbers of coding agents.
Instead, it plans to share architectural lessons that Git platforms could adopt as AI-generated code increases pressure on source control, testing and deployment infrastructure.