Repository navigation
Recover the first Goal confirmation and open its conversation - #9316
loopx-agent wants to merge 2 commits into
Conversation
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.2-sol · OpenAI · runtime_reported · xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
在新工作区向 LoopX 管家发出首个请求的使用者。 预览后 Agent 下线,基线的失败操作没有可重试的工作区 checkpoint。已创建的草稿卡也只显示「已创建」。 确认失败后续跑同一个操作,完成后从原草稿打开收据对应的首轮对话。
真实 Chat 服务先预览,再关闭合成 Agent,刷新后恢复 Agent 并重试原 proposal。 候选原 proposal 仅保存 workspace_validated,零 Goal。刷新后重试,同一 proposal 得到一个 Goal、一个 SQLite Todo、一个 managed Session 和一轮检查清单。点击卡片后按收据的地址打开,刷新仍读到同一答复。 独立复验使用本地合成回复和隔离工作区。实际模型质量、新用户理解及安装版部署仍待验证。
改动思路 / Approach
在资格检查前保存已验证工作区。完成卡通过校验过的收据目标走现有对话路径。 原 proposal 和原 Session 已拥有身份与恢复规则,复用即可验证同一请求与回复。 沿用原 Chat 操作状态机、SQLite Goal/Todo 及现有 managed Session reader。
具体改动 / Changes
7 个文件,+46/−21。 提交 9d451cadf1a581d4f4f2ebb49e806bf220999012,基线 f4c27a88b54e9f5daba0d282076328fb30b922ff。 验收依据
- 原确认可恢复(implemented)。候选原 proposal 仅保存 workspace_validated,零 Goal。刷新后重试,同一 proposal 得到一个 Goal、一个 SQLite Todo、一个 managed Session 和一轮检查清单。点击卡片后按收据的地址打开,刷新仍读到同一答复。
- GQ01 原会话读回(implemented)。按收据地址读回原答复,刷新仍读取同一 Markdown。
关键代码讲解
_apply_goal_create。先验证原工作区,再保存 workspace_validated 和检查 Agent 资格。 代码GoalDraftCard。仅在完成且有已验证 target 时提供原对话按钮。 代码ChannelTimeline。通过现有 timeline 回调传递原 Session 目标。 代码selectGoal。用已有 Goal、chat 和 managed key 更新视图与可刷新地址。 代码resolveManagedChatSession。从注册 Agent 的读取结果中精确匹配 Session。 代码
对主干的风险 / Risks
Agent 离线时确认被拒绝。旧基线也不产生 Goal,但没有 checkpoint。用于排错的无效 adapter 身份没有通过原 Session reader。 两端同样在预览后切断 Agent。只有候选在失败后留下可被原操作消费的 workspace_validated。 定向 HTTP 用例覆盖 unavailable gate、workspace 可用性和来源边界。打包 typed-actions 覆盖恢复提示。
语义与 CI 对齐
显式确认、原有资格与工作区验证继续生效。无验证 Session 的已有完成卡保留「已创建」。 23 项工作区 HTTP 验证通过,打包 goal-draft-live 与 typed-actions 通过。标准 premerge 结果为 passed,直接检查 6 项(失败 0),选中检查 5 项(失败 0)。
我的整体评价 / Verdict
同意这个提交。保留已完成的工作区验证,恢复后沿原操作完成并打开可刷新读回的首轮答复。 390 px 草稿卡把重试或打开首轮对话放在原操作位置。进入首轮后,Markdown 清单在消息正文中完整呈现。 视觉复验仅覆盖隔离工作区中合成的草稿与答复。
English verdict: APPROVE at 9d451cadf1a5. Endpoint loss retained the original workspace checkpoint. Retry created one Goal and Session, and the draft link reloaded the same recorded reply.
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.2-sol · OpenAI · runtime_reported · xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
首次创建 Goal 后已有任务,但 Agent 启动首轮失败、需要决定是否重试的使用者。 前一评审提交里已注册 Goal 与任务,Agent 启动失败。面板提示可以重试原操作,但缺少初始化尚未完成的明确状态。 首轮未启动时明确显示 Goal 尚未完成初始化,用同一提案重试且读回同一 Goal 和初始任务。
从空工作台创建有一个初始任务的 Goal,Codex 启动夹具退出,查看失败面板,再点重试原操作并读回原提案。 候选明确显示「Goal 初始化尚未完成」,也显示 Goal 和首个任务已保存。重试请求继续使用原 apply 地址,重试前后 Goal ID 与唯一任务 ID 相同。 首轮启动失败以退出的本地 Codex 夹具复现。源码与打包验证均连接真实 Chat 和本地状态,远端 CI 与真实 Codex 登录尚未核查。
增量从前一已评审提交复现提示缺失,范围集中在显示语义与重试验收。
改动思路 / Approach
在现有 goal_creation_retry 反馈中补回初始化状态。实测点击重试并通过同一 proposal 的 API 读取 Goal 和任务 IDs。 现有 action kind 和持久化 checkpoints 已区分部分创建与全完成,读原状态即可,新增工作流状态会重复判定。 增量对中英文提示和定向验收做改动。创建、存量检查点、原 Session 及任务写入仍走现有操作 owner。
具体改动 / Changes
8 个文件,+67/−22。 提交 08e952d7e61aa4669ce59a5b4fa316e4703ce659,基线 f4c27a88b54e9f5daba0d282076328fb30b922ff。 验收依据
- 报告首轮未启动(implemented)。Agent 仍不可用。重试后原提案继续没有 first_turn_started checkpoint,失败不会被误报成已开始。
- 重试保留原身份(implemented)。候选明确显示「Goal 初始化尚未完成」,也显示 Goal 和首个任务已保存。重试请求继续使用原 apply 地址,重试前后 Goal ID 与唯一任务 ID 相同。
关键代码讲解
actionReview.goal_creation_retry。按已有失败类型显示初始化未完成及原工作区重试。 代码isApplyResponse。抓取真实提交地址,重试复用相同 proposal 的 apply 地址。 代码readSteps。对照同一 Goal 和初始任务 ID,未启动不创建 first_turn_started。 代码_apply_goal_create。既有实现先保存已验证工作区再检查执行器,重试复用原操作。 代码
对主干的风险 / Risks
Agent 仍不可用。重试后原提案继续没有 first_turn_started checkpoint,失败不会被误报成已开始。 在前一已评审提交运行相同入口时,原生浏览器用例因缺少「Goal 初始化尚未完成」失败。候选的源码版和打包版均通过。 这是相对前一评审头 9d451ca 的增量。上一头评审
语义与 CI 对齐
创建、Todo 与首个会话的写入路径在增量中未改。上一头做过运行不可用、恢复至原对话和刷新原答复的独立验证。 初次 Goal 创建的失败与重试在候选打包和源码版均通过,打包 typed-actions 通过,23 项 HTTP 验证通过。标准 premerge 结果为 passed,直接检查 6 项(失败 0),选中检查 5 项(失败 0)。
我的整体评价 / Verdict
同意此提交。失败状态准确,原提案的重试会保留已保存的 Goal 与首个任务。 桌面失败面板显示尚未完成的初始化、已保存的 Goal 与任务和重试操作。390 px 的 typed-actions 夹具同时显示状态刷新失败,初始化提示与重试按钮仍可读,并可用键盘触发同一重试。 目检覆盖实际失败面板的桌面和 390 px 合成操作状态,未复验安装版。
English verdict: APPROVE at 08e952d. The failed first Turn reports incomplete setup, and retrying the same proposal preserves the original Goal and initial task without recording a started Turn.
User outcome
After confirming a Goal draft in the steward conversation, the owner can open the first Agent conversation directly from the card. If the endpoint disappears between preview and confirmation, the card offers a retry on the original request, including after a reload.
The action service records the already-verified workspace before checking endpoint availability. Retry checks the original workspace and Agent again. The dashboard reuses the receipt's validated session address and the existing conversation reader. Legacy receipts without a verified session retain their completed state.
Acceptance
Tested the packaged dashboard at
9d451cadf1with the real Chat backend and SQLite in a disposable project. A deterministic local Codex protocol fixture supplied a Markdown release checklist.All 23 workspace-selection HTTP tests, both packaged browser scenarios (Goal draft and typed actions), and the managed-session reader passed. The stock action-review smoke command omits the TypeScript import-extension option. The same compiler input with that option, its bundle and its assertions passed.
At
08e952d7e6, the fresh-install browser test passed against the real Chat service in both source and packaged builds. With the Agent unavailable, the drawer reports incomplete setup, retries the same proposal, and preserves the saved Goal and first task IDs. No first Turn is recorded. The packaged typed-actions scenario also passed.Visual evidence
The reference shows the completed draft with a disabled button. The candidate replaces it with an action that opens the verified conversation. Captures use synthetic project content.
Reference, desktop
Candidate, desktop
Reference, narrow
Candidate, narrow
Original reply, narrow