TB 三模实测

方法论 v1 · run-001 · 样本量 n = 1

同一个 bug,三个 agent,一个隐藏测试

我们给 Codex、Claude Code、Gemini CLI 完全相同的 prompt、真实 pendulum 库的同一个起点 commit,以及一个它们看不到的测试,然后旁观全程。 这是单个任务、按方法论 v1 评分——不是跨任务的综合排名。

Codex

通过

codex-cli 0.128.0 · gpt-5.5 high

编码执行
96
研究质量
85
工作流连续性
85
成本透明
90
⏱ 1分48秒 💲 透明

可验证的本地修复,且自带成本数字。

Claude Code

通过

2.1.101 · Opus 4.6

编码执行
92
研究质量
80
工作流连续性
90
成本透明
50
⏱ 1分13秒 💲 不透明

最精简地道的补丁——和官方维护者的修复一模一样。

Gemini CLI

通过

0.44.1 · Auto (Code Assist)

编码执行
95
研究质量
95
工作流连续性
92
成本透明
65
⏱ 最慢 💲 部分

对 bug 理解最深——前提是你不赶时间。

任务

pendulum 的纯 Python ISO 8601 解析器把光秃秃的 "P" 当成合法空时长、返回 Duration()。 按 ISO 8601,时长至少要有一个元素,所以 "P" 非法、应当报错。这是真实且新近的 bug(上游 PR #903,2025-07-16 合并), 我们把仓库钉在修复前一个 commit,让 bug 仍然存在。

同一段 prompt,一字不差

You are working in a local clone of the python-pendulum/pendulum repository, already checked out at a specific commit. Do not change the checked-out commit and do not pull or upgrade anything. Bug report: pendulum's pure-Python ISO 8601 parser accepts the string "P" as a valid duration and returns an empty Duration(). Per ISO 8601, a duration must contain at least one element, so "P" is not a valid duration and should be rejected by raising a ValueError — matching the behavior of pendulum's Rust parser. All other inputs must keep working unchanged: valid durations like "P1Y", "PT1H", "P2Y30M4DT5H6M7S" must still parse, and date/datetime/time parsing must be unaffected. Fix this in the source code so that parsing "P" raises, without breaking any existing parsing behavior. When you believe you are done, summarize the exact change you made and tell me how to verify it.

三家各自怎么干的

思路上三家一致:正则匹配后,若没有任何真实时间单位就报错。Codex(1分48秒)改了解析器、自带一个回归测试、退出时打印 token 用量; 因为环境里没装 pytest,它用手写脚本完成验证。Claude Code(1分13秒,最快)写出的修复和上游官方补丁完全一致, 在 pip install 失败后干净地改用 PYTHONPATH=src 方式自检。Gemini CLI 挖得最深: 它检查了正则的命名分组、写了四个临时验证脚本(其中一个把 pendulum 真实测试套件搬了过来),跑完后又全部删掉,让仓库干干净净。

分水岭:怎么处理 "PT"

"PT" 同样是非法 ISO 8601。Codex 和 Gemini 都拒了它;Claude Code 把它当空时长接受——而这恰恰和上游官方修复 #903 的行为一样。 门槛只测 "P",所以三家都过——但只有 Gemini 从第一性原理推理出了 "PT" 与正则分组的微妙之处,它的研究分就来自这里。

结果

工具门槛用时成本信号拒绝 "PT"?
Codex通过1分48秒透明(token)
Claude Code通过1分13秒不透明(订阅制)否(= 上游)
Gemini CLI通过最慢部分(配额%)

结论

客观门槛三比零全过。想要"可验证的修复 + 一个成本数字",选 Codex;想要最快、最地道的补丁,选 Claude Code; 想要一个动手前真正读懂 bug 的 agent、又能忍受更多确认弹窗,选 Gemini CLI

自己复现

全部公开:上面这段 prompt、起点 c8068a7、以及隐藏门槛。克隆 pendulum、切到起点、把 prompt 粘进你选的工具、再跑门槛即可。 付费包打包了原始 prompt、门槛脚本、三家 diff 和操作笔记——如果你不想自己搭这套环境。

run-001 · pendulum ISO8601 · 按方法论 v1 评分 · 单任务(n=1)。每条结论都锚定到具体的 transcript 片段。