Skip to content

Exclude stopped Goals from steward handoff recipients - #4943

Merged
huangruiteng merged 2 commits into
mainfrom
codex/steward-active-goal-admission
Sep 24, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/steward-active-goal-admission

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

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.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
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.

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,此 head b8b3b399 只保留仍活动的 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 交接资格,不是执行授权;适合维护者按控制面规则合并,作者不自合并。

@huangruiteng

Copy link
Copy Markdown
Collaborator Author

Merge-readiness follow-up for exact head b8b3b399c921cecaf15b87567fff6c845d98c7a8: the current LoopX gate returns ready=false with merge_state_requires_update because this PR is behind main.

The published exact-head approval remains on record. There are no unresolved review threads. The Goal has wait_for_ci=false, so CI was not consulted for this decision. This PR changes the manager-context runtime authority boundary; repository policy requires a maintainer merge, not author self-merge.

Please update the branch, then repeat exact-head review and merge-readiness qualification for the new head. No merge was performed.

@huangruiteng
huangruiteng merged commit 0766822 into main Sep 24, 2026
21 of 27 checks passed
@huangruiteng
huangruiteng deleted the codex/steward-active-goal-admission branch September 24, 2026 08:24
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