Skip to content

fix(desktop): 重开时恢复原 Goal 的研究页 - #7112

Merged
loopx-agent merged 3 commits into
mainfrom
codex/research-workbench-continuity-20261023
Oct 23, 2026
Merged

loopx-agent merged 3 commits into
mainfrom
codex/research-workbench-continuity-20261023

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Closing the App while reading Research discarded the view selection, so reopening returned to Overview in the same Goal. Restore Research through the existing local selection adapter and exercise all five Goal views through capture, disk write/read and a changed loopback port. No new setting or execution action is added.

Validation at 4568866fb35c5f96e18249971ef2ee9ab718fbc0: the default-concurrency native suite passes all 182 selected tests in an independent build directory (12 opt-in library cases and one signed-artifact integration excluded); the immutable base passes the same full suite there. cargo fmt --check and Clippy with warnings denied pass. The pre-existing formatter failure in node_environment is corrected with formatter output. Earlier shared-build-directory runs failed on an occupied fixture port and subsequent poisoned locks; those failures remain recorded with cause unassigned. This PR does not claim to repair service-port behavior.

All selected automatic premerge checks pass. Its binary-image hold is satisfied by inspecting the exact screenshot pixels, synthetic provenance and metadata: the JPEG contains only pixel-dimension EXIF. CQR cqr_dbe0a5848899075d8b43 passes while retaining the historical test risk. Text scanning excludes the binary and the image is reviewed separately.

Same-source packaged macOS QA at 4568866fb35c5f96e18249971ef2ee9ab718fbc0 verified normal quit/reopen, window close/reopen, explicit Manager return and corrupt disposable preference recovery. The frontend manifest, runtime bundle and actual backend capabilities endpoint all report that head. Research reopens in the same Goal across a new loopback port. The installed-context reproduction remains private. This is a native reading-continuity fix; it makes no research-benefit or installed-upgrade claim.

The screenshot below is an earlier mixed-source QA capture: native implementation edb61415f4b77c4cff45d397ba4a2d5732357526, Core/frontend 305bba7f4ea9471df6b86102f98c0aa096f6705d. It illustrates the unchanged renderer, and is not the final same-source packaging proof. An initial packaging attempt correctly rejected stale frontend provenance; the build sequence was corrected and rerun before qualification.

Visual evidence: an independently identified packaged QA App, one disposable synthetic Goal, no model execution. Reopening lands directly in Research. UI styling and content hierarchy are unchanged.

Packaged QA after reopening in Research

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 · max

动机

在原生 App 中阅读某个 Goal 研究历程、退出后继续阅读的用户。 同一个 Goal 的研究页在旧版正常退出后重开变成概览;修复后在新的本机服务端口直接恢复研究页。 同一 Goal 与研究页签随正常退出或关窗保存并恢复;主动返回管家和损坏偏好都回到管家。 本次只修原生阅读位置恢复;不改变研究页面布局、深度分析执行、评分、任务状态或权限。 完整筛选条件跨进程保留、实际实验采用与研究收益仍未由本次修复证明;真实安装更新另行验收。

改动思路

当前页面本来已有研究路由,丢失发生在原生 App 保存展示位置时。保留本机导航偏好和原生生命周期 IO,只补上前端已经存在的研究页签;没有第二状态 owner、重试策略或权限。正常退出从当前本机页面提取选择,原有写入器落盘;重开用当前服务端口重建地址,继续交给已有前端路由。显式返回管家与损坏偏好的回退复用同一路径。当前 PR 修通正常退出与重开后的研究入口连续性;页面密度、完整筛选恢复和实际研究采用继续原任务验收。这个单分支变化用文字已能说明,无需额外图表。

具体改动

关键代码讲解

  • LocalWorkspace::selections:四个旧视图的精确匹配中补入已有 research;未知或退役值仍使用前端缺省页。没有新增字段或保存任意 query。
  • LocalWorkspace::capture:沿用同源、唯一参数及标识符检查,只提取 Goal、页签、Agent 和 Todo。prompt、token、report/session 和旧服务地址不会进入恢复信息。
  • launch_destination:独立读取既有 v1 偏好,再用新端口恢复本机位置。损坏或缺失数据回管家;明确回管家的空 Goal 不被旧研究页覆盖。
  • remember_current:继续由实际退出/关窗事件生产偏好,使用原有原子写入,不引入另一份手动声明。

对照基线 305bba7f4ea9471df6b86102f98c0aa096f6705d 的 apps/desktop/loopx-control-plane/README.md#returning-after-a-normal-close。原生恢复规范的 local-selection-reopen、selection-only-privacy、explicit-manager-recovery 三项均在本 head implemented:分别对应跨端口重开、磁盘字段排除、显式管家及损坏偏好回退。现有 round-trip 测试扩成全部五页的 capture→写入→独立读取→新地址,不用仅检查 helper 返回值。services.rs 的 node_environment 是 rustfmt 输出,闭包布尔表达式语义保持;这不是端口探测修复。README 和218,962字节 JPEG 记录可公开的合成 QA,未包含真实研究/用户上下文。

