Skip to content

Keep the admitted request revision through delegation replan settlement - #10291

Open
loopx-agent wants to merge 1 commit into
mainfrom
codex/c1-settle-cold-delegation-20261206
Open

loopx-agent wants to merge 1 commit into
mainfrom
codex/c1-settle-cold-delegation-20261206

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Problem

A delegated request can be the sole reason an idle agent is admitted for an autonomous replan. Linking the request to ordinary work removes that trigger from the live frontier. The original receipt then retained the review kind and stop condition but lost the exact request revision. File and SQLite both rejected the projected writeback even after the link succeeded.

Change

Carry the bounded request revision through the existing semantic review guard and recover the admitted review with that revision and its original stop condition. A same-kind review from a newer request revision cannot supply the original review's facts. Legacy review receipts without the revision still read and require their existing proof to recover. Existing outcome qualification and quota accounting still apply.

Verification

  • The File and SQLite production CLI regression starts without a Vision record, adopts and links an incoming request, and recovers its original semantic checkpoint. A different Turn cannot write back. Only the original Turn spends, once, and the subsequent ordinary Turn selects the linked Todo. The unrelated dated dependency stays deferred.
  • The TypeScript tests cover scope, invalid or missing revision metadata, and an interleaved newer revision.
  • This slice qualifies ordinary Todo linking and original-turn settlement. Explicit replan-bound Todo creation for a delegation-only review is a separate caller path. The related Vision-backed path is covered by Bind replan successor creation and recovery to the admitted review #10289.

The existing replan review owner and its typed frontier revision are reused. The new scalar receipt field carries that same evidence into settlement.

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.2-sol · OpenAI · runtime_reported · xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

原委派修订的结算在 File 和 SQLite 完成配对复验。

动机 / Motivation

处理新委派并用 canonical quota/settlement 完成原重规划的 Agent,以及接收下一轮工作的宿主。 原回执在链接普通 Todo 改变 frontier 后缺少委派的精确 revision,两个 provider 都拒绝原 Turn 写回。 先由新委派使空闲宿主获准,再读取、采纳并链接普通待办,最后重放原计划中的写回、扣额和次轮选取。 在委派单独触发重规划时,保留原 request revision 和停止条件,让原 Turn 写回并只扣额一次,新修订单独接受独立评审。 原 quota 回执、TS 重规划语义、旧回执读取、File 和 SQLite 的 CLI 复验。 本轮使用隔离 File 和 SQLite。显式创建委派型 replan successor 属于不同调用面。本评审范围为普通 Todo 链接及原 Turn 结算。 基线 0b06d8a。 基线约定

改动思路 / Approach

原 quota 回执、TS 重规划语义、旧回执读取、File 和 SQLite 的 CLI 复验。 复用已有 typed frontier revision 和 review owner。条件限定到完整的单一委派 review trigger,精确绑定不依赖新工作前沿。 同类委派的新版序号不能替代已准入的原序号。根因通过同一委派链接后续写回的基线与候选对照确认。

具体改动 / Changes

  • PRIMARY_DELIVERY。在委派单独触发重规划时,保留原 request revision 和停止条件,让原 Turn 写回并只扣额一次,新修订单独接受独立评审。

  • PRESERVE_CONTRACT。保留原 Turn 与请求修订,并沿既有资格结算。

  • 把已准入委派的精确 request revision 与停止条件交给现有公用回执序列化器。 quota_rollout_details

  • 单一 incoming delegation 从原回执恢复,不借用新版委派;其他现有重规划继续走已注册路径。 preserveReceiptBoundObligation

  • 回执升级仍须命中完全相同且待结算的义务,补齐已验证的 review source。 requalifyHeartbeatReceipt

  • 隔离 File 和 SQLite 重演原 Turn,只扣额一次,下一轮选择已链接的普通后继。 test_delegation_only_review_settles_original_revision_after_link

对主干的风险 / Risks

相同候选回归用例在精确基线的 File、SQLite 均运行到原 Turn 写回,然后被拒绝。 候选 File、SQLite 都写回原请求 revision。不同 Turn 被拒绝,原 Turn 扣额一次,重复请求是幂等回读。下一普通 Turn 选中链接任务,原延期任务仍保留。

候选 31 项 dated Vision CLI 测试与 223 项 quota/semantics TypeScript 测试通过,git diff --check 通过。

我的整体评价 / Verdict

同意精确提交 e7a61bd。同一委派、同一原 Turn 的写回和扣额完成闭环。挂接项目推进后仍能保留另一项等待,并由下一轮选取独立可执行 Todo。两个 provider 的读回结果一致。

English verdict: APPROVE at e7a61bd. The exact admitted delegation revision survives linking on File and SQLite. Both backends retain the original Turn, reject a different Turn, and debit exactly once.

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