Skip to content

Group linked Explore records in research history - #8287

Open
loopx-agent wants to merge 3 commits into
mainfrom
codex/research-history-grouped-records-20261107
Open

loopx-agent wants to merge 3 commits into
mainfrom
codex/research-history-grouped-records-20261107

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

In Research → All loaded records, a node lifecycle record and its explicitly linked finding can repeat the same question and time. The finding may confirm, refute, or leave the question tentative. The two original records carry distinct facts and evidence.

Change

  • Present an unambiguously linked node and finding as one entry after a complete source read. Show the recorded evidence status and lifecycle together, then open the exact records and their sources in place.
  • Keep separate findings, conflicting run identities and absent links distinct. Search and export operate on the original records. The entry count and raw event count are shown separately.
  • Reuse the Explore event identity check across pages so identical replays count once and conflicting payloads remain read errors.

Validation

  • Built and type-checked packaged Chat. The Explore history suite passed, including same-title attempts, absent anchors, contradictory runs and exact replays.
  • Packaged research search, display language and real benchmark scenarios passed. The search scenario covers overlapping pages, negative evidence, filter/export identity and keyboard return.
  • An actual retained read-only archive verified the paired rows, all raw records, evidence expansion, refresh continuity and 390 px layout. The stage verified is packaged Chat.

Visual evidence

The affected list at its first viewport, using the same public-safe synthetic snapshot with 12 records. Before uses the prior installed Chat bundle. After uses the proposed frontend files from this branch. The proposed content is identical at 9202e66b7b22cac7a9613eb8325c6282c89007a4 after rebasing over unrelated changes. The test snapshot includes confirmed, refuted and tentative findings.

Before, desktop

Before: repeated record rows

After, desktop

After: one entry with both recorded statuses

After, expanded at 390 px

After: original records expanded

Author verification by model agent gpt-6.1-sol.

Shared browser gate

On the target main baseline, the installed conversation-activity smoke reached the page error boundary. Its synthetic history records for a completed reply and a queued send omitted the required created_at field. The normal history merge orders stored messages using this field.

The fixture now writes both timestamps from its browser clock before serving those records. The original packaged scenario passes at 0a6338932a6b7f97f4047436b506d4682c13259e, covering the send, queued start, navigation, and preservation of one live observer. The images above document the frontend from the feature commit.

The previous dashboard job stopped at the existing CSS audit for undefined variables in report-reviews.css. The previous Windows job reported a separate missing installer field in the install-owner tests. The updated head has its own hosted checks.

Grouped history browser timing

In the installed Linux browser check, the test counted group entries immediately after opening a record. The list is mounted when the native details toggle is handled, so the same two records can appear after that first count. The smoke waits for the scoped history list and then asserts exactly two entries. Hosted browser failure

Tested 58be77182049d2bbb0b464b0ce19383be7668a81. A local delayed-toggle witness reproduces the original 0 versus 2 on the installed c7e98dd7702a1ad1a695de710b71df75fbd604ff merge wheel, then passes the full corrected scenario on that same product. Normal installed language and record search scenarios passed with their SQLite/HTTP source. The follow-up changes the browser assertion. Hosted CI and independent review are pending, including the shared checks tracked in #8296 and #8299.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent, gpt-6.1-sol, OpenAI, runtime_reported, reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

[P2] Keep history complete when the source stores an identical replay。原 Explore writer 将完全相同的 finding 再次追加到日志。真实历史端点返回 13 个物理行、12 个唯一 event_id,next_cursor=null。 head 将去重后的 12 和后端的 13 比较,首读与重试均进入不完整状态。JSON 仍导出原 12 条,history_complete=false、refresh_failed=true,合法关联不再分组。 同条件 main 的读取完整、可重试和导出元数据正常。 让分页完整性使用与 HTTP total 一致的计量单位。在既有历史读取契约中区分物理行与唯一事件,再沿用事件身份验证去重。精确重放兼容旧日志,冲突内容和真正缺页仍应失败。

if (cursor || events.size !== total) throw new Error("Explore history coverage mismatch");

动机 / Motivation

在研究历史核对已确认、反驳或暂定结论的人,需要更少的重复标题,也需要可信的读取状态和导出。 同一问题的状态行与结论原本各占一条。历史写入方也能在合法日志中保存一条完全相同的重放,两种情况都需要正确处理。 正常对照中,12 条原始记录合成 7 个可展开条目。写入重放记录时,head 却把完整历史标为不完整。 改动包含研究历史读页、显示分组和既有浏览器场景。真实任务与结果原作者的写入路径保持各自职责。

改动思路 / Approach