对主干的风险

主要风险是意外重放外部来源或执行 query,以及拿旧资源打包误当新代码通过。前者由未改动的同源、字段白名单、未知视图与损坏偏好规则保护;当前全部原生测试及实际管家/异常恢复已覆盖。后者确实在初次打包时被前端版本检查拒绝,修正构建顺序后,最终原生、前端清单、资源包和实际后台接口全部对应4568866f。公开截图是较早 native edb6141/Core305bba7 的混合构建,只展示未变 renderer;最终同版本退出、关窗、管家及损坏恢复证据独立保存。

当前独立构建目录默认并发原生套件182通过,12项可选库用例及1项签名归档集成未选;不可据此声称正式签名发布完成。不可变基线同套件182通过,fmt、Clippy警告即失败及所有选中的自动预合并检查通过。原始 premerge 对二进制图像的人工 hold 保留,已通过实际像素、合成来源和只有像素尺寸的 EXIF 检查履行;文本扫描未假装解码 JPEG。精确范围 CQR cqr_dbe0a5848899075d8b43 通过。早期共享构建目录出现占用端口及后续锁污染,原因未归属;记录完整保留,不能宣称被修复。独立目标的基线/当前完整并发及实际退出路径提供当前覆盖,没有放松断言或改服务策略。按 Goal 配置未查询 CI。

我的整体评价

逐个检查了真实原生窗口的研究页、重开后的首屏及管家回退。页签与 Goal 一起恢复,用户无需再次寻找研究入口;渲染层、正文层级和折叠规则没有修改。 本 PR 未改变长正文密度、展开内容或手机布局;其整体可读性和实际研究收益不由这个导航修复验收。

长程工作判断为 preserved,用户体验为 improved:已有意图与授权下增加0轮确认,重开直接继续阅读,减少一次重复找页签。数据和执行仍由原 owner 负责,真实实验采用及收益未知没有被改成成功。判定 justified_increment;单分支补齐、既有测试参数化与必要格式修复符合比例原则,更大的视图注册框架不必要。当前扩展既有本地映射,复用现有词汇,未创建共享协议或权限。实际安装读回将在授权合并后完成,不以本次合成 QA 冒充已安装效果。

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

APPROVE 精确 head 4568866fb35c5f96e18249971ef2ee9ab718fbc0。未发现阻塞问题;历史测试风险和未覆盖的研究收益继续保留。此 COMMENTED 结论是作者自审记录,合并仍须当前 readiness 和既有用户授权。

English verdict: APPROVE 4568866fb35c5f96e18249971ef2ee9ab718fbc0. The existing native selection adapter now retains Research across normal restarts. Exact-head same-source packaged recovery and182 native tests pass; historical shared-target port failures remain unattributed. No execution authority or research-benefit claim is added.

@loopx-agent
loopx-agent merged commit ea57fee into main Oct 23, 2026
31 of 43 checks passed
@loopx-agent
loopx-agent deleted the codex/research-workbench-continuity-20261023 branch October 23, 2026 01:03
@loopx-agent

Copy link
Copy Markdown
Collaborator Author

Reviewer: actor_kind=model_agent; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max.

Post-merge audit — new native qualification finding

[P2] 合并后审计:原生验证仍有未归因失败。 本轮最初按开放 PR 的精确 head 开始评审,发布前 GitHub 已显示合并,故将新增的完整原生验证差异作为后续审计记录。Research 保存修复已被同一组原生用例证实,尚未定位为该解码分支的实现缺陷。

动机

受影响的是在桌面 App 中阅读某个 Goal 研究页的用户:正常退出后,希望重开仍回到同一阅读页面。

旧版本已保存 Goal、Agent 和 Todo,却未认可研究页的既有 view 值,重开时落回默认页。当前适配器补齐 research,沿原保存文件和新 loopback 端口恢复路径返回研究页。

同一套真实 URL 与物理文件用例在当前 head 五项通过;基线四项通过、仅研究页恢复断言失败。当前全量原生测试两次有同样三项失败,尚未完成无关性归因。

本 PR 不启动分析或模型,不创建研究记录,不迁移远端来源,也不宣称完成官方安装升级、跨平台或持续使用验收。

仍需区分当前 head 的原生端口占用失败与基线行为,并补足默认并发下的可复核资格;不能由单独通过的视图用例代替。

改动思路

原生适配器已拥有退出时捕获和启动时恢复;直接补齐已有 research 值比新增设置、IPC 或并行路由 owner 更小,且不产生执行权限。

本次交付边界仅为现有本机阅读位置的保存与恢复:复用版本 1 偏好和前端 view 词表,保留跨来源隔离与可选偏好失败回退。

继续使用退出时一次捕获和启动时读取的原有路径;目的 URL 由新的本机 origin 重建,仅带选择标识。未知值、安全来源与偏好读取失败保持原回退,浏览不会触发执行。

具体改动

