feat(goals): add reversible stop and resume - #3350
Conversation
0c5dce2 to
98c3580
Compare
huangruiteng
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
这个 PR 解决的是 Goal 数量增长后的真实操作问题:不活跃 Goal 不能继续占据主列表和自动调度,但又不能用完成/删除来伪造生命周期。新增可逆 stop/resume,既让 owner 能整理工作区,也保留 Todo、历史、证据与后续恢复能力,和用户提出的产品需求一致。
改动思路
后端用 typed GoalActivationState(active|stopped) 与 versioned activation record 表达状态;CLI 和 Chat 都走 preview/explicit execute/readback;source registry 写入后同步 global registry,失败时显式暴露 partial write。quota 在 stopped 状态返回 paused,attention queue 排除 stopped Goal。前端按 activation state 拆成 Active Goals 与默认折叠的「已停止」区,stop/resume 只创建 typed action preview,仍需 owner 确认。
具体改动
- 完整阅读了 25 个 changed files,并核对 activation service、global sync/readback、quota/attention projection、Chat action、sidebar/home mapping、docs、browser fixture 和生成 bundle 的调用链。
- 正向路径闭合:旧 registry 默认 active;stop/resume 可逆;preview 零写入;执行同时验证 source/global;stopped Goal 不再进入自动 attention/quota 运行面,但其 run history/Todo/evidence 未删除;resume 只恢复 eligibility,不绕过 quota、Gate 或 Todo。
- 交互符合已批准首屏:主目录只显示 active 项,stopped 项在折叠区保留,行尾 pause/restore 进入确认抽屉;桌面与 mobile、reduced-motion 都有 browser smoke 覆盖。没有发现直接写控制面、默认行为静默放宽、私有路径/凭据或删除历史的 blocker。
- 本地验证:focused pytest 5 passed;changed-surface Ruff passed;
npm run buildpassed;npm run smoke:personal-workspacepassed;本地重新渲染并目视检查 lifecycle directory screenshot。远端 9 个 checks 全部 success/skip,无 pending。
对主干的风险
主要风险是双 registry 写入中途失败;实现没有假装原子跨文件事务,而是预检 target writability、锁定 source、执行规范 sync、双端 readback,并在失败时返回 partial_write 与明确修复命令,这个取舍对本地控制面是可恢复且诚实的。停止只影响后续自动 Turn,不删除状态、不冒充完成,风险边界清楚。未发现需要阻止合并的 correctness、authority、privacy 或 presentation 问题。
我的整体评价
通过。这个 batch 把状态模型、调度语义、可恢复写入和前端信息架构放在一个完整、可回滚的 PR 中,scope 合理;测试既覆盖 typed lifecycle,也覆盖真实浏览器交互。由于 PR 作者与当前 GitHub 身份相同,GitHub 不允许 formal self-approval,所以这里发布等价的 owner-head approval conclusion;仓库要求的独立非作者 approval 仍需由另一 reviewer 提交。
English verdict: Approve. The exact head provides a coherent, reversible Goal activation lifecycle across typed registry state, quota/attention behavior, verified source/global sync, and an owner-confirmed Active/Stopped UI. Focused Python checks, Ruff, production builds, browser smoke, visual inspection, and all remote checks passed; no merge-blocking correctness, authority, privacy, or first-screen issue was found. GitHub blocks formal self-approval, so an independent non-author approval is still required by repository policy.
Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
98c3580 to
6d12d26
Compare
Exact-head refine review —
|
Summary
stopremove the Goal from active attention and project zero effective quota, so the next scheduler packet stops recurring host automation without deleting Todo, evidence, history, or configured quotaquota.compute=0, while preserving typed causes and different resume authority (goal resumeversus positive quota update)Refine decisions
quota set > 0cannot reactivate an owner-stopped Goalquota should-runpacket instructs Codex App or another scheduler owner to pause/delete the recurring heartbeatValidation
git range-diff: the two original commits remain patch-equivalent after rebase onto currentorigin/main3572 passed, 10 skipped28 passednpm run smoke:personal-workspace: passedloopx canary premerge --from-git-diff --goal-id loopx-meta: 18/18 selected checks passed, 0 failures, 0 warnings, 0 manual holdscqr_bdabb4cd5e21a19fa344The owner-approved first-screen presentation is unchanged by the refine commit. No private state, credentials, local paths, raw benchmark evidence, or generated browser artifacts are included.