Repository navigation
fix(planning): retain Agent-owned overall requirements from the first plan - #8193
Conversation
…plan Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
使用现有首次规划入口的 Agent,需要在局部任务完成后继续追踪尚未满足的总体要求。 旧 ready 交接只核验任务存在与可执行性,未声明总体要求或未关联实际任务也会通过;当前先由 Agent 声明和关联,再从同一权威状态读回后交接。 File/SQLite 的公开 CLI 完成声明、实际任务写入、关联、读回与重放;缺声明或缺关联时拒绝 ready,合法关联后恢复,真实 blocker 仍可直接返回。 真实 Agent 能否正确提炼并持续采用要求、进而改善后续成果与完整成本,尚无本轮模型实验的因果证据。 本次证明结构、身份和恢复边界,不证明真实模型理解、持续采用、已运行满预算或长程成本净收益,也不授予合并、安装或付费运行权限。
改动思路 / Approach
要求与工作关联复用现有 TypeScript owner,Python 只组装规划入口,benchmark 只校验读回;无需第二份状态或额外模型阶段。 当前 PR 交付共享首次规划声明、原生工作关联投影和交接校验;独立可执行检查、根 Goal 完成与模型采用仍由各自既有 owner 决定。 原始意图、来源与关联由 Agent 在同一次既有规划中准备;系统只派生读回并核验真实 id。声明不会配置或执行独立检查,也不会创建第二个状态 owner;原 Stop、预算和等待条件继续生效。
具体改动 / Changes
本轮审阅精确 head 529bcea9246e81e91c26820f84eec076addde523 的完整 diff:12 个文件,+236/-10;共享入口、TypeScript 权威投影、benchmark 交接及回归共同构成此切片。 规格基准是修改前的 docs/reference/goal-acceptance-observations.md,spec_revision c6c328d50b456c3dbb88de7021414c1921b69174;下列行地址对应原文已有边界,不以本 PR 新增说明自证:
- L78-L89:implemented;复用原声明、来源、CAS/原操作恢复与容量边界,以真实 CLI、owner 与包内读回核验。
- L101-L110:implemented;复用原声明、来源、CAS/原操作恢复与容量边界,以真实 CLI、owner 与包内读回核验。
- L134-L147:implemented;复用原声明、来源、CAS/原操作恢复与容量边界,以真实 CLI、owner 与包内读回核验。
关键代码讲解
-
goal_planner_contract: 把来源、累计要求、先声明再关联、原操作重试及 Stop 约束放在现有共享 planner;生成技能也引导到这条路径。 -
todo_authoring_steps: 在原规划 checkpoint 提供完整路由的 inspect/refine 命令,再关联实际写入或复用的任务并读回;不增加 setup Todo 或模型调用。 -
outcomePlanningReadback: 从现有权威投影筛选当前生命周期和指定 Agent 的成果,派生 outcome 与工作 id 集合;没有另一份可漂移的状态。 -
build_task_planning_packet: 把当前声明、provider revision 与派生读回交付给公开规划入口,保留原输入摘要、完整前沿、等待条件和调用方执行归属。 -
validate_plan_readback: 先保留真实任务存在、可执行与归属检查,再只对 ready 要求声明及关联;真实 blocked 仍不需要伪造声明。
对主干的风险 / Risks
FAIL 保留:五个 scheduler 用例缺少预期 should_run、四个 acceptance CLI 用例缺少预期投影字段,另一个 Harbor 850 秒 fixture 未抛预期异常。同一冻结输入、相同准备和命令在不可变 base/head 得到同十项失败,完整诊断仅替换临时路径、checkout 模块前缀及进程地址后逐字相同;相关 scheduler、Harbor 与 quota CLI 投影没有 diff。新要求 owner/交接已由独立正反例覆盖。因而未把这些失败归咎于本 PR,也没有把它们改记为通过。
PASS:冻结的 File/SQLite 公开 CLI fixture 在 base 6 失败/6 通过,在 head 12 通过;覆盖缺声明、缺关联、原操作重放、42 项前沿、新任务拒绝及显式关联恢复。真实独立 PostgreSQL 的 owner/store 套件 502 项通过且无跳过;这不意味着本机 CLI 能直接替代服务侧 PG factory。现有规划/交接套件 108 通过、6 失败;CLI/安装器/companion 套件 144 通过、4 失败。
28 项规划与展示读回测试在新构建 wheel 中通过,1814 个 Python/TS 文件与本 head 逐字匹配,1165 个实际导入模块均来自已安装 wheel;生成技能在隔离测试 home 中实际写入并核对新指导。fixture 仅把 TS 定位改为已安装 package,未借用 source。首次未准备 frontend bundle 和一次不支持的固定 host 参数错误保留,修正准备后未改断言。完整 Ruff、mypy 17 文件、TS typecheck、双语及 diff PASS;standard 的 6 direct、10 catalog、8 risk、1 boundary 均通过。strict quality cqr_24a027355cff480e4028 仍为 FAIL/invalid,不能豁免十项必需检查。
语义与 CI 对齐
这是明确披露的首次规划语义变化:原可通过的未声明 ready 现在拒绝;真实 blocked、seeded/plain/native 路径和可选独立检查保持原权威。新增读回是既有词汇和状态的派生投影,复制任务文本不能逃避工作关联。 本轮没有查询、轮询或等待 GitHub CI;本地通过项、失败项与未验证项分开保留。
我的整体评价 / Verdict
没有发现当前 head 引入的阻塞缺陷。长程维度 improved:要求、来源和真实工作关联能保留并在恢复后继续使用;用户体验 improved:Agent 在同一次规划准备已知事实,无额外人工确认。机械结构持久化仍不是模型理解或成果质量证明。代码 APPROVE 与 strict quality FAIL 分别记录;当前 main 冲突、十项必需失败和人工维护者审查 hold 均未解除,冲突处理后的新 head 必须重新评审。
已检查现有 Goal Overview 的要求展示、来源/工作链接、刷新和错误恢复,以及 CLI/Markdown companion;本 diff 不改变其渲染布局或编辑控件。 已安装 App 的采用、真实模型理解与持续采用、完整长期效果及成本收益未验证。 本轮不安装实际 App,也不合并。
English verdict: APPROVE for 529bcea9246e81e91c26820f84eec076addde523; required pre-existing failures, strict quality hold and main conflict remain; re-review any changed head.
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; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
使用 /loopx 或 todo plan 首次规划的 Agent,需要让局部任务服务于原始请求的总体要求。旧 ready 交接可以在真实 Todo 存在、却没有原请求的来源及工作关联时放行;当前从原生状态读回同一 Agent 的要求与实际 Todo 关联后才返回 ready。已验证的变化是要求能持久化、重放,并随同一工作继续读取;这不证明模型正确理解或最终成果改善。
本轮不改变最大时限、Stop、执行预算、独立检查、自然结束或实际模型运行,也不包含合并与安装版推广。真实模型的持续采用、完整语义覆盖及效果与总成本比较仍未验证。首次规划的结构性约束是可独立使用的交付边界;后续任务仍必须进入原有执行 guard,不能把规划成功记成任务完成。
改动思路 / Approach
要求沿用现有 outcome owner,新增读回由同一权威投影派生;Python 继续负责组装和调用,benchmark 只核验结构。当前 PR 的边界是首次规划中的来源声明、真实工作关联与 ready 交接,不增加额外模型阶段、平行状态或 feature switch。
保留现状无法识别“任务存在,但总体要求从未保存”的交接。只增加一句提示可以提醒 Agent,却不能核验实际持久化和工作关联;另建规划日志则会增加同步及恢复责任。当前方案将声明留给 Agent,将来源、累计要求、生命周期、CAS 与重放留给已有 owner,是与本问题相称的最小完整边界。复用创建时已经确认的要求尤其必要:已有完整标准时直接关联、读回,不要求重复声明或让用户重新输入已知内容。
| 场景 | 当前结果 | 权限与停止边界 |
|---|---|---|
| 只有真实任务,尚未声明总体要求 | planned ready 拒绝 | 不启动任务执行 |
| 同 Goal 中只有另一 Agent 的声明,或新任务尚未关联 | 仍拒绝 ready | 不从同容器推导所有权 |
| 当前 Agent 已有要求且关联实际工作 | ready;重复读取不改声明 | 后续执行仍走既有 guard |
| 实际阻塞结果 | 引用原 blocker,无需伪造要求 | 原等待、Stop 与预算继续有效 |
这张表概括源码与下述执行结果,没有将提示出现当作模型采用。普通 /loopx/todo plan 的指导与 benchmark ready 的机器检查分别存在;本 PR 没有把所有 todo add 都变成新的准入门。
具体改动 / Changes
独立审阅的是 9603041512a51efeda3d3d5dec2fbe8d41903801 相对不可变 base 3a0c9608cc068cebcdeadf45217be8b5e4196341 的完整 13 文件 diff(+311/-11)。先前绑定 529bcea9246e81e91c26820f84eec076addde523 的结论没有沿用到新 head。此次重新检查了 main 集成后的创建标准复用、1000 个补充平面字符的完整保留、当前 owner/调用方及整个交接路径。
规格依据是修改前的 docs/reference/goal-acceptance-observations.md,spec_revision 3a0c9608cc068cebcdeadf45217be8b5e4196341。以下标签对应原文段落要求,不用本 PR 新增文字自证:
- creation-retention:已实现;复用已确认的创建标准,缺少 Agent 时仍拒绝,保留原来源、操作恢复及 Stop。
- cumulative-outcome-owner:已实现;沿用累计要求与真实工作关系,Agent 自查不成为独立验收或根 Goal 完成证明。
- canonical-cas-recovery:已实现;实际 CLI 覆盖原操作重放、失效 revision 拒绝及关联后的恢复,不为 unchanged 要求追加写入。
- requirement-capacity:已实现;保留既有 2000 UTF-16 单元及两个 131072 字节总预算;创建后的 1000 个 emoji 原文完整进入首次规划,未裁剪或扩大预算。
关键代码如下,均对应本次 head:
goal_planner_contract在同一次首次规划中要求读取原意图、复用已有标准、只补缺失要求,再关联并读回。新增指导保留开放目标、独立检查可选、原操作恢复和真实停止条件;生成技能通过既有安装路径使用同一规则。todo_authoring_steps给空前沿与已有前沿提供完整路由的 inspect/refine 命令,并在现有任务读回步骤核对要求及工作关系,没有新增 setup Todo。outcomePlanningReadback从现有规范投影派生当前生命周期、指定 Agent 的 outcome 与 Todo id;inspectGoalAcceptance复用同一 head。这个布尔值只表达结构性声明存在,不代表内容正确或验收通过。build_task_planning_packet保留完整前沿和调用方执行责任,只交付公开的要求投影与 provider revision,不把私有检查命令放入规划包。validate_plan_readback先核实际 Todo、可执行性与归属,再对 ready 核要求及实际关联。worker 仅在 plan 阶段消费该检查;seeded、plain/native 与任务执行阶段保持原 owner。
| 独立验证 | 当前结果 |
|---|---|
| 公开规划与 Goal 创建 File/SQLite | PASS,40 项;包括已有创建标准的只读复用及完整 Unicode |
| benchmark task-entry 模块 | 46 PASS、5 FAIL、47 个可选 Harbor SKIP;真实合成 host 的缺声明拒绝、停止 Goal 拒绝及规划恢复通过 |
| 生成技能、安装器与首次入口 | 174 PASS、1 FAIL、2 个可选原生 PowerShell SKIP |
| typed outcome/acceptance/capacity/history | 147 PASS,另 25 个可选 PostgreSQL 变体在该次调用中 SKIP |
| 真实隔离 PostgreSQL 16.15 | store 389 PASS、service 11 PASS,合格运行均零失败、零跳过;包含新规范规划读回 |
| 同输入 base/head 的真实 File/SQLite CLI | base 对缺声明、另一 Agent 声明、新未关联工作均放行;head 均拒绝,合法关联后恢复。原操作重放、stale CAS、累计要求及读回无额外事件保持 |
| 新构建普通 wheel | PASS;六个变更的 LoopX 生产文件与 source 逐字匹配,隔离安装后的 File/SQLite 声明、关联、inspect 与 plan 路径通过 |
| 静态与标准 premerge | 仓库 CI 范围 Ruff、mypy 17 文件、TS typecheck、双语/diff/语义检查通过;6 direct、10 catalog、8 risk 与 public-boundary 机械检查通过,整体门禁仍保留 |
对主干的风险 / Risks
这是明确披露的首次规划语义变化:以前可接受的“未声明或未关联的 planned ready”现在拒绝。Agent 应在原规划调用中准备这些已知事实,已有标准可直接复用;不会要求多一次模型调用或人工确认。指令内容和规划包因此增长,未把结构性保真称作延迟、token 或完整成本收益。独立检查依然可选,最大时限仍是上限。
六个 required fixture 失败保持 FAIL:五项直接从 compact quota envelope 顶层读取 should_run;一项 host-selection 期望缺少 main 已有的 Antigravity App。相同选中命令在不可变 base/head 均得到这六项失败;仅归一化临时环境展示、临时路径及已确认字节相同函数的行号偏移,完整失败正文相同,相关失败函数也逐字相同。前者在调用 planner 之前失败,后者读取未改动的 host 清单。当前要求 owner/交接有上述独立通过证据,因此不把它们归因于本 PR;strict quality 仍为 FAIL/invalid,既有必需检查与合并门禁没有豁免。
额外扩大到整个 loopx 根目录的 Ruff 检查还有四项未改路径诊断;同一命令的 base/head 完整输出相同,仓库声明的 CI lint 范围则通过。原 main 的未使用测试绑定在本 PR 中删除,调用仍保留。早期独立验证脚本的导入及断言边界准备错误保留为无资格尝试;服务验证首次漏配可选环境、随后复用已旋转临时数据库的失败也没有改记通过,最终使用两个全新隔离数据库完成 11 项。没有修改产品源码、删除有效断言或扩大阈值来取得通过。
本轮没有查询、轮询或等待 GitHub CI。standard premerge 的机械通过不等于完整合并资格;strict quality 和 benchmark 人工审查仍是独立 hold。未执行真实模型、付费实验、在线外发或安装版切换。
我的整体评价 / Verdict
没有发现当前完整 PR 引入的阻塞缺陷。代码结论 APPROVE,作为首次规划声明与真实工作关联的有用切片;它不替代任务执行、独立验收或根 Goal 的自然结束。要求沿用现有 outcome owner,新增读回由同一权威投影派生;Python 继续负责组装和调用,benchmark 只核验结构。当前 PR 的边界是首次规划中的来源声明、真实工作关联与 ready 交接,不增加额外模型阶段、平行状态或 feature switch。
长程方面,在结构性保留、恢复与后续可读回的有限维度改善;用户流程复用已确认内容,未增加必需的人工作答轮次。已检查现有 Goal Overview、CLI 与生成技能的消费路径;本 diff 不修改渲染组件、布局或编辑控件。安装版采用、原生 PowerShell、可选 Harbor 全矩阵和真实模型效果尚未独立验证。已验证的是当前源码及普通 wheel 的边界,真实模型持续采用与效果/完整成本研究仍属后续资格。
English verdict: APPROVE for 9603041512a51efeda3d3d5dec2fbe8d41903801. Independent real CLI, isolated PostgreSQL and wheel checks establish the changed invariants. Six unchanged baseline fixture failures, strict quality and maintainer merge holds remain; model adoption and outcome benefit are unqualified.
Reuse the narrow fixture cleanup already proposed in #8193 so required lint can qualify the research proposal. The committed operation and subsequent injected timeout retain their order. Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…tion (#8174) * feat(research): preserve selection when importing native usage versions Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * test(research): bind usage lineage to registered captures Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> * test: retain lost-response injection without unused assignment Reuse the narrow fixture cleanup already proposed in #8193 so required lint can qualify the research proposal. The committed operation and subsequent injected timeout retain their order. Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --------- Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Completing a local Todo can leave the original request unmet when first planning never records its overall requirements. The existing first-planning invocation now asks the Agent to retain source-grounded requirements through the outcome owner, link its actual work and read the canonical result back. The benchmark caller validates that readback; it does not author semantic requirements.
/loopx,todo planand generated skills share the same rule, without an extra model call, preparation Todo, feature switch or parallel state owner.3a0c9608: reuse owner-approved Goal creation completion criteria and add only missing sourced requirements. Preserve the existing 2,000 UTF-16-unit requirement limit, cumulative outcomes, CAS/replay, Goal lifetime and Stop boundaries.loopx-plannedcannot return ready from a fabricated Todo, another Agent's declaration or an unlinked actual Todo. Actual blocked results still reference their blocker without inventing requirements. A maximum timeout is not a minimum work commitment; independent executable checks remain optional.Follow-up head
a4e723b5ca156240e169cf50a40c5c34cc93aaa8removes eight redundant Markdowncommand/source:labels so the added planning obligations fit the existing output budget. Ordered steps, purposes, commands, source references, identity, authorization and stop conditions are unchanged. The same real CLI fixtures on the integration base measure 3458→3330 characters (crowded: 3459→3331), with exact remaining-text parity and no typed JSON change apart from the rendered message and its derived byte count. Legacy and compact semantic checks both reject a missing complete-readback clause or a changed Todo selector. Parent validation: 258 tests passed, 1 skipped, and the previously documented unrelated host-selection expectation failed; changed-file Ruff, diff hygiene and the staged bilingual check passed. No ceiling was raised. Native Windows success and remote CI on this new head are still pending; the 3488-character Windows baseline failure is retained rather than relabeled as passed.Validation on head
9603041512a51efeda3d3d5dec2fbe8d41903801:3a0c9608.should_runlookup against the compact quota envelope. The same failure is independently reproduced on unchanged main. Linux task-entry validation with native dependencies completed: 92 passed and 6 failed. Five are the same compact-quota fixture mismatch; the sixth is the existing 850-second Harbor fixture expecting the retired execution reserve. Neither production path is changed here; integration must reconcile these fixture expectations rather than weaken execution/readback guards.No UI controls changed. Existing Goal creation/Overview and public CLI remain the requirement editors and readback surfaces. This PR does not change duration allocation, a runner's execution clock, current experiment state or outcome scoring. Independent exact-head review and maintainer merge authority remain required.