Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ed72f0752
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let Some(token) = token { | ||
| let point = BranchPoint::resolve(token, session)?; | ||
| session.messages.truncate(point.end); | ||
| session.messages.truncate(point.end + 1); |
There was a problem hiding this comment.
当所选回答之后还存在消息时,point.end 已经是排他下标,传入 point.end + 1 会额外保留下一条消息(通常是后续用户请求),使带 --through 的分页读取和内容搜索泄露边界外历史;现有 bounded_view_excludes_future_content_and_derived_metadata 测试也明确期望选择首轮后仅保留 2 条消息。应继续按 point.end 截断。
AGENTS.md reference: AGENTS.md:L8-L9
Useful? React with 👍 / 👎.
实验结果
已完成 Codex 自动 PR 审查验证,此 PR 仅用于测试,关闭且不合并。
main。crates/ferry-engine/src/sessions/branch_point.rs一行,将truncate(point.end)改为truncate(point.end + 1),故意注入边界错误。@codex review;机器人记录的触发方式为PR opened。AGENTS.md。本地验证
运行
cargo test --manifest-path crates/ferry-engine/Cargo.toml --locked --lib sessions::branch_point::tests -- --nocapture:bounded_view_excludes_future_content_and_derived_metadata;期望 2 条消息,实际为 3 条。主分支保留正确实现;测试错误仅存在于此临时分支。
此实验确认创建 PR 时的自动触发、中文问题反馈与该边界错误的识别能力。未验证现有 PR 每次 push 的重审触发,也不代表对所有 Bug 的检出率。