Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis 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: 11a416c598
ℹ️ 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".
| /** A session end keeps the range it found due, leaving a replacement range alone. */ | ||
| export function withClosedRange(pending, sessionId, expected) { | ||
| const range = rangeOf(pending, sessionId); | ||
| if (!range || !expected || range.at !== expected.at || range.sessionEpoch !== expected.sessionEpoch |
There was a problem hiding this comment.
Close late same-session ranges when the snapshot is empty
If the final turnEnded has already set open=false but is still awaiting its record or evidence, the bounded settling wait can expire before it writes a candidate. If that write lands after this snapshot but before the later candidate update, endingRange is null and this guard skips closing the new range; while its owner is still live, the range remains pending until an idle or error-episode trigger instead of becoming immediately due at session end. Preserve the ending turn and epoch so late writes from that turn can be closed without closing a new-prompt replacement.
Useful? React with 👍 / 👎.
|
Sentinel 正在审核此变更,尚未形成最终结论。 Sentinel 审核中
开发 agent 查询详情: 调用 MCP 工具 由 Sentinel 审核 · 目标提交 11a416c59840 |
|
Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。 另有 2 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。 开发 agent 查询详情: 调用 MCP 工具 由 Sentinel 审核 · 目标提交 38d2ac4530ce |
|
Sentinel 保留了 2 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
需要完整证据时,可用行末 由 Sentinel 审核 · 目标提交 38d2ac4530ce |
Summary
An old SessionEnd can remain in cleanup while a prompt opens through the lifecycle lock's ELOCKED fallback. If the old range is distilled and the new turn creates a replacement, the old cleanup could close that replacement.
Capture the range before asynchronous cleanup and close only a range with the same start, session epoch and source turn. The existing lock fallback and ended-range due behavior are preserved.
Evidence
Merge Danger
Two-way. Only the existing session-end caller closes a range, now with the source it read. No state migration or timeout change.