Skip to content

test(todo): validate managed claim references at the native owner - #7572

Merged
loopx-agent merged 1 commit into
mainfrom
codex/release220-claim-reference-tests-20261028
Oct 28, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/release220-claim-reference-tests-20261028

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Problem and result

The managed execution contract accepts --claim-operation-id on todo update and todo complete, while an older command-scope test still expected both commands to reject it. The test now verifies that the CLI retains supported references for native validation, including an empty value.

The existing real-provider regression also checks that an empty reference is rejected on update and completion for both File and SQLite, preserving the complete canonical snapshot and provider revision. Unsupported commands remain rejected. Production code, authority rules, timeouts and release criteria are unchanged.

Validation

  • All 123 tests in the CLI diagnostics and managed claim recovery modules pass, including four real-provider empty-reference cases and valid claim/update/complete/replay paths.
  • The unchanged baseline reproduces the four obsolete command-scope expectations. The accepted contract is docs/reference/handoff-mode.md at base 1fe6134e0b0fd0df6dc671a9bce0ea29c9613891.
  • Required local checks and exact-head review are recorded before merge. CI is not consulted under the configured maintainer review policy.

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)

动机 / Motivation

维护普通Agent认领后进展与完成路径、需要可信回归结果的开发者。 旧scope测试要求update/complete拒绝原claim引用,违背已接受的managed execution合同;失败使真实值校验与无变更拒绝边界缺少明确覆盖。 scope测试允许这两个调用者并保留原字符串,真实native owner拒绝空值,完整Todo、provider revision和投影保持不变。 只调整两处已有测试,无产品默认、CLI权限、provider schema、时间预算或发布门变化。

改动思路 / Approach

这不是放宽产品参数,而是让测试遵守现有两层校验:CLI判断哪个命令可以携带引用,native事务owner判断该引用是否有效。规范为 docs/reference/handoff-mode.md,revision 1fe6134e0b0fd0df6dc671a9bce0ea29c9613891。单纯删除原负例会损失独立保护;恢复旧运行时拒绝会破坏认领后的现有续办命令。本头复用现有双provider fixture,分开这两个语义。

具体改动 / Changes

关键内容讲解

test_claim_operation_id_is_not_silently_ignored_by_other_commands 保留 add/list/supersede × 有效/空值六个拒绝案例。test_managed_claim_reference_is_retained_for_the_execution_owner 覆盖 supported-managed-callers:update/complete两种命令均保留输入原字符串,包括空值,没有把它转成缺省。原CLI grammar只允许claim/update/complete,产品实现没有改动。

test_empty_managed_reference_is_rejected_without_mutation 覆盖 retain-invalid-reference-for-owner:先通过真实CLI取得原managed执行,再对File/SQLite上的update/complete传空引用,核对原错误码、完整错误文本和完整Todo/provider revision/投影快照。原Python transport通过 is not None 留住空字符串,TypeScript requireAuthorityStoreId 负责拒绝,不能悄悄去掉引用或创建新证明。unsupported-command-scope仍由前述六个原负例独立覆盖。

对主干的风险 / Risks

最强反例是scope改绿后把空引用当成缺省执行。本头四个真实native拒绝案例能发现该回归,解析器单元测试本身不能替代它。PASS:两个完整模块123项通过,零skip,包含File/SQLite上update/complete四个真实空引用拒绝案例及原有效认领、进展、完成与重放。相同原命令在基线复现4项过期scope预期;已核原测试、CLI grammar及合同在测试基线与PR base间5路径blob一致。Ruff、diff/RFC、两路径公开边界扫描及premerge5项直接/3项选中检查零失败、零hold;CI未查询。 两个模块外没有运行时、权限、默认启用、自动安装指引或新公共词汇变化。完整净diff仅 tests/test_cli_argument_diagnostics.py 与 tests/control_plane/test_todo_claim_argument_recovery.py,+32/-1。没有页面或布局变化,因此视觉检查不适用;真实付费模型、完整发布回归和公开安装包仍由原发布任务独立验收。

我的整体评价 / Verdict

APPROVE仅覆盖 74b3d526ab1c1fd3d5f96308bef2482fcad7e636。long_horizon为not_applicable,user_experience为preserved:产品操作和原执行权威不变,不新增人工准备或确认。已有fixture和参数化是同域可逆简化,没有新增框架或重复状态owner。旧完整回归及观察脚本的环境问题保持独立记录,不能靠这次局部通过宣称整版已经合格。

English verdict: APPROVE 74b3d52. All 123 focused tests and required local checks pass. Supported references remain intact; four real File/SQLite empty-reference cases reject without mutation. No production behavior or release criterion changes.

@loopx-agent
loopx-agent merged commit d415fed into main Oct 28, 2026
8 of 30 checks passed
@loopx-agent
loopx-agent deleted the codex/release220-claim-reference-tests-20261028 branch October 28, 2026 13:34
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