Skip to content

fix(collaboration): return legacy results with explicit original revision - #7373

Merged
loopx-agent merged 1 commit into
mainfrom
codex/legacy-delegation-result-revision-20261026
Oct 26, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/legacy-delegation-result-revision-20261026

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Legacy v1 inbox requests could be read and assessed, but manager-inbox report --request-revision 1 entered the exact-instance request-control decoder and refused their original result. Treat that explicit original revision exactly like an omitted revision in the existing typed result owner. Other legacy revisions and attempts to introduce request-control state remain rejected.

The result shape, immutable retry/update chain, original delivery proof, audience checks and uncertain-send protections retain their existing behavior. This does not replay an earlier failed command or author a receiver's answer.

Validation:

  • Red reproduction in both the typed owner and actual CLI before the fix.
  • 15 TypeScript result-publication/request-control tests; 66 roundtrip tests; 70 Goal-instance regression tests passed.
  • TypeScript typecheck; 5 direct premerge checks and all 15 selected checks passed.
  • CLI-to-original-transcript fixture verifies one result across retry/restart, with no request-control state. A mismatched original delivery still prevents publication.
  • Public-boundary scan completed for all four changed files; the existing non-literal credential-reference warning remains.

These are source and isolated fixture results; live recipient follow-through and provider delivery remain separately verified outcomes.

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

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

动机

接到旧版委派的 Agent,在通过现有命令返回原请求结果时会遇到这个问题。 同一个旧版请求,省略版本可以回传,显式选择原始版本 1 却被当成新版请求控制操作而拒绝,已经做完的工作因此没有进入原会话回传队列。 本次让这两种写法产生相同的原始结果,再由既有回传服务送回原会话;新测试实际经过 CLI、结果存储、重启读回和原会话消息。 范围只含旧请求的原始结果参数兼容,不生成接收者的业务结论,不重放旧命令,也不迁移历史请求或放宽原始投递证明。 源代码与隔离用例已验证;既有真实接收者何时再次自主返回,以及真实外部平台送达,仍需各自独立读回。

改动思路

在现有 TypeScript 结果发布 owner 内规范化原始版本参数即可解决问题;CLI、MCP、回传 IO 和请求修订控制继续使用各自已有边界。 只恢复 legacy v1 原始结果的等价输入,保留新版修订、不可变回执、来源授权和发送效果核验;不增加状态、消费者、唤醒或第二套规则。 实际调用链仍是 manager-inbox report → roundtrip.report → record_result → planCollaborationResult → 原有回传服务。把一个调用者的参数删掉只能掩盖同类问题;把历史请求改成新版本则会改变身份和来源证明。这两种替代都不如在唯一结果 owner 中处理等价输入。该切片不引入新的状态、手工同步关系或 provider IO。

具体改动

评审准确 head:1ed8f50d7fa41e0e95c70c7c7c875e6efeb82538。规格是主干既有 docs/reference/project-coordination.md,规格版本 540f293e4d82a5a3b4a13429f6cc21b0274a8e62。按其产品路径逐项映射:original-result-return 已实现并由实际 CLI 到原会话的用例验证;retry-restart-deduplication 已实现,显式/省略两次调用及重启只出现一条回复;original-source-proof 保留,冲突的初始投递证明既不发送、也不改写。新增 README 只是说明兼容边界,不能作为自证正确的新规格。

关键代码讲解

  • planCollaborationResult 先识别无 request-control 的既有 v1 请求,再严格区分数字 1 与其他显式值;原始值进入省略参数已有路径,不产生修订字段。带控制状态的请求继续由原 requestRevisionReceiptContext 处理。
  • record_result 是未改动的真实上游:仍在原请求锁下校验接收决定、调用同一个 typed planner 并写入相同结果目录。没有把 TypeScript 规则复制到 Python,也没有更换结果或外部发送 owner。
  • test_cli_legacy_explicit_original_revision_returns_once 真实调用 CLI main,先显式版本、再省略重试,验证既有回传与重启去重;另一负例验证错误的原接收者证明无法产生原消息或 provider 调用。两组 TypeScript 用例补全 decision/conclusion、严格类型、不可变更新和伪造控制状态。

对主干的风险

没有发现阻塞问题。最强反例是把兼容误做成修订或来源授权:数字 2、错误类型和伪造控制状态均拒绝;错误原始投递证明仍被原 owner 阻止。已有不确定发送、不可变替换、更新前驱、撤权和 Goal 实例用例仍通过。代码只增加六行生产逻辑,另有 77 行测试和 7 行说明;没有 RPC、后台服务、迁移或持久状态开销。安装本修复不会自动提交旧结论,也不能让旧失败命令自动重放。

语义与 CI 对齐

复用已有 request/result 词汇及唯一语义 owner;改变是已演示的等价输入修复和对应的精确拒绝提示。原始版本的显式与省略输入、修订与错误类型、来源冲突的正反方向均验证。按 Goal 的 wait_for_ci=false,未查询、轮询或等待远端 CI;采用本地当前 head 的实际证据,CI 状态不替代正确性或合并授权。

我的整体评价

APPROVE,属于有用且完整的兼容修复切片。long_horizon 与 user_experience 均改善:现有委派可由原接收者通过原命令回传,无需用户再开会话或重复追问。独立红例先在未改生产代码上复现拒绝,最终 15 项 TypeScript、66 项回传、70 项 Goal 实例测试及 typecheck 通过;准确 head 的 5 项直接检查和 15 项选定检查通过。公开扫描覆盖四个改动文件,保留既有非字面凭据引用提示。可减少的最高价值成本已通过复用原 owner 实现,没有理由再加一套兼容层。源代码与隔离用例已验证;既有真实接收者何时再次自主返回,以及真实外部平台送达,仍需各自独立读回。

English verdict: APPROVE 1ed8f50. The existing typed result owner now treats explicit original revision 1 like omission for legacy requests. Exact revision control, immutable retry/update, original-source proof and uncertain-send protections remain intact. Red CLI/typed reproduction, 15 TypeScript tests, 66 roundtrip tests, 70 Goal-instance regressions, typecheck and exact-head premerge passed. No live receiver answer, automatic replay or provider-delivery completion is claimed.

@loopx-agent
loopx-agent merged commit 5579287 into main Oct 26, 2026
15 of 38 checks passed
@loopx-agent
loopx-agent deleted the codex/legacy-delegation-result-revision-20261026 branch October 26, 2026 07:53
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