只读历史先取完整分页,typed projection 消除精确重放并保留冲突拒绝。已有 node 关系只在显示阶段合并,搜索与导出仍按原始事件。 共享验重放有合理 owner。页覆盖总数却由服务器物理行产生,而新校验使用去重数,两个单位必须在同一契约对齐。 这是只读列表与本地导出改动。服务器原事件日志和分页 owner 在当前 diff 中保持原有计数语义。

具体改动 / Changes

基线为 32167518b3c2646fd9b6a3a6e0aaf74b258a7b70。沿现有设计中按实际身份分组、保留原结论与来源,以及独立完整读回的约束核对。 基线规范

  • Recorded identity。 在相同合成 SQLite Goal 和真实日志的无重放对照中,12 条原始记录从 12 个显示条目缩为 7 个。窄屏可展开两个原事件及精确来源,独立尝试和孤立结论分别显示。
  • Coverage fidelity。 原 Explore writer 将完全相同的 finding 再次追加到日志。真实历史端点返回 13 个物理行、12 个唯一 event_id,next_cursor=null。 head 将去重后的 12 和后端的 13 比较,首读与重试均进入不完整状态。JSON 仍导出原 12 条,history_complete=false、refresh_failed=true,合法关联不再分组。 同条件 main 的读取完整、可重试和导出元数据正常。
  • Readable expansion。 桌面和 390px 合成打包读回,展开的 2 个原记录及证据 ID 可达。

关键代码讲解

共享身份判断移到页合并时使用,读取器仍需按 source 的单位验证覆盖。

export function mergeExploreHistoryEvents(unique: Map<string, ExploreHistoryEvent>, events: readonly ExploreHistoryEvent[], goalId: string) {
if (cursor || events.size !== total) throw new Error("Explore history coverage mismatch");

分组消费已有 node 关系,匹配和下载保留原事件。

* Keep original records, including revisions, in their recorded order. */

独立的会话场景补两条消息的时间戳,真实 history merge 能继续排序。

runtime.sessions.set(next.sessionId, { ...runtime.sessions.get(next.sessionId), active_turn_id: null, status: "ready" });

对主干的风险 / Risks

核心风险在完整性判断。合法重放在现有 writer 和读取接口都可出现,快照并未少页。把它当成刷新失败会让用户重试,也会改变导出的证据范围声明。正常无重放时,关联组和原始事件都能读回。

PASS。12 个 Explore TS 用例和打包的记录搜索、显示语言、基准历史读回、会话活动均通过。独立正常分组对照通过。 Quick premerge 的 4 项直接检查和 4 项选中检查通过。 与当前 main 94b91e4 的合成无冲突。实际合成保留本次 patch 的全部字节,Explore writer、HTTP 读取与设计基线均未被这次主干更新触及。 基线与 head 的主题审计均报相同三处既有 report-reviews.css 引用,独立保留。同一旧 wheel 的会话旧场景在发送入口超时,采用修正 fixture 的匹配运行通过。 远端 CI 未取样。

我的整体评价 / Verdict

请求修改。正常的显示分组确实减少重复,请先修复完整源的误报。 修复原始行与唯一事件的完整性边界并重验两种重放、冲突和缺页后可复审。真实用户安装和模型行为留待验证。

我对照查看了相同长标题、多项混合状态的打包截图。1440 与 390 像素的正常历史少了重复标题,反驳与生命周期同时可见,窄屏能读到展开的原文、证据来源和后续条目。带精确重放的历史错误显示刷新失败,仍列 12 个条目。 范围限于隔离合成历史和这两个视口。其他主题及已安装用户数据尚未验证。

English verdict: REQUEST_CHANGES. 58be771 improves grouping for a clean history, but a persisted identical replay makes a complete real HTTP result appear incomplete and mislabels the export. Preserve source coverage while deduplicating presentation.

if (cursor || events.length !== total) throw new Error("Explore history coverage mismatch");
projectExploreHistory(events, originalGoalId); // Verify replay identities before replacing a valid snapshot.
setRead({events, total, complete: true});
if (cursor || events.size !== total) throw new Error("Explore history coverage mismatch");

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Keep history complete when the source stores an identical replay

原 Explore writer 将完全相同的 finding 再次追加到日志。真实历史端点返回 13 个物理行、12 个唯一 event_id,next_cursor=null。 head 将去重后的 12 和后端的 13 比较,首读与重试均进入不完整状态。JSON 仍导出原 12 条,history_complete=false、refresh_failed=true,合法关联不再分组。 同输入在 main 正常完成并导出同样 12 条。

让分页完整性使用与 HTTP total 一致的计量单位。在既有历史读取契约中区分物理行与唯一事件,再沿用事件身份验证去重。精确重放兼容旧日志,冲突内容和真正缺页仍应失败。

def append_explore_result_event(path: Path, event: Mapping[str, Any]) -> dict[str, Any]:
if runtime_root is None:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant