Repository navigation
Expose producing workspace in recovered replan settlement - #9277
Conversation
Signed-off-by: LoopX Agent <[email protected]>
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
从历史准入回执恢复直接重规划的操作者,需要在同一轮补齐写回并确认额度只扣一次。 在主检出里照抄旧恢复命令时,已有工作树校验会拒绝写回,CLI 说明没有给出补救参数。当前说明告诉操作者从产生交付的工作树执行,或者传入该工作树路径。 隔离的 peer Goal 先拒绝主检出,再使用带空格的独立 Git 工作树完成原轮写回与一个扣额。重放读回原收据,扣额仍为一次。 本切片保留原收到的身份、工作区校验和扣额逻辑,未引入新工作区或更改其他范围的恢复命令。
改动思路 / Approach
在写回视图复用同一个因果要求解析器,比新设工作区探测、在读阶段移动路径或再加一层命令组装更合适。执行与拒绝仍由 refresh-state 负责。 只增强来自原回执的直接重规划说明。保存的结算计划、写入命令和普通 File/SQLite 路径保持原样。 只读投影从已验证的原回执派生答复。当前分支仍要求准确绑定的原轮及有效的签名命令。这样调用者能直接走已支持的恢复路径,同时保留原有失败和执行权限。
具体改动 / Changes
净改动 2 文件、+55/-6。生产代码变化在 TypeScript 写回投影。Python 变更只增加历史回执、主检出拒绝及 linked worktree 成功的测试分支。 依照 已有恢复契约,retained_workspace 用原回执选择是否补充路径说明,original_settlement_identity 验证同一轮写回和单次扣额,non_required_parity 验证无工作区要求的普通路径。检查了实际当前主干三方合成。三个运行时校验与扣额相关文件在提案及合成中保持原 blob。
关键代码讲解
projectReplanView 仅在原签名计划与直接重规划回执对齐时追加说明,写回命令和后续扣额规则保持同一份计划。共享 resolveSettlementWorkspaceRequirement 继续区分明确无需工作区、历史留存要求及未知输入。test_captured_direct_replan_command_composes_semantic_writeback_once 验证主检出拒绝、可用工作树结算以及精确重放。
对主干的风险 / Risks
旧基线复现了工作区说明缺失。精确头的三个定向场景通过,普通 File 和 SQLite 分支也在基线各通过一次。独立增加的非 Git 目录反例通过,拒绝时无写回和扣额。快速预合并的五项直接检查与两项选中检查通过。语义词汇检查在组合运行中达到 120 秒上限,同一准确头单独执行通过。TypeScript 75 项定向测试通过。 TypeScript noEmit 通过。已核查只读输出、执行权限和默认分支。验证使用隔离的 File 与 SQLite 源码路径。历史回执由测试装入夹具,未改活动 Goal。较宽 Python 套件在 30 项通过后主动停止。本结论基于已完成的定向与必要检查。未验证已安装宿主和真实模型,未查询 CI。
我的整体评价 / Verdict
原轮无需重新准入便可找到合法路径、完成写回并重用回执,减少重复尝试。已有隔离与提交身份保留。该改动涉及 CLI 中一个恢复说明字段,没有修改界面布局或前端交互。 验证使用隔离的 File 与 SQLite 源码路径。历史回执由测试装入夹具,未改活动 Goal。较宽 Python 套件在 30 项通过后主动停止。本结论基于已完成的定向与必要检查。未验证已安装宿主和真实模型,未查询 CI。 这两处改动复用现有工作区类型和命令,支持当前提案的范围。
English verdict: APPROVE at d6167a1. The captured replan now reports the producing workspace when required. Verified the old missing guidance, exact File/SQLite behavior, foreign-workspace rejection, one-debit replay, type checking, and the local premerge checks with the timed-out check verified separately.
Problem
A captured direct replan can inherit workspace causality from a historical guard receipt. The writeback view gave the caller the settlement command but omitted the producing-workspace input. Running it from a primary checkout then failed before durable writeback for a peer Goal governed by independent worktree isolation.
Change
Read the original receipt through the shared workspace requirement resolver. When the applicable direct settlement verifies workspace causality, show how to run from the workspace that produced the delivery or supply
--delivery-workspace-path. The message explains when to use an independent Git worktree. The refresh command still binds the exact captured replan and relies onrefresh-stateto validate the workspace and follow the verified owed quota step.Validation
The fix reuses the current requirement owner. A broader refactor would increase the surface of signed command and capture handling for this projection change.