Repository navigation
Conversation
There was a problem hiding this comment.
This review found 2 issue(s), including 2 blocking issue(s).
Maisiqi
left a comment
There was a problem hiding this comment.
Conditional pass on f0161fe7. I reviewed the full diff from 997a228e, followed both modes through the shared runner, scorer and report, and checked both OCR threads against the original implementation.
- P2, fixed. The open parser matched object-key patterns inside quoted URL strings. The valid URL in the OCR thread failed on the original head and passes with string-aware tokenization.
- P2, fixed. The timeout finding reproduced before a complete thread event. The adapter now preserves exact stdout, session and stderr bytes for incomplete records and returns a failed attempt. A real subprocess timeout and both regression cases passed.
- P1, fixed. Both registered profiles lacked capability and source records. This omitted their evidence links and failed two existing CI tests. Both modes now share a complete catalog entry and those tests pass.
- P2, fixed. The old same-page validator admitted reopening the original URL, and usage could be attributed to the following case after a missing counter. Replaying 1,060 historical attempts found two additional same-page acquisition violations. The change preserves historical evidence and the scorer.
- P2, fixed. The original run inherited local account state and did not enforce the documented CLI version. The adapter uses the repository credential, isolates the CLI runtime, and checks and records the selected version. The PR body now documents the workflow and includes a diagram. The PR timeline contains no linked issue to close.
149 focused tests and both synthetic run, rescore and report paths passed. Live acquisition with the repository API key is still unverified.
There was a problem hiding this comment.
✅ Re-review complete · f0161fe
No findings in this incremental review.
lanyue-llk
left a comment
There was a problem hiding this comment.
Review:建议修改后再合并
范围:已阅读 PR 描述、完整 diff、codex.py 全文、测试,并对照 AGENTS.md、CONTRIBUTING.md 和 provider-contract。未 checkout 运行代码。CI 全绿,以下问题均为设计和契约层面,CI 看不到。
P1:影响结果可信度
- 两个对比方法使用不同 CLI 版本。
codex-single为0.171.0-alpha.13,codex-same-page为0.169.1。PR 目的是对比"打开一次"与"页内续读",版本不同引入混杂变量,且固定在 alpha 版本上。建议统一版本;若必须不同,请说明原因及如何排除版本影响。 reported_version记录的是配置的期望版本,不是实际观察到的版本。codex.py写的是f"codex-cli {self.expected_version}",版本只在validate()检查一次,之后二进制被替换证据仍写期望值。建议validate()保存实际输出并写入 metadata。authentication="api_key"同理,现为写死字符串。- live 路径未验证。 适配器依赖 Codex 内部细节:
tools.web__run的 JS 形态、exec工具名、rollout 路径sessions/**/*-{thread}.jsonl、模型名gpt-6-luna,全部只用合成 fixture 测过。合并前请用真实 API 跑至少一次单题 smoke 并贴结果。
P2:设计与根因
- 用正则解析模型生成的 JS 源码是脆弱点。
OPEN_CALL/OPEN_TOKENS把 JS 对象字面量转成 JSON,OCR 指出的 URL 误替换问题是靠再加一层 tokenization 修补,没有消除根因。web_search事件或 rollout 里是否已有结构化的 open 参数?若有,直接读结构化字段,_open_entries可整体删除;若没有,可否让 prompt 要求严格 JSON? same-page的"同页"判定过宽。targets累积所有results里的ref_id,未区分本页引用与外链引用,模型可能续读其他页面仍被判合规。测试 fixture 每次只返回一个view{i},覆盖不到。请确认 Codex 的 ref 语义,并补"外链 ref 续读判违规"的用例。parse_returns把契约校验、迭代、内容投影放在一个函数里,valid_open是嵌套三元加六个and。建议抽出_valid_open(entries, url, first, targets);zip(..., strict=False)在前面已断言等长,可去掉。fetch()约 55 行混了五件事(session 读取、状态机、用量差分、原始证据打包、metadata)。建议把证据和 metadata 拆成_evidence(...)。except (ValueError, KeyError, TypeError, AttributeError, OSError)过宽。parse_returns内的编码 bug 会被伪装成codex_evidence_error写进评测结果,污染统计。建议只捕获数据解析相关异常。mode字符串散落在三处分支(__init__、_prompt、parse_returns),且config["mode"]缺失是裸KeyError。建议用MODES = {"single": 1, "same-page": None}(最大打开次数)之类的数据驱动。validate()有副作用:把 API key 写入self.env。 若调用方未调用validate(),key 缺失会得到难懂的 CLI 认证错误。建议 key 在__init__/_run读取,validate()只做检查。- 魔法数字。
cancellation_cleanup_seconds返回3,同文件已导入PROCESS_EXIT_GRACE_SECONDS,应复用。模型名、reasoning、context_size 是否应进入 provider 配置?
P3:仓库规范与格式
- CONTRIBUTING 要求 setup/usage 变更同步 Chinese README,本 PR 新增
CODEX_API_KEY与两个 provider,但文件列表没有docs/README.zh-CN.md。请确认是否需要。 - provider-contract "Add an adapter" 第 3 步为"Assign its output contract in
methods.py",本 PR 只改了report-methods.json。请确认流程或文档是否需要更新。 - 在 README 末尾新增 47 行,含两段近似的命令块,PR 正文又重复一遍;同页续读缺 rescore 步骤,与单次模式不一致。建议合并为一个参数化块(
method=codex-single|codex-same-page),PR 正文只放链接。 - 小格式:
PROVIDER_TYPES中codex_cli插在brightdata_unlocker之前,破坏字母序;providers.example.json新增两行为单行,周围是多行;report-methods.json两个方法的profile.description与interface.params文案重复。 - PR 元信息:标题格式正确,有 Purpose、复现命令和图;但没有关联 issue,缺少"为什么做这个对比"的动机(CONTRIBUTING 要求评测发现挂在 Task/sub-issue 下)。作者在自己的 PR 上发的 "Conditional pass" 不算独立评审,其条件(live 验证)也尚未落实。
信息完整性
能看清:做什么、怎么复现、测了什么。看不清:要解决的问题与动机;历史 pilot 的数据和代码在哪(PR 提到重放 530 个样本,但输入不在仓库,无法复核);"两个额外违规"具体是哪两个样本;登录账号与 API key 两种认证对结果的影响,以及新旧结果是否可比。
回退与遗漏风险
- 本 PR 只新增(0 删除),对现有 provider 回退风险低。
- 网页注入:子进程里模型可被页面内容诱导调用
functions.exec,目前靠sandbox_mode="read-only"与shell_environment_policy.inherit="none"兜底,但HOME被透传,read-only 沙箱仍可读文件,请评估。 - 证据泄密:原始 stdout/session/stderr 完整存入 metadata,provider-contract 要求凭据不得进入 metadata/日志。请确认 CLI 的 stderr 与 rollout 不会回显 key,并补断言测试。
TemporaryDirectory无显式清理,只靠 GC。
想请作者回答
- 两个方法版本为何不同,结论如何排除版本混杂?
- Codex 的
web_search事件或 rollout 是否有结构化的 open 参数,可以不解析 JS? results里的ref_id能否区分本页引用与外链引用?same-page约束如何保证?_project_blocks里的【\d+†…】与[Button: …]清洗,是否与现有 native answer projection 重复,能否复用?- 若 rollout 文件在进程退出后才完整落盘,
_session_chunk的读取时机会不会丢记录? - 同一线程 resume 时,上一题上下文会影响下一题的打开行为吗?"每题一次"是否被对话历史污染?
- 这两个方法与历史 pilot 结果的可比性边界是什么,报告里是否需要标注?
建议的最小修改顺序
统一版本或说明理由(1)→ 记录真实版本(2)→ 跑一次真实 smoke(3)→ 抽 _valid_open、收窄 except、validate() 去副作用(6/8/10)→ 补外链 ref 测试(5)→ 其余格式与文档项一并处理(P3)。
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
|
Reviewed llk’s review and the OCR timing finding against the saved traces and the current adapter. The fixes are in
The offline historical audit checked 16 of 136 passing results using the saved tool outputs and accepted task scope, including all eight with unavailable identity metadata. The raw open evidence identified the requested page in all 16, and the selected content checks yielded no additional confirmed rejection. The complete same-page capture contains 333 owned continuation targets and two repeated direct opens. Those are |
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
✅ Re-review complete · aa05c9b
No findings in this incremental review.
There was a problem hiding this comment.
ℹ️ Review skipped · 634c0c1
No reviewable content was selected for this run.
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
| trailing = blob[marker.end() :] | ||
| if trailing and canonical.endswith(trailing): | ||
| payload = json.loads(json.loads(blob)["content"][0]["text"]) | ||
| result = payload.get("result") |
There was a problem hiding this comment.
Validate that payload is a dictionary before calling .get(). A valid non-object HTTP JSON response (for example, an array containing a long string) can remain valid JSON after middle truncation. In that case this line raises AttributeError, which is not caught here, by parse_returns, or by the Codex caller. This bypasses the intended empty-output failure and prevents diagnostic evidence from being attached. Guard the decoded root type and add a regression test for a parseable, middle-truncated array/string response.
Review @ 697b714(对照最新 main 997a228)验收要求:PR 提供的 runner 能让其他用户只用仓库代码、配置和自己的 实测结论:基本满足我用一个假的
P1 文档里没有生成三方法对比报告的命令README L1828 和 PR 描述的做法是:每个方法单独运行、各用一个输出目录、各出一份报告。这样只能得到三份单方法报告。要把分开的运行合成对比报告,得走 把三个方法放进同一次 要求:在 README 里给出生成三方法对比报告的完整命令,包括怎样装两个版本( 非阻塞说明
|
|
这个 PR 开在仓库按
之前那条审查意见(没有提供三方法对比报告的命令)由 |
Purpose
Add two Codex CLI Web Fetch methods to the shared runner. Both score the native web tool output with the existing Web Fetch scorer and retain the raw CLI and session evidence. The comparison measures one open of the supplied URL versus continuation within the opened page.
flowchart LR Dataset["Web Fetch task"] --> Session["Codex CLI conversation"] Session --> Single["One native open"] Session --> Same["Native open and same-page ranges"] Single --> Evidence["Tool output and raw evidence"] Same --> Evidence Evidence --> Scorer["Shared Web Fetch scorer"] Scorer --> Report["Offline rescore and HTML report"]Reproduce
Set
CODEX_API_KEYin the repository.envusing an API project with Luna and live web access. Install the version declared for the selected method in the provider config. Use the Web Fetch guide to exportcontent-scopes-530with its reference assets. Choose a fresh output directory for each invocation.Repeat with
method=codex-same-pageand its configured CLI version. Each invocation starts a fresh conversation and resumes it for later tasks. Both modes use Luna, medium reasoning, live web, high context and long tool returns.Verification
Historical report correction