Repository navigation
Conversation
…on on hard_lease goals A User action can never acquire an execution lease, so on a multi-agent hard_lease goal the only lease-exempt terminal path was for the exact bound agent. A goal-wide reminder (no bound agent) was refused with handoff_mode_requires_lease for every actor and actor_required without one, leaving it impossible to complete or supersede. Treat a goal-wide User action like a bound one: any registered, non-excluded actor may complete it as an administrative lifecycle edit. Active holders and explicit fences are still never bypassed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Wang, Xiang-Han <wanghank00@gmail.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
BigDataDZ
left a comment
There was a problem hiding this comment.
独立评审(native Windows)——APPROVE
精确核对 head:cdfb0a9c4。
代码:terminalFence() 的租约豁免管理性关闭从"精确绑定 Actor"扩展到"goal-wide(bound_agent === null)+ 任意注册非排除 Actor"。安全性栅栏全部保留(注册门 ownerIdentityEligible、排除表、非委托、非时间活跃、无显式栅栏、仅 complete、hard_lease、User action 不可持租约——不写租约、lease_fence=not_required)。TS 拒绝表里移除的恰是与新规则直接矛盾的旧行(bound_agent: null → handoff_mode_requires_lease),其余负面行(未注册、绑定不匹配、排除者、supersede、过期栅栏)全部保留——诚实处理,没有靠删负面测试过关。
实测(Windows 10 / Python 3.12 / Node 24.20)
tests/control_plane_ts/todo_terminal_decision.test.ts→ 21 passed / 0 failed(含更新后的拒绝矩阵)。tests/control_plane/test_canonical_handoff_invariants.py -k "user_action or goal_bound"→ 4 passed(绑定旧例双 provider + 新 goal-wide 例双 provider:任意注册 Agent 关闭、lease_fence=not_required、零租约、状态 done)。
CI 信号(该 head 的分片真实运行了)
- 分片 1–5:零断言失败,全部为 ~54 分钟会话上限截断(数千用例通过)——即 #9567 的时限问题,非本 PR。
- 分片 6:2 个失败(agy 归档回滚、Lark 并发 BrokenBarrier 竞态),均不在本 PR 域。
- 本 PR 自身的两个测试文件在本机与 CI 侧均绿。
Goal And Delivered Outcome
Outcome basis / optional anchor: Reproduced defect (direct PR; no separate issue). Related to fix(coordination): let an owner close an exact linked user gate on a single-agent goal #8844, which covers the single-agent
user_gatecase.Goal/source and gap:
hard_leasegoal, authoring accepts a goal-wide User action (task_class=user_action,goal_bound=true, nobound_agent);todo_authoring_scope.test.tspins that.todo_not_executable, pinned intask_lease_eligibility.test.ts). The only lease-exempt terminal path interminalFence()requiresbound_agent === actor_agent_id, so it never matches a goal-wide reminder.todo complete/todo update --status done/todo supersedereturnactor_required; with any registered--agent-idthey returnhandoff_mode_requires_lease, and the lease cannot be acquired. The reminder stays open forever.Observable before → after, with the validation row that proves it:
hard_leasegoal is refused for every actor.lease_fence=not_required, no lease written) (regression_parityrows). No actor, an unregistered actor and an excluded actor are still rejected earlier byregisteredTodoMutationRejection(), which this PR does not touch.Issue/task and intended base: Base
main.Author Declaration
Implemented against
terminalFence()at 6ad1583.hard_leasegoal can be completed by a registered agentterminalFence(),loopx/control_plane/coordination/todo_lifecycle_decision.tstest_goal_bound_user_action_completes_by_any_registered_agent(file, sqlite);bound User action closure is administrative…registeredTodoMutationRejection()runs beforeterminalFence()terminal authority rejects missing, unknown, excluded, bound, and foreign actorsbound_agent === actor_agent_idbranch keptbound_agent_mismatchcasesupersedeare unchangedlease_fence_required,version_mismatch,lease_cas_mismatch, supersede casesbound_agent !== null && bound_agent === actorbecomesbound_agent === null || bound_agent === actor. It changes one existing assertion.todo_terminal_decision.test.tsasserted that an unbound User action getshandoff_mode_requires_lease, but that refusal cannot be satisfied because a User action cannot acquire a lease. I replaced that assertion with the positive goal-wide case. I kept the explicitbound_agent === actor_agent_idhalf of the condition even thoughregisteredTodoMutationRejection()already rejects a foreign actor on the terminal path, becauseevaluateCoordinationTerminalFence()reachesterminalFence()without that check. Multi-agentuser_gatebehavior from fix(coordination): let an owner close an exact linked user gate on a single-agent goal #8844's review is unchanged; this touchesuser_actiononly.Scope And Continuation
supersedekeeps its current lease requirement, matching the bound case.Validation
regression_paritypassedtests/control_plane/test_canonical_handoff_invariants.py::test_goal_bound_user_action_completes_by_any_registered_agent(file/sqlite): fails on base 6ad1583 withhandoff_mode_requires_lease, passes on head.regression_paritypassedtests/control_plane_ts/todo_terminal_decision.test.ts: reverting the fix fails the goal-wide case (20 passed, 1 failed); with the fix 21 passed.integrationpassednpm run test:control-plane: 7044 passed, 0 failed. Python:test_canonical_handoff_invariants.py118 passed;test_chat_user_action_handling.py,test_todo_mutation_authority.py,test_chat_gate_decisions.py,test_canonical_todo_writer_isolation.py,test_canonical_lease_acquire.py76 passed.staticpassednpm run typecheck:control-planeclean;scripts/loopx canary premerge --from-git-diff --git-diff-base origin/mainpassed.See validation disclosure guidance.
Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
N/A
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).python3 scripts/check_rfc_bilingual.py --base origin/main --head HEADpasses, or no paired RFC changed.none.Signed-off-bytrailer (git commit -s).🤖 Generated with Claude Code