Repository navigation
Conversation
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
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. |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
通过会话绑定查询历史的调用方需要先看到最近更新的可用会话。 旧接口把持久化时间当作字符串比较,微秒或带偏移的更新可能排在较旧会话之后。 经过 Core 验证的同一批会话按 UTC 微秒排序,同一时刻保留既有文本次序,可读时间排在旧无效值之前,原更新时间字串原样返回。 本次范围为已存在的绑定历史 API 和返回顺序。
改动思路 / Approach
沿原绑定验收和去重取得批准的 ID,再用既有 chronology_key 排序。查看列表仍通过绑定二次核对与原公开会话投影。 本次范围为已存在的绑定历史 API 和返回顺序。 显示顺序改变,候选授予、原绑定响应和既有恢复选择仍由各自所有者处理。
具体改动 / Changes
审查精确提交 f9ba36a8da228e172bbc44ea091d08f5efdc9a51,当前比较基线 509360fb0d3e9e6e578ddf5c12db587886016b23。三个文件增加 128 行、删除 1 行,覆盖现有快照的排序、真实 HTTP 回归与 Lean 模型。 verified-bound-session-inventory 已验证只返回原绑定授权的现有会话及匹配绑定,不创建或恢复会话。reject-mixed-selector 已验证混合或重复选择条件必须拒绝,保留原只读绑定检查。 既有会话绑定读取约定
关键代码讲解
ChatConversationBindings.local_session_snapshot。按现有共享 UTC 解析给已验证成员排序,继续核对原绑定。 源码observe_local_sessions_flow。候选的发现、重复拒绝和 Core 授权沿原路径,排序接收原返回集合。 源码ChatRequestHandler._list_sessions。读取与回显唯一绑定,错误沿原拒绝路径。 源码
对主干的风险 / Risks
相同入口在精确头把新的分数秒与跨本地日期记录排首,等时刻和两条旧文本保留原相对次序。实际返回匹配绑定和原时间,读取前后的会话内容与合成宿主调用记录一致。 基线的原作者案例与新增跨日案例均失败。现头混合选择参数仍返回 400 且无列表。原绑定变化与重复行拒绝继续由已有 Core 与 HTTP 测试覆盖。 125 项 Python 回归、70 项 TypeScript 绑定所有者测试、Ruff 和 Git diff 检查通过。Lean 4.22.0 验证拒绝保持与成员保留,刻意丢弃旧文本行的负对照无法通过。 验证覆盖本地 Chat HTTP 与合成会话,浏览器、现有消费者按 last_activity_at 作的默认选择,以及外部 Lark 和远端 CI 均未实测。
我的整体评价 / Verdict
APPROVE。 经过 Core 验证的同一批会话按 UTC 微秒排序,同一时刻保留既有文本次序,可读时间排在旧无效值之前,原更新时间字串原样返回。 原始 GET 的成功、拒绝和只读证据均已复验。验证覆盖本地 Chat HTTP 与合成会话,浏览器、现有消费者按 last_activity_at 作的默认选择,以及外部 Lark 和远端 CI 均未实测。
English verdict: APPROVE at f9ba36a. The bound-history endpoint now orders the same Core-approved Session rows by UTC while retaining timestamp text, deterministic ties, legacy rows, and rejection of mixed selectors.
Goal And Delivered Outcome
The read-only Chat history for a conversation binding returned rows in lexical timestamp order. A retained fractional-second update could appear after an older whole-second or offset-encoded update.
The snapshot now sorts the Session rows returned by Core by UTC chronology. The existing ordering of equal instants and the returned timestamp strings are preserved. The binding recheck still runs before the snapshot is returned.
Author Declaration
mainat509360fb0through the real loopback bound Session history endpoint.Validation
PYTHONPATH="$PWD" python3 -m pytest -q tests/test_chat_conversation_bindings.pytests/control_plane_ts/conversation_binding.test.ts.tests/test_history_chronology.py.lean -DwarningAsError=true regression/BoundChatSessionOrder.lean. Dropping rows with unreadable timestamps makes the membership proof fail.python3 -m loopx.entrypoint canary premerge --from-git-diff --git-diff-base origin/main --tier quick.The Lean model begins with Core's accepted result. It proves that display ordering retains the exact approved rows and that rejection still produces no list. The real HTTP tests exercise parsing and the binding path separately. All tests use disposable local synthetic records.
Scope And Continuation
The read-only list changes order after authority validation. The underlying Session records, candidate discovery, provider routing and resume decisions retain their existing contracts.
Frontend / Visual Evidence
This change affects the returned history order. The real API response shows the latest Session first under the existing list shape. Browser rendering was outside this validation run.
Type Of Change
LoopX Area
Shared-authority RFC fixture impact
N/A.
Boundary Checklist
Signed-off-bytrailer.