Exclude stopped Goals from steward handoff recipients - #4943
Conversation
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
English verdict: APPROVE - head b8b3b39; 15 focused and 44 adjacent tests passed for stopped Goal handoff exclusion; maintainer merge only.
动机
停止的 Goal 不应继续作为 steward/manager 上下文交接受众,也不能靠重放绕过停止状态。
改动思路
在现有 manager_context.authority() 的注册目标集合中,复用 goal_is_stopped 过滤停止状态;deliver() 原本就会在写入和重放前重查 authority,因此三个受众入口共用同一决策,不增加第二套状态解析。
具体改动
- 同一合成 registry 的真实 source-checkout 调用:基线
e57b49e错误列出已停止的research/worker,此 headb8b3b399只保留仍活动的other/peer。 - 15 项 handoff 测试、44 项相邻 roundtrip/tracking/peer 测试通过,包含停止后拒绝重放、恢复后允许重放、Goal chat/Lark 与无效 activation 的负例;Ruff、diff check 通过。
- 三文件 +73/-7,没有新增持久状态、协议或入口。相关的窄范围未来重构已在原 owner 内完成:不再构造未使用的 Goal 映射值,改为集合;无需再拆一个模块。
对主干的风险
此路径仍以所选 registry 为准;跨镜像的源权威同步及 stop 与 enqueue 之间的原子性不在本 PR 的验收范围。旧 registry 未标 activation 时继续按现有 helper 视为 active。未按本 Goal 的 wait_for_ci=false 配置轮询远端 CI。
我的整体评价
没有发现阻断项。收紧的是 context-only 交接资格,不是执行授权;适合维护者按控制面规则合并,作者不自合并。
|
Merge-readiness follow-up for exact head The published exact-head approval remains on record. There are no unresolved review threads. The Goal has Please update the branch, then repeat exact-head review and merge-readiness qualification for the new head. No merge was performed. |
A steward context handoff currently treats every registered Agent as eligible, even when its Goal has been stopped. The recipient catalog now excludes Goals marked stopped in the selected registry, and the delivery path rechecks that state before a new request or replay. Malformed activation state also excludes that Goal without hiding healthy recipients. Web, Goal Chat, and Lark use this shared authority path; no separate frontend control is needed for this admission rule.
This is one boundary of context-aware routing. A lagging global mirror can still need source-authority reconciliation; registration alone does not prove session reachability, model fit, execution, or result return. The RFC records that remaining qualification. The future-facing pass reused the typed Goal activation helper and kept the check in the existing manager context owner, without adding another lifecycle parser or scheduler.
Validation: 103 focused manager/Chat tests; Ruff on changed Python; public-boundary scan clean (two unrelated active-state warnings); 18/18 selected premerge checks passed with no failures or manual holds. Exact-diff quality receipt:
cqr_c2aca25abdc0fd9f1b5f(one documented source-mirror warning). No private state or generated artifacts are included.