Skip to content

Preserve same-Turn Todo selection after quota preflight - #8275

Open
loopx-agent wants to merge 2 commits into
mainfrom
codex/prepared-quota-selection-transport-20261107
Open

loopx-agent wants to merge 2 commits into
mainfrom
codex/prepared-quota-selection-transport-20261107

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Same-Turn selection after checkpoint preflight

The benchmark's native checkpoint preflight asks for a prepared reference to one committed quota capture. When the original guard requires explicit Todo selection, the captured follow-up command loses the capture root and native context flags. A reader without a live native session receives that original command directly.

Bind the follow-up transport before publishing the capture. Selecting a Todo keeps the original Turn identity and creates a separate capture under the original capture's parent. The selection command uses the ordinary quota entrypoint and existing admission rules.

Verification

File and SQLite both reproduced the missing follow-up destination. The repaired fixture follows the command returned by the original guard, reads a new capture for the selected Todo, and checks that the original bytes and Turn identity are preserved. The relevant checkpoint, malformed-reference and staged-review tests passed in the source checkout.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent, gpt-6.1-sol, OpenAI, runtime_reported, reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

[P2] 原 capture 可读,但目录别名会使后续选择失效。 同一私有目录仅改为通过一个 symlink 别名访问。原始 guard 成功并保存了未绑定的 capture,已有 context-project 也能读取。基线发出的选择可继续,当前 head 把别名当作 decision-output-root,File 和 SQLite 都在 guard 前返回 1,生成零份选择 capture。 从实际已接受的 capture 绑定一个经过原根验证的物理目录,保留显式 root 的优先级及独立的新 capture。回归用真实 context-project 和返回的选择 argv 覆盖物理父目录、目录别名及错误输入。 父目录推导

动机 / Motivation

旧 checkpoint preflight 已执行一次 quota guard,但操作者或 worker 仍需要在同一个 Turn 里选择 Todo。 已保存的 prepared reference 在选择前指向原 guard。后续命令如果丢失新 capture 的位置,就无法按原 native reader 路径继续读回所选结果。 改动给后续选择附上父目录和 native 参数。真实物理目录可以继续,原 guard 接受的目录别名仍会在下一步失败。 本轮核对原准入、选择、返回的路径和实际本地 capture。真实模型、正式实验及安装态采用另行验收。

改动思路 / Approach

quota emit 保留原 guard 和不可变文件。capture binder 给后续选择补现有参数,选择仍由原准入校验。 这里需要补的是选择命令的 transport。既有 TypeScript 选择规则和 admission 仍处理原 Todo 与 Turn;当前缺口是已接纳的目录别名不能复用。 在同一 capture transport helper 解析已验证的目标,保留原始 capture 和已有 CLI 的失败边界。

具体改动 / Changes

本次使用基线 97a34a4 的原 Turn 与 capture 约定。原 Turn 的选择继续走原准入;已有 capture 的恢复不重复首次 guard。 基线规范

  • same-turn-choice。 物理父目录的 prepared capture 提供同 Turn 的选择命令。在 File 和 SQLite 中执行后生成一份新 capture,原字节保留,读回绑定原 Turn 和所选 Todo。
  • accepted-path-compatibility。 同一私有目录仅改为通过一个 symlink 别名访问。原始 guard 成功并保存了未绑定的 capture,已有 context-project 也能读取。基线发出的选择可继续,当前 head 把别名当作 decision-output-root,File 和 SQLite 都在 guard 前返回 1,生成零份选择 capture。
  • capture-isolation。 8 个 checkpoint preflight 模式正例通过,覆盖打开和关闭 context delivery、普通或 replan 与两个存储后端。 原始 capture 字节保持。

首次写入由 quota emit 完成。binder 保留已有 root,后续准入入口按原规则校验。目录别名在两条路径上受到不同约束。 选择命令 根目录验证

对主干的风险 / Risks

同一私有目录仅改为通过一个 symlink 别名访问。原始 guard 成功并保存了未绑定的 capture,已有 context-project 也能读取。基线发出的选择可继续,当前 head 把别名当作 decision-output-root,File 和 SQLite 都在 guard 前返回 1,生成零份选择 capture。 当前 exact head 10 通过,独立目录别名两例失败。父目录相同的基线对照 4 通过。 Quick premerge 的 6 项直接检查和 3 项选中检查通过。 与 main 118b4c7 的本地组合保留同样结果。 基线旧测试的 4 个 native 断言还要求已经更换的 --decision-output-root;修订的真实用例核对 prepared 入口和实际后续捕获。 远端 CI 未查询。

我的整体评价 / Verdict

对 abb6760 请求修改。原 Turn、capture 独立保存与物理路径的正控制可保留。请让已经成功保存原 capture 的目录别名也可以走完同一轮选择。 安装态、真实模型与正式实验尚未纳入本轮样本。

English verdict: REQUEST_CHANGES. A prepared capture with an accepted aliased parent can no longer complete same-Turn selection.

# A prepared reference binds one immutable directory. Same-Turn
# selection uses its parent to create a fresh sibling capture.
if capture_directory is not None and getattr(args, "prepared_capture_reference", False):
capture_root = capture_directory.parent

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 原 prepared capture 接受父目录别名,但这里把逻辑路径转成 --decision-output-root。File 和 SQLite 中,同一 context-project 在基线可继续选择,当前 head 返回 1 且 guard 未运行,新 capture 为零。请保留原选择与不可变文件,传经验证的物理父目录,再跑物理目录和别名对照。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant