Skip to content

fix(turn): preserve complete signed host actions - #5018

Merged
huangruiteng merged 1 commit into
mainfrom
codex/release-preserve-action-command
Sep 24, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/release-preserve-action-command

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

Problem and result

A long quota command could be truncated twice after it was signed: the TurnEnvelope projection shortened primary_action to 480 characters, and the host reader shortened it again to 1,200. A longer temporary workspace path made an otherwise valid release test fail because the host received an incomplete command with an ellipsis.

The signed primary_action now survives both boundaries unchanged. Display-oriented summaries and envelope budget diagnostics remain bounded; an over-budget warning does not mutate executable authority.

Validation

  • 78 focused Python TurnEnvelope and host-contract tests passed.
  • 3 parallel temporary-path regression cases passed, including the formerly failing quota settlement case and two long-command sizes.
  • 15 TypeScript TurnEnvelope tests passed.
  • Control-plane TypeScript typecheck, configured Python mypy, changed-file Ruff, and hot-path interface budget smoke passed.
  • Exact-diff change-quality receipt: cqr_fb37f2d30755f499907f (verified).

This is a release-blocking correction for v1.2.0. It changes the signed host action path only; no provider or authority grant is added.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>

@huangruiteng huangruiteng 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.

动机

在 v1.2.0 的真实发布测试中,并行运行拉长了临时工作区路径。原有 TurnEnvelope 将已签名的 primary_action 截到 480 字符,宿主读取时又截到 1,200 字符,最终把完整 quota 命令变成带省略号的残缺命令。这个失败会随路径长度变化,不能通过放宽测试或绕过发布门槛处理。

改动思路

签名动作是宿主执行依据,必须从投影到宿主保持完整;展示摘要仍可压缩。沿用现有 TurnEnvelope 签名和预算告警,不增加平行字段、权限或新的配置开关。超出展示预算时给出诊断,而不修改被签名的执行内容。

具体改动

  • actionProjection 用完整的 agent_channel.primary_action 建立签名动作;recommended_action 保持原有摘要限制。已有 replan 动作分支仍输出固定的受控语义动作。
  • extract_turn_authority 先验证签名,再按原文取出字符串动作;空值或非字符串继续拒绝,不再在验证后改变动作内容。
  • 参数化回归覆盖超过 1,200 字符、超过 envelope 预算的命令,断言签名一致、宿主读回完整、超预算仅成为告警。此前失败的并行 quota 用例也已复跑通过。

对主干的风险

主要风险是极长动作会增加 TurnEnvelope 和宿主提示长度。现有预算度量继续报告超限,执行层不会因一个显示上限默默改写命令;该 PR 不提高硬限制、不改变签名校验、Goal 权限或配额结算。若上游产生不合理长度,需在动作生成的拥有者处明确拒绝或修正。定向 Python 78 项、并行复现 3 项、TypeScript 15 项、类型检查、Ruff 与热路径预算检查通过;风险分层 premerge 选出的 13 项也全部通过,直接 diff 与编译检查通过,无失败、跳过或人工保留。整版发布仍需在最终 main 提交重跑全量资格检查。

我的整体评价

同意合并此精确提交。 这是对实际发布失败的最小归属边界修复:让已签名动作保持可执行和可审计,同时保留预算诊断。没有引入第二套动作权威或隐藏 fallback;完成当前修复后应继续验证最终发布提交。

English verdict: APPROVE - head 12990b2 preserves signed host actions through both boundaries; focused Python/TypeScript tests, parallel regression, type checks, budget check and 13/13 premerge canaries passed. Final release qualification remains separate.

@huangruiteng huangruiteng 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.

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

动机

在 v1.2.0 的真实发布测试中,并行运行拉长了临时工作区路径。原有 TurnEnvelope 将已签名的 primary_action 截到 480 字符,宿主读取时又截到 1,200 字符,最终把完整 quota 命令变成带省略号的残缺命令。这个失败会随路径长度变化,不能通过放宽测试或绕过发布门槛处理。

改动思路

签名动作是宿主执行依据,必须从投影到宿主保持完整;展示摘要仍可压缩。沿用现有 TurnEnvelope 签名和预算告警,不增加平行字段、权限或新的配置开关。超出展示预算时给出诊断,而不修改被签名的执行内容。

具体改动

  • actionProjection 用完整的 agent_channel.primary_action 建立签名动作;recommended_action 保持原有摘要限制。已有 replan 动作分支仍输出固定的受控语义动作。
  • extract_turn_authority 先验证签名,再按原文取出字符串动作;空值或非字符串继续拒绝,不再在验证后改变动作内容。
  • 参数化回归覆盖超过 1,200 字符、超过 envelope 预算的命令,断言签名一致、宿主读回完整、超预算仅成为告警。此前失败的并行 quota 用例也已复跑通过。

对主干的风险

主要风险是极长动作会增加 TurnEnvelope 和宿主提示长度。现有预算度量继续报告超限,执行层不会因一个显示上限默默改写命令;该 PR 不提高硬限制、不改变签名校验、Goal 权限或配额结算。若上游产生不合理长度,需在动作生成的拥有者处明确拒绝或修正。定向 Python 78 项、并行复现 3 项、TypeScript 15 项、类型检查、Ruff 与热路径预算检查通过;风险分层 premerge 选出的 13 项也全部通过,直接 diff 与编译检查通过,无失败、跳过或人工保留。整版发布仍需在最终 main 提交重跑全量资格检查。

我的整体评价

同意合并此精确提交。 这是对实际发布失败的最小归属边界修复:让已签名动作保持可执行和可审计,同时保留预算诊断。没有引入第二套动作权威或隐藏 fallback;完成当前修复后应继续验证最终发布提交。

English verdict: APPROVE - head 12990b2 preserves signed host actions through both boundaries; focused Python/TypeScript tests, parallel regression, type checks, budget check and 13/13 premerge canaries passed. Final release qualification remains separate.

@huangruiteng
huangruiteng merged commit 132a26d into main Sep 24, 2026
10 checks passed
@huangruiteng
huangruiteng deleted the codex/release-preserve-action-command branch September 24, 2026 18:30
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