Repository navigation
feat(workspace): browse native container Goal history without copying execution state - #6821
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ry scope Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…eaders Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max
Post-merge audit — new actionable P2
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
维护者已将此精确 head 合入;这是合并后独立审计,不是重新打开或合并操作。原浏览器/原生来源实测发生在 7016f56c129d83386f10be03de914d9c8fc7ebbd,已核验当前合入 head 的整个前端树及 read/server/snapshot AST 完全相同,故失败反例仍适用;新增默认 bundle witness 检查与测试已另外复核。
动机
查看既有运行记录的用户,需要直接在 Goal 工作区阅读不同物理来源的同一 Goal 历史,并分清来源、记录范围和当前是否仍可读取。
原先容器中的记录没有现成的工作区阅读入口,容易靠手动搬运重建上下文;现在可从已准备好的来源入口切换阅读,成功路径已验证,但手机关闭导航时刷新失败仍会显示旧历史而不提示来源断开。
真实容器和原生 CLI 验证了两个来源各自的 92 条记录、关系、切换与重载;断开后的 API 正确拒绝且恢复后继续原来源,但错误只在隐藏侧栏,当前主页面缺少可见的失败反馈。
此 PR 限于既有记录的只读浏览;不创建执行 Goal,不启动或干预研究,不借用本地分析包,不宣称分析执行或安装后的完整产品验收。
剩余缺口是手机导航关闭时,来源断开后的刷新失败必须在当前主页面可见;完整研究分析与真实任务验收仍由原有产品工作项承担。
改动思路
保留原生 CLI 和 Explore 记录为唯一数据归属,用受限容器读取适配器接到现有工作区、分页和显示白名单;比复制执行状态或新建研究界面更合适。
当前切片是可用的来源隔离只读历史浏览;分析未绑定时明确不可用。需要在这条既有浏览路径补齐可见的断开与重试反馈,不扩大到执行研究。
阅读入口由 Agent 用既有容器和 Goal 上下文准备,用户打开链接即可;不需要用户重新输入已知标识、搬运记录或新增确认轮次。每个物理来源有自己的 loopback origin,页面和游标再绑定 source+Goal;这解决了两个物理来源恰好使用相同 Goal id 时的混淆。状态仍从来源的原生 CLI 读取,记录经过原 Explore 校验和共用显示白名单;显示来源目录没有成为新的执行注册表。
具体改动
完整 21 路径 +640/-27,包括三张合成画面、264 行容器 IO 适配器、共享白名单提取、现有工作区来源/历史/分析禁用路由及 Python/浏览器验证。依据不可变基线的 Goal workspace RFC:5.11/V11 的完整历史与来源恢复、2/V9 的无执行副作用、7/V6 的窄屏失败反馈、V12 的分析归属分别判断。作者当前 head 的桌面/手机及 before 图已逐张查看;它们是合成来源的 packaged 证据,不代表安装或真实研究验收。
关键代码讲解
ContainerSource.read固定完整容器 id、Goal 和原生 CLI,逐条校验 Explore 记录;没有从 HTTP 拼接 shell 或复制 Goal 执行状态。RuntimeWorkspaceHandler.do_GET先约束 loopback、Goal 和端点,再读取原来源;不同/后来新增的 Goal 被拒绝,写入方法 405,未绑定分析返回不可用。runtimeStatusSourceCatalog复用来源选择,目录只在本次来源中派生,原 local/SSH 存储与默认阅读分支保留。GoalOverview的新历史分支 为 runtime 只读来源打开历史;当前来源刷新错误却没有交给这个可见区域,这是下面的阻塞问题。
对主干的风险
[P2] 手机关闭导航后,来源断开与刷新失败没有出现在主页面。 实际构建下以 390px 加载 Fresh 来源的 92/92 条历史,关闭导航,停止自己创建的固定来源容器,再点击“刷新状态”:原生状态 API 正确返回 503,URL 和数据仍属于 Fresh,但唯一 .personal-status-source-error 位于隐藏侧栏,边界是 0×0;主页面仍显示正常 Goal 与完整历史且没有可见失败提示。打开导航后同一错误变为 275×64 可见。随后重启同一个来源并刷新,原来源数据恢复。问题不是保留历史本身,也没有证据支持来源泄漏;应在始终可见的页头或历史区域标明读取失败/陈旧状态并提供原来源重试。请补“已加载→关手机菜单→断开→刷新→主区域可见失败→恢复”回归,保留既有来源、Back 和分页断言。
独立验证包含当前 5 项 runtime HTTP Python、6 项既有 Explore HTTP、正常 packaged runtime 与既有 source-switch 场景、类型检查、mypy 17 文件、变更 Python Ruff、正常 bundle;原精确 head 的标准 premerge 六项直接和 19 项选中检查通过;当前合入 head 另跑正常 bundle 与 runtime/bundle 27 项通过(一个刻意重复 ZIP fixture 的 UserWarning 保留)。另用真实 Docker、来源原生 CLI 与 Ego 验证两来源同 Goal 各自 92 记录/2 关系、切换、重载、Back/Forward、390px 无横溢及断开恢复;80 次浏览器请求没有写操作,完整浏览后 14 个来源 fixture 文件逐字节不变。后来只为反例而主动在自己的容器新建合成 sibling Goal,旧 reader 仍拒绝该新 Goal;四种写方法、非本机 Origin 和分析未绑定也实际拒绝。
更广的必需 Core 两断言仍失败(37/39),checkpoint-retention Ruff 仍失败;我在不可变 target 与两个 head 运行相同命令,Core 完整归一化输出一致,Ruff 输出字节相同,相关因果源码未变。作者的 non-passing quality 限制保留,不能将局部验证称为全部 required green;没有查询 CI。初始 CWD、镜像探测和过严“错误后必须清空所有历史”检查属于评审脚手架/判断修正,不是产品失败;最终 P2 由真实失败响应与可见性反例支持。
我的整体评价
REQUEST_CHANGES,精确 head ad5518f7337489c9e7de7850687b07654d1ffbe5。原生归属、只读、来源隔离和现有展示复用有当前证据,属于有用的阶段交付;保留这个边界,不需要扩大到研究执行或复制状态。请由现有来源浏览工作项在后续修复中补齐可见的失败与恢复反馈;已提出的 #6823 属于该方向的后续提案,本审计没有认证它已修复手机可见性。完整分析仍由现有产品工作项负责,现有 Core/Ruff/quality 合并限制继续保留。
English verdict: REQUEST_CHANGES — ad5518f. At 390px, a real native source fails with HTTP503 after history has loaded, but the only refresh error is inside the hidden sidebar while the main viewport still shows complete old history. Surface the failure/staleness and retry in the visible workspace, add the closed-menu disconnect/recovery case, and preserve the existing source/authority boundaries and unrelated merge holds.
| </section> : null} | ||
| </div> | ||
| {!readOnly ? <GoalResearchHistory key={goal.goalId} goalId={goal.goalId} active={active} zh={locale === "zh-CN"} refreshRevision={historyRefreshRevision}/> : null} | ||
| {!readOnly || readSourceUrl ? <GoalResearchHistory key={goal.goalId} goalId={goal.goalId} readSourceUrl={readSourceUrl} active={active} zh={locale === "zh-CN"} refreshRevision={historyRefreshRevision}/> : null} |
There was a problem hiding this comment.
[P2] 在手机主页面显示当前来源的刷新失败
390px,关闭 Goal 导航,先加载 Fresh 的完整 92/92 历史,再断开该实际来源并点击刷新状态。 API 已返回503,但主页面继续显示正常 Goal 和92/92完整历史;唯一失败提示0x0不可见,必须打开隐藏导航才知道刷新失败。没有发现来源替换;缺口是失败与陈旧状态不可见。
Propagate active runtime source read/refresh failure into the always-visible workspace header or history region, retaining old rows only with explicit stale/unavailable feedback and a usable retry. Add a 390px closed-navigation disconnect/recover regression.
Lifecycle: GitHub records maintainer huangruiteng merged this PR at 2026-10-18T12:38:10Z, head
ad5518f7337489c9e7de7850687b07654d1ffbe5, into5faaa975176c1ef1810208928b573571ca3756c1. Subsequent source-local question/analysis-selection and relative-entry corrections are proposed in #6823; they are not part of this merged head.Existing container Goals could only be inspected through copied fixtures or generic status readers; the read-only workspace hid their research history. This adds an owner-prepared, pinned-container reader that opens the same Goal workspace with native work state, complete Explore history and explicit relationships. Separate physical readers retain separate origins even when their Goal ids coincide.
The existing source selector offers the prepared runtimes. Reading, refresh and recovery do not create/connect/rebind execution Goals or launch models/benchmarks. Default startup reuses the existing bundle witness/source-freshness validator and fails before reading a source when assets are stale. Source failures remain visible without replacement; history uses the existing strict Explore validator, display whitelist and snapshot pagination. Runtime-only ordering stays in the browser instead of calling a remote preference writer. Existing local/SSH behavior retains its defaults.
Python owns only container subprocess/HTTP I/O; the native CLI and Explore owner retain semantics, and the existing TypeScript workspace owns routing/rendering. This is a usable read slice: source-specific deep-analysis pack binding remains open and is explicitly unavailable, with no borrowed analysis or benefit claims.
Validation and holds
Pathimport. These were author-side required holds, not optional waivers. This historical record does not assert a passing qualification.Visual evidence
Packaged UI; synthetic native source records; not an installed App. After captures are from this proposal's source tree, committed as
ad5518f7337489c9e7de7850687b07654d1ffbe5. The before capture uses the prior packaged UI at11587e661b429f9465c7d908a9c9caf277aeb0b4with the same synthetic reader. Actual private runtime screenshots are excluded. The test command isnpm run --prefix apps/presentation/dashboard smoke:runtime-source-workspace.Before: the read-only source omits research history.
After: prepared runtime selection and complete research history, with source-specific analysis availability.
Narrow viewport: