Skip to content

test(chat): keep research history navigation on its frontend - #6690

Open
loopx-agent wants to merge 1 commit into
mainfrom
codex/research-history-status-route-20261017
Open

loopx-agent wants to merge 1 commit into
mainfrom
codex/research-history-status-route-20261017

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

The research-history browser acceptance intercepted its own initial document URL because the **/status.json* glob also matched ?statusUrl=/status.json. It forwarded that navigation to the isolated history backend, which correctly rejected the document path with HTTP 503 before the history journey could run.

Match the status endpoint by URL pathname, preserving its query parameters. Also preserve the fixture's development or packaged entry path when opening the synthetic collision case; the hard-coded /chat/ path prevented that later case from loading in development mode. Both changes stay in the existing browser scenario; no product, scoring, or runtime behavior changes.

Validation:

  • Existing research-history browser scenario passes against the development entry and the built packaged entry, with the real isolated history backend.
  • Coverage includes three retained checkpoint histories, complete pagination, source immutability/no mutation attempts, reload/back/forward, unavailable-refresh recovery, narrow viewport, and synthetic overlapping-target pointer/keyboard selection.
  • Chat bundle built and verified; node --check and git diff --check pass.
  • Before the entry-path correction, development progressed beyond the repaired 503 and failed at the synthetic fixture's 11 / 11 wait; after correction the full scenario passes.

This removes the demonstrated fixture blocker only. Other CI failures and numerical workbench adoption retain their own validation. The bounded refactor review found no need for a shared abstraction: both corrections belong to this scenario's existing navigation/proxy setup.

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

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Exact head: e35b3bf

动机

运行研究历史浏览器验收的维护者,在开发服务器入口打开历史页面时,会在页面加载前遇到 503。
旧测试把入口地址查询参数中的 /status.json 也当成状态接口,误将整个页面请求发给只负责历史数据的隔离后端;这样既无法检查阅读过程,也会误报前端失败。
修复后,页面仍由所选前端服务提供,状态和历史数据继续经过真实历史后端,开发入口与打包入口都能走完原来的验收。
本次只修复现有验收脚本的请求分流和导航,不修改产品实现、原始研究记录或分析权限。

改动思路

改动保留现有 openWorkspacePage、fetchWorkspaceBackend 和一次性原生历史后端:前端拥有页面,后端拥有状态与历史读取。状态请求按 URL 的 pathname 精确匹配,查询参数仍由原有代理函数保留。进入单独的合成碰撞用例时,只替换查询参数,沿用调用者选定的入口路径;因此开发模式保留 /,打包模式保留 /chat/。

以下是同一环境下独立运行原生场景的结果,基线为 dededb6:

场景 基线 当前 head
开发入口 状态路由拦截页面,503 !== 200,尚未开始历史验收 完整场景通过
打包入口 完整场景通过 完整场景通过

打包基线本来就能通过,不能把这次修复描述为两种入口此前都失败。单改状态匹配仍会留下后面的开发模式导航跳到 /chat/ 的问题;两处修正属于同一个可独立回滚的场景修复。已有其他场景采用相同的 pathname 分流方式,无需增加路由框架、兼容分支或产品配置。

具体改动

关键代码讲解

  • researchHistoryScenario.run 的状态路由:url.pathname === "/status.json" 只接管接口请求,避免入口 URL 的 statusUrl 查询参数触发路由;仍调用原来的代理和响应断言,没有用固定成功响应替代真实后端。
  • 合成碰撞用例的导航:相对查询 URL 保留选定前端的 pathname。原有 11 条合成事件、真实指针命中、键盘、返回与刷新断言均保留,未混入三份真实记录。

整个提案仅修改一个现有测试文件,增加 4 行、删除 2 行;loopx/、apps/、packages/、文档及工作流与基线逐字节一致。

验收依据为既有 examples/personal-workspace-browser/research-history.md,固定修订 dededb6:

  • Ordinary reading journey:已实现并执行;三 Goal 切换、原文及引用、刷新和 Back/Forward 保留上下文,阅读不启动模型或任务。
  • Reproduce:已实现并执行;开发和打包前端均通过完整现有场景。315 条真实 Explore 记录覆盖 Portfolio 76/76、Graph 134/134、Ad 105/105,分别读取 2/4/3 页;没有补造关系边。每次真实记录阶段读回 source_unchanged=true、mutation_attempts=0。

这些依据只约束现有只读场景。工作区 RFC §5.11 中尚属提议的完整分析服务、科学评估与关系采集,未被本次验收认证。

对主干的风险

未发现阻断项。主要风险是把测试页面或数据一起换成伪造成功,导致脚本通过却没有验证真实阅读路径;本次保留产品历史 HTTP owner、原始记录摘要、完整分页及详情断言,只有周边通用工作区 API 仍使用既有脚手架。两种入口都实际执行了失败刷新后保留历史、重新读取、390px 布局,以及独立合成碰撞用例的指针与键盘路径。已查看本次打包场景的真实记录首屏及合成窄屏截图,截图本身不证明数据持久化或科学收益。

独立验证包括两份正常前端构建、四次基线/当前 head × 开发/打包场景、node --check、git diff --check 和生产路径无改动核对。预期的开发基线失败保留在对照结果中,当前 head 两次均通过;没有删除断言或提高限额。当前主干新增内容仅涉及 Lark 完成停止后的源验证,与本场景的前端、历史 owner 和依赖无交集。依照本次策略未查询 CI;未声称全部 68 个场景、安装后的桌面应用或长期运行已验证。若入口契约以后变化,应重跑两种模式;回滚仅需撤回这两处测试修复。

我的整体评价

APPROVE。修复恢复了现有验收对开发入口的覆盖,并保留打包入口原有行为,完成了一个有用的测试维护结果。对长期工作的判断是产品行为保持不变、重复验收成本降低;对用户体验的判断是产品旅程保持不变、测试可重新验证原有只读阅读及恢复路径,没有增加用户交互或授权步骤。这不等于研究质量、实际采用或长期净益已经成立。

已检索既有历史测试、浏览器场景和近期同作者 35 个 PR(创建时间覆盖 2026-10-16 13:31–22:58 UTC,非全历史):本 PR 直接修复现有场景,未增加同形示例;相邻的 #6684 属于独立静态站点发布验收,其他相邻 PR 属于不同运行时边界。没有证据支持重复脚手架或批量造 PR 的判断。面向后续变更的简化检查认为两处局部表达式已足够,进一步抽象没有当前消费者;无新增协议词汇、状态或兼容负担。评审通过与合并资格、合并授权分别处理。

English verdict: APPROVE - e35b3bf restores the existing development research-history acceptance while preserving packaged behavior. Independent base/head runs reproduced the development baseline's initial 503, retained the passing packaged control, and passed both head modes through the real isolated history backend; production code is unchanged and CI was not consulted.

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