# Cognition 推出 FrontierCode 代码评估基准：从可用到可合并

- 来源：meng shao (@shao__meng)
- 发布时间：2026-06-09 09:01
- AIHOT 分数：72
- AIHOT 链接：https://aihot.virxact.com/items/cmq5y4g3h03ewsl5iflp8ptv2
- 原文链接：https://x.com/shao__meng/status/2064150967680127316

## AI 摘要

Cognition 发布 FrontierCode，含 150 个任务（来自 36 个开源仓库，每任务 40+ 小时），按难度分 Extended/Main/Diamond 三层。沿行为正确性、回归安全等六维度衡量 mergeability，指标为 Pass rate 与 Score。Diamond 子集最高分：Claude Opus 4.8 达 13.4%，GPT-5.5 为 6.3%，Gemini 3.1 Pro 4.7%；Main 子集 Opus 4.8 为 34.3%。开源最佳 Kimi K2.6 仅 3.8%。GPT-5.5 token 用量约为 Opus 四分之一，性价比更优。

## 正文

Cognition 推出「FrontierCode」：把 Coding 评估标准，从可用，提升到高质量、可合并！
评估结果 Top2：Claude Opus 4.8、GPT-5.5
https://cognition.ai/blog/frontier-code

FrontierCode 评估内容
规模与结构：
· 150 个任务，来自 36 个 flagship 开源仓库
· 20+ 维护者参与，每任务投入 40+ 小时
· 三层嵌套难度：Extended（150）→ Main（100 最难）→ Diamond（50 最难）

两个核心指标：
· Pass rate：通过全部 blocker 标准（维护者眼中的 hard stop）
· Score：rubric 加权得分；任一 blocker 失败则 score = 0

评测体系：不止 unit test
FrontierCode 沿六个维度评估 mergeability：
· 行为正确性 - 是否解决问题
· 回归安全 - 是否破坏现有功能
· 机械整洁 - build / lint / style 是否通过
· 测试质量 - agent 写的测试是否真测到行为
· Scope 纪律 - 是否只改该改的
· 代码质量 - 风格、设计模式、可读性、仓库惯例

三种较新的 grading 方法：
· Reverse-classical：把 agent 写的测试跑在未修复的base commit 上，必须 fail -- 证明测试有意义
· Scope：文件边界、diff 大小、语义局部性（如是否只改某个函数内）
· Adaptive classical grading（mutagent）：用 LLM 微调测试或应用代码，对齐 agent 的实现细节，在保持确定性的同时允许多种合法解法

Criteria 分 blocker（不通过就不能 merge）和 non-blocker（影响 score，但不一票否决）。

评估结果：前沿模型仍远未饱和
· Diamond 子集：Claude Opus 4.8：13.4% score；GPT-5.5：6.3%；Gemini 3.1 Pro：4.7%
· Main 子集：Opus 4.8：34.3%
· Extended 子集：Opus 4.8：51.8%

几个值得注意的点：
· Diamond 几乎未被"刷满" -- 最强模型也只有 13.4%，说明高难度子集仍有大量 headroom
· 闭源 vs 开源差距大：最佳开源 Kimi K2.6 在 Diamond 仅 3.8%
· 成本 vs 能力：GPT-5.5 分数低于 Opus，但 token 用量约为其 1/4，性价比更优

### 引用推文

> Cognition：Introducing FrontierCode: a coding eval that raises the bar for difficulty & quality. Each task took 40+ hrs of work by leading open-source maintainers. Models ...