完整审阅四个文件:workspace_location.rs 将原四个 view 白名单补为五个,并复用同一条 capture → 原子写入 → 独立读取 → 新端口 destination 测试;services.rs 与对基线运行 rustfmt 的结果逐字相同。README 增加已有恢复路径的 QA 说明,JPEG 的 EXIF 只有像素尺寸。最终选择适配器与作者已披露打包 QA 提交 edb6141 的字节一致,前端 router、原生 close/quit/launch 和 lifecycle 调用方与基线一致。旧版本已经丢弃的 view 不能在升级时被凭空恢复。

规格依据:apps/desktop/loopx-control-plane/README.md,精确版本 305bba7f4ea9471df6b86102f98c0aa096f6705d。以下为既有条款的本次评审映射标签:

  • READING-RETURN:implemented;Normal close/quit restores selected local Goal, view, Agent and Todo on a new loopback origin. 对应 LocalWorkspace::selections/capture/destination,由上述同一基线/head 用例验证。
  • SELECTION-ONLY:implemented;Persist selection identifiers, never raw URLs, credentials, prompts or report/session queries. 对应 LocalWorkspace::value/read/write/destination,由上述同一基线/head 用例验证。
  • SOURCE-FENCE:implemented;Foreign/boot pages cannot overwrite local selection; unsupported remote source returns local Manager. 对应 LocalWorkspace::capture/local_status,由上述同一基线/head 用例验证。
  • OPTIONAL-RECOVERY:implemented;Missing/corrupt/obsolete preferences do not block startup; unknown views fall back. 对应 read/LocalWorkspace::from_value/launch_destination,由上述同一基线/head 用例验证。

关键代码讲解

  • LocalWorkspace::selections: Accept existing research alongside four previous views。Unknown view defaults; invalid selection IDs cannot become paths。
  • LocalWorkspace::capture: Unchanged duplicate/foreign/remote guard。Boot and foreign pages preserve existing local preference。
  • LocalWorkspace::destination: Preserved Goal/Agent/Todo plus research。Never replay origin, credential, prompt or report query。

对主干的风险

同一份当前测试模块放到精确基线生产代码上,五项中四项通过,研究页恢复断言明确失败:新端口 URL 缺少 view=research;当前五项全过。真正的 URL、磁盘写读、秘密参数排除、foreign/remote/boot 和损坏偏好回退均被执行。fmt、Clippy 通过;标准 premerge 的4 direct、8 catalog、8 risk、1 public-boundary 自动项通过。二进制视觉 manual hold 保留,像素、元数据和来源已在本评审直接核对,不伪装成自动扫描通过。

但 cargo test --locked 在当前 head 两次均为179通过、3失败、12个 opt-in忽略;第一次用原构建目录,第二次用独立目录。第一项失败是 services_tests.rs:777 的 exited_native_lifetime_helper_drains_old_listener_before_recovery,在启动 status 服务前报告端口已被占用;另两项随后因同一 mutex 中毒而失败。基线在独立目录、以及第一次 head 使用的原目录中各跑一次,均182通过。12个 opt-in库测试及一个签名制品集成未运行,保持原边界。

本轮开始时尚无结论;评审过程中同 head 出现了通过自审,其完整正文已读取并保留。本评审补充的具体新风险是独立目录也出现相同失败,因此不重复其通过结论。服务与 fixture 源码未变只能排除直接修改,不能解释这组重复差异;早期失败说明也不能替代当前同条件归因。在默认并发、不删断言或缩减原负载的条件下,给出能区分当前 PR 回归与既有端口竞态的基线/head 证据;若确证独立故障,保留原失败轨迹并补足当前 head 的原生资格。

我的整体评价

交付判断为 justified_increment,局部阅读恢复有明确价值;user_experience=improved,但 long_horizon=not_yet_proven,当前原生服务资格尚未闭合。设计本身 proportionate,继续沿用本地版本1偏好和既有 view 词表,没有新增设置或 authority owner。本次审计要求后续核清当前验证缺口;不据此推翻既有合并或扩大研究功能与端口系统的修改范围。

直接目检了公开的原生 QA 截图:同一合成 Goal 的研究页被选中,空历程与不可分析状态清楚可见,已保存结论保持折叠;路由、布局和原生生命周期调用方与基线字节一致。

未重新启动打包窗口,未重验长历程排版、窄屏、模型或官方升级;本 PR 未修改这些呈现实现。

本轮完整阅读了 capability 提供的“恢复设计应有首个有用结果”建议:采用其中的真实入口、失败恢复与结果读回检查;其 RFC 分阶段背景不适用于本次已闭合的局部修复边界,不据此要求完成父路线图。上下文送达和结构核验不能证明记忆提升或模型采用。

English verdict: REQUEST_CHANGES — 4568866. The frozen native URL/disk oracle proves the Research fix (H5 pass; B4 pass/1 missing-view failure), but two full head runs fail the same occupied-endpoint/recovery set while two immutable-base runs pass. Post-merge audit: follow up this current qualification gap under the same default-concurrency workload. The PR was merged externally during this review; no Research implementation defect or service fix is claimed.

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