Skip to content

fix(manager): state where a team plan is confirmed in the answer that offered it - #4572

Merged
huangruiteng merged 2 commits into
mainfrom
codex/steward-remote-team-plan-pointer
Sep 16, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/steward-remote-team-plan-pointer

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

动机

#4569 让已准入的团队预览在业主自己的通道里变成一张 typed team.plan 卡片。现场回读发现卡片能拿到,但只在计划点名的那个 Goal 的工作区里:管家会话本身不渲染 typed-action 卡片,Lark 管家受众则完全没有卡片。于是提问的那个人可以读到一份正确的计划,却不知道怎么确认——管家正文说的是"你确认后就应用",没说去哪儿确认。

改动思路

  • 团队计划的通道侧收尾放进已经拥有这段契约的 loopx/capabilities/manager_context/team_plan.py:一份准入过预览的管家回答,由通道补上一句指引,点名那张卡片所在的 Goal,并说明确认之前不存在任何 lane。
  • 它是回执而非改写:管家正文逐字保留,Goal 通道永远不被加这句,没有团队预览的回答也不会被加。委托路径(context_handoff)本来就用同样的方式写自己的回执。
  • 远端管家受众同样收到这句,这正是"同一份管家回答"在"提问的受众自己不能确认"时仍然可行动的原因;仍然不替它写卡片,这个缺口在 RFC 里继续点名。
  • 前端不再自己拼这句话:通道是唯一所有者,前端只负责读取与窄化判定。

具体改动

  • team_plan.py:新增 offer_team_plan_confirmation(通道侧收尾:补指引 + 仅本地通道投影卡片)、team_plan_previews、confirmation_pointer;project_team_plan_preview 改为复用 team_plan_previews。
  • chat_runtime.py:调用点换成 offer_team_plan_confirmation,其余不变(文件仍是 1531 行,维持 reviewed module budget)。
  • dashboard-page.tsx:删掉客户端自造的团队计划提示行与不再使用的导入。
  • docs/architecture/rfcs/harness-selection-dsh-pi-v0.md(+ zh-CN):新增第 7 条 shipped enforcement;把"远端受众缺确认面"改写成"远端受众拿到指引、但还没有自己的卡片"。
  • 单测:新增/改写 tests/test_steward_team_plan_preview.py 的指引用例(本地通道被补且投影、远端受众被补但不写卡片、Goal 通道不被补、没有团队预览的回答不被补、投影失败仍补指引并写 typed 事件)。

对主干的风险

  • 唯一的默认行为变化是:准入过团队预览的管家回答末尾多一句由通道写入的指引。它不改授权、不创建工作、不改 apply 路径,正文原样保留。
  • 投影作用域不变(仅业主本地 manager 通道);远端通道不写卡片。投影失败不让回答失败。
  • 前端只删掉自己那份重复文案;读取 schema 与窄化判定不变,打包 bundle 随第二笔 commit 出货。
  • 仍然缺:远端受众自己的确认面(RFC 已记录,不是本次声称完成的部分)。

我的整体评价

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

这是把"能确认"从"卡片存在"补到"业主知道去哪儿确认"的一小步,正好补在 #4569 现场回读暴露的缝上,没有扩大任何授权面。

验证:86 项 manager/steward/team-plan 单测通过;workspace 浏览器 smoke、dashboard typecheck、team-plan smoke 通过;docs governance、maintainability ratchet、loopx canary premerge --from-git-diff 通过。

English verdict: APPROVE

… offered it

PR #4569 made an admitted steward team preview reach the owner's own channel as a
typed `team.plan` card. Live readback showed the card is reachable, but only
under the Goal the plan staffs: the manager conversation renders no typed-action
cards, and a Lark manager audience has no card at all. So the owner who asked the
sentence could read a correct plan and still not know how to confirm it -- the
steward's prose says "you confirm and it applies", not where.

Every manager answer that admitted a preview now carries one channel-authored
pointer line naming the Goal whose workspace holds the card, and stating that no
lane exists before that confirmation. It is an operational receipt, in the same
way the delegation path states its own receipt, so the steward's prose is
preserved verbatim and a Goal channel is never annotated. A remote manager
audience receives the same line, which is what makes one manager answer
actionable for an audience that cannot itself confirm; no card is written on its
behalf, and that remaining gap stays named in the RFC.

The dashboard no longer composes its own version of that sentence: the channel is
the one owner of it, so the transcript shows the answer it was given.

Validation: 86 manager/steward/team-plan unit tests pass, including the new
pointer cases (manager channel annotated, remote audience annotated without a
card, Goal channel untouched, a plan-free answer never annotated); workspace
browser smoke, dashboard typecheck and the team-plan smoke pass; the rebuilt chat
bundle ships the frontend change; docs governance, the maintainability ratchet
and `loopx canary premerge --from-git-diff` pass.

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

The channel now states where a team plan is confirmed, and the dashboard stopped
composing its own version of that sentence, so the packaged chat surface needs
the rebuilt bundle. Rebuilt with npm run build:chat: new entry
assets/index-Cb7S1yHW.js retires assets/index-D8O4R6-3.js as the previous
generation.

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.

Head reviewed: cee409c

动机

#4569 之后现场回读发现:卡片可达,但只在计划点名的 Goal 工作区里;管家会话不渲染 typed-action 卡片,Lark 管家受众完全没有卡片。提问者读得到正确计划,却不知道去哪确认。

改动思路

通道侧收尾:一份准入过团队预览的管家回答补一句由通道写入的指引(点名 Goal、说明确认前不创建 lane),仅本地通道额外投影卡片;远端受众得到指引但不写卡片。回执而非改写,Goal 通道与其他回答不受影响。

具体改动

team_plan.py 新增 offer_team_plan_confirmation / team_plan_previews / confirmation_pointer;chat_runtime.py 换调用点(仍 1531 行);dashboard-page.tsx 删掉客户端自造文案;RFC EN/ZH 增第 7 条并把远端缺口改写为"有指引、无自有卡片";单测覆盖四类指引用例。

对主干的风险

默认行为变化仅一句通道文案,不改授权、不创建工作、正文保留;投影作用域与失败语义不变;前端仅去重,bundle 随第二笔 commit 出货。远端自有确认面仍缺。

我的整体评价

审查了自己的 diff:新增函数是 #4569 同一契约的收尾,没有第二个写入者,也没有把模型正文当通道文案。测试覆盖了正反两向(Goal 通道不加、无预览不加、投影失败仍加指引)。

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

English verdict: APPROVE

@huangruiteng
huangruiteng merged commit 0aa6179 into main Sep 16, 2026
7 checks passed
@huangruiteng
huangruiteng deleted the codex/steward-remote-team-plan-pointer branch September 16, 2026 15:59
